1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 14:33:02 +02:00
Commit Graph

2934 Commits

Author SHA1 Message Date
Dale Johannesen
a2cd0724ea Fix the testb optimization so x86 also bootstraps.
Reenable test.

llvm-svn: 59101
2008-11-12 02:00:35 +00:00
Dan Gohman
291ea92cc4 In ScheduleDAGRRList::CopyAndMoveSuccessors, create the SUnit for the load
before creating the SUnit for the operation that it was unfolded from. This
allows each SUnit to have all of its predecessor SUnits available at the time
it is created. I don't know yet if this will be absolutely required, but it
is a little tidier to do it this way.

llvm-svn: 59083
2008-11-11 21:34:44 +00:00
Dan Gohman
51db591eac Avoid relying on the SelectionDAG for initializing the MachineFunction and
TargetLoweringInfo variables for the scheduler.

llvm-svn: 59082
2008-11-11 21:31:56 +00:00
Dan Gohman
ec3b31e7eb Change the scheduler accessor methods to accept an explicit TargetMachine
argument instead of taking the SelectionDAG's TargetMachine. This is
needed for some upcoming scheduler changes.

llvm-svn: 59055
2008-11-11 17:50:47 +00:00
Bill Wendling
9da4535062 Fix for PR3040:
The CC was changed, but wasn't checked to see if it was legal if the DAG
combiner was being run after legalization. Threw in a couple of checks just to
make sure that it's okay. As far as the PR is concerned, no back-end target
actually exhibited this problem, so there isn't an associated testcase.

llvm-svn: 59035
2008-11-11 08:25:46 +00:00
Mon P Wang
c4bf9b94d5 Cleaned up and fix bugs in convert_rndsat node
llvm-svn: 59025
2008-11-11 05:40:06 +00:00
Bill Wendling
891f177dd0 Temporarily revert r58979 and related patch. It's causing a failure in X86 bootstrap:
Comparing stages 2 and 3
warning: ./cc1-checksum.o differs
warning: ./cc1obj-checksum.o differs
warning: ./cc1objplus-checksum.o differs
warning: ./cc1plus-checksum.o differs
Bootstrap comparison failure!
./alias.o differs
./alloc-pool.o differs
./attribs.o differs
./bb-reorder.o differs
./bitmap.o differs
./build/errors.o differs
./build/genattrtab.o differs
./build/genautomata.o differs
./build/genemit.o differs
./build/genextract.o differs
...

-bw

llvm-svn: 59003
2008-11-10 21:22:06 +00:00
Mon P Wang
6792115592 Added CONVERT_RNDSAT (conversion with rounding and saturation) SDNode to
support targets that support these conversions. Users should avoid using
this node as the current targets don't generating code for it.

llvm-svn: 59001
2008-11-10 20:54:11 +00:00
Duncan Sands
22e8a45a01 Fix PR2667: add soft float support for sint_to_fp/uint_to_fp
where the argument is an apint, or smaller than the minimum
size for which there is a libcall (i32). 

llvm-svn: 58994
2008-11-10 17:36:26 +00:00
Duncan Sands
eca6e696ca Tweak some comments.
llvm-svn: 58993
2008-11-10 17:31:56 +00:00
Duncan Sands
b6c3634c90 Small cleanups. No functionality change intended!
llvm-svn: 58992
2008-11-10 17:29:56 +00:00
Duncan Sands
1d0b7dccf7 When promoting the result of fp_to_uint/fp_to_sint,
inform the optimizers that the result must be zero/
sign extended from the smaller type.  For example,
if a fp to unsigned i16 is promoted to fp to i32,
then we are allowed to assume that the extra 16 bits
are zero (because the result of fp to i16 is undefined
if the result does not fit in an i16).  This is
quite aggressive, but should help the optimizers
produce better code.  This requires correcting a
test which thought that fp_to_uint is some kind
of truncation, which it is not: in the testcase
(which does fp to i1), either the fp value converts
to 0 or 1 or the result is undefined, which is
quite different to truncation.

llvm-svn: 58991
2008-11-10 17:28:30 +00:00
Dale Johannesen
8a43172ff1 Really fix testb optimization on big-endian.
Fixes ppc32 bootstrap.

llvm-svn: 58979
2008-11-10 07:16:42 +00:00
Mon P Wang
911ee5bf8b Added support for the following definition of shufflevector
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> 

llvm-svn: 58964
2008-11-10 04:46:22 +00:00
Dale Johannesen
27c03be35e Temporarily revert 58825, which breaks PPC bootstrap.
xs

llvm-svn: 58930
2008-11-09 06:48:10 +00:00
Duncan Sands
da4e03de04 Try to produce better code when scalarizing VSETCC.
llvm-svn: 58920
2008-11-08 18:26:48 +00:00
Dale Johannesen
e0608af6a4 Make testb optimization work on big-endian targets.
llvm-svn: 58874
2008-11-08 00:01:16 +00:00
Dale Johannesen
bc914a7cf9 Make FP tests requiring two compares work on PPC (PR 642).
This is Chris' patch from the PR, modified to realize that
SETUGT/SETULT occur legitimately with integers, plus
two fixes in LegalizeDAG to pass a valid result type into
LegalizeSetCC.  The argument of TLI.getSetCCResultType is
ignored on PPC, but I think I'm following usage elsewhere.

llvm-svn: 58871
2008-11-07 22:54:33 +00:00
Duncan Sands
60220e7127 Sign-extend rather than zero-extend when promoting
the condition for a BRCOND, according to what is
returned by getSetCCResultContents.  Since all
targets return the same thing (ZeroOrOneSetCCResult),
this should be harmless!  The point is that all over
the place the result of SETCC is fed directly into
BRCOND.  On machines for which getSetCCResultContents
returns ZeroOrNegativeOneSetCCResult, this is a
sign-extended boolean.  So it seems dangerous to
also feed BRCOND zero-extended booleans in some
circumstances - for example, when promoting the
condition.

llvm-svn: 58861
2008-11-07 20:13:04 +00:00
Dale Johannesen
4510149fd2 Fix unsigned->ppcf128 conversion.
llvm-svn: 58856
2008-11-07 19:11:43 +00:00
Dale Johannesen
89da8440e1 When we're doing a compare of load-AND-constant to 0
(e.g. a bitfield test) narrow the load as much as possible.
The has the potential to avoid unnecessary partial-word
load-after-store conflicts, which cause stalls on several targets.
Also a size win on x86 (testb vs testl).

llvm-svn: 58825
2008-11-07 01:28:02 +00:00
Bill Wendling
3fe9fef0da - Modify the stack protector algorithm so that the stack slot is allocated in
LLVM IR code and not in the selection DAG ISel. This is a cleaner solution.

- Fix the heuristic for determining if protectors are necessary. The previous
  one wasn't checking the proper type size.

llvm-svn: 58824
2008-11-07 01:23:58 +00:00
Mon P Wang
888f4e6fb0 Fixed scalarizing an extract subvector and prevent an infinite loop
when simplify a vector. 

llvm-svn: 58820
2008-11-06 22:52:21 +00:00
Devang Patel
8640fd500a Emit label for llvm.dbg.func.start of the inlined function.
llvm-svn: 58814
2008-11-06 21:28:20 +00:00
Duncan Sands
50acaf2367 Formating/comment changes - no functionality change.
llvm-svn: 58801
2008-11-06 08:51:32 +00:00
Bill Wendling
b6e2d60e7a - Rename stackprotector_{prologue,epilogue} to stackprotector_{create,check}.
- Get rid of "HasStackProtector" in MachineFrameInfo.
- Modify intrinsics to tell which are doing what with memory.

llvm-svn: 58799
2008-11-06 07:23:03 +00:00
Mon P Wang
41f90a3ee5 Widening cleanup
llvm-svn: 58796
2008-11-06 05:31:54 +00:00
Bill Wendling
08905ed703 Implement the stack protector stack accesses via intrinsics:
- stackprotector_prologue creates a stack object and stores the guard there.

- stackprotector_epilogue reads the stack guard from the stack position created
  by stackprotector_prologue.

- The PrologEpilogInserter was changed to make sure that the stack guard is
  first on the stack frame.

llvm-svn: 58791
2008-11-06 02:29:10 +00:00
Devang Patel
ec135e1f33 Emit label for llvm.dbg.func.start of the inlined function.
llvm-svn: 58786
2008-11-06 00:30:09 +00:00
Duncan Sands
f56e2fb5c2 Fix thinko in ppcf128 expansion of truncating store.
llvm-svn: 58753
2008-11-05 07:17:27 +00:00
Evan Cheng
1bde698192 Type of shuffle mask has changed.
llvm-svn: 58751
2008-11-05 06:04:18 +00:00
Dale Johannesen
eee3a8a2e0 80 columns
llvm-svn: 58717
2008-11-04 20:52:49 +00:00
Duncan Sands
58ebf09772 Fix PR3011: LegalizeTypes support for scalarizing
SELECT_CC.

llvm-svn: 58706
2008-11-04 17:31:08 +00:00
Dale Johannesen
d9906b90d0 Fix some ppcf128 regressions: make ExpandFloatRes_LOAD
work correctly, and bring over a late change to ppcf128
SetCC handling.

llvm-svn: 58642
2008-11-03 20:47:45 +00:00
Duncan Sands
8a94be8c5b Make VAARG promotion work correctly with large funky
sized integers like i129, and also reduce the number
of assumptions made about how vaarg is implemented.
This still doesn't work correctly for small integers
like (eg) i1 on x86, since x86 passes each of them
(essentially an i8) in a 4 byte stack slot, so the
pointer needs to be advanced by 4 bytes not by 1 byte
as now.  But this is no longer a LegalizeTypes problem
(it was also wrong in LT before): it is a bug in the
operation expansion in LegalizeDAG: now LegalizeTypes
turns an i1 vaarg into an i8 vaarg which would work
fine if only the i8 vaarg was turned into correct code
later.

llvm-svn: 58635
2008-11-03 20:22:12 +00:00
Duncan Sands
a9047944bc Make VAARG work with x86 long double (which is
10 bytes long, but is passed in 12/16 bytes).

llvm-svn: 58608
2008-11-03 11:51:11 +00:00
Mon P Wang
0d137a1c51 Added interface to allow clients to create a MemIntrinsicNode for
target intrinsics that touches memory

llvm-svn: 58548
2008-11-01 20:24:53 +00:00
Dan Gohman
f46431018c Remove some unused virtual function bodies.
llvm-svn: 58524
2008-10-31 19:06:33 +00:00
Duncan Sands
d2500010a3 Add a bunch of libcalls for ppcf128 that were somehow
completely forgotten about when writing LegalizeTypes.

llvm-svn: 58508
2008-10-31 14:06:52 +00:00
Duncan Sands
615567edc6 Fix PR2986: do not use a potentially illegal
type for the shift amount type.  Add a check
that shifts and rotates use the type returned
by getShiftAmountTy for the amount.  This
exposed some problems in CellSPU and PPC,
which have already been fixed.

llvm-svn: 58455
2008-10-30 20:26:50 +00:00
Mon P Wang
64e6e15947 Add missing vsetcc expansion for widening
llvm-svn: 58443
2008-10-30 18:21:52 +00:00
Mon P Wang
d7e34cd378 Add initial support for vector widening. Logic is set to widen for X86.
One will only see an effect if legalizetype is not active.  Will move
support to LegalizeType soon.

llvm-svn: 58426
2008-10-30 08:01:45 +00:00
Duncan Sands
4f4d9d24a4 Uniformize capitalization of NodeId.
llvm-svn: 58386
2008-10-29 17:52:12 +00:00
Duncan Sands
fd032c5bef Fix PR2977: LegalizeTypes support for expanding
VAARG.

llvm-svn: 58379
2008-10-29 14:25:28 +00:00
Duncan Sands
ada9e7a16d Add sanity checking for BUILD_PAIR (I noticed the
other day that PPC custom lowering could create
a BUILD_PAIR of two f64 with a result type of...
f64! - already fixed).  Fix a place that triggers
the sanity check.

llvm-svn: 58378
2008-10-29 14:22:20 +00:00
Duncan Sands
3faee6737e Fix a FIXME: in ReplaceNodeWith, if the new node
is morphed by AnalyzeNewNode into a previously
processed node, and different result values of
that node are remapped to values with different
nodes, then we could end up using wrong values
here [we were assuming that all results remap
to values with the same underlying node].  This
seems theoretically possible, but I don't have
a testcase.  The meat of the patch is in the
changes to AnalyzeNewNode/AnalyzeNewValue and
ReplaceNodeWith.  While there, I changed names
like RemapNode to RemapValue, since it really
remaps values.  To tell the truth, I would be
much happier if we were only remapping nodes
(it would simplify a bunch of logic, and allow
for some cute speedups) but I haven't yet worked
out how to do that.

llvm-svn: 58372
2008-10-29 06:42:19 +00:00
Duncan Sands
cb5432cdb4 Fix 80 column violations.
llvm-svn: 58371
2008-10-29 06:33:00 +00:00
Duncan Sands
790e7e655b Fix 80 column violations.
llvm-svn: 58370
2008-10-29 06:31:03 +00:00
Dan Gohman
eb869eb116 Take Chris' suggestion and define EnableFastISelVerbose and
EnableFastISelAbort variables for Release mode instead of
using ifdefs in the code.

llvm-svn: 58350
2008-10-28 20:35:31 +00:00
Dan Gohman
5a2a8f4b9b Protect the code for fast-isel debugging with #ifndef NDEBUG.
llvm-svn: 58340
2008-10-28 19:08:46 +00:00