Commit Graph

25486 Commits

Author SHA1 Message Date
Daniel Dunbar
0656466734 Fix warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58486 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 01:50:01 +00:00
Dan Gohman
d17cfbe1ca Use MOVSSmr instead of EXTRACTPSmr in the case of extracting
vector element 0 for a store, as it's smaller and faster.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58483 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 00:57:24 +00:00
Jim Grosbach
8fe95356dd Revert errant deletion. The target needs to be able to specify that it doesn't want the generic constant pool to be emitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58475 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 23:44:39 +00:00
Evan Cheng
e53a5af966 I think we got non-machine specific constpool entries covered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58474 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 23:43:36 +00:00
Dan Gohman
1975d03183 Canonicalize sext(i1) to i1?-1:0, and update various instcombine
optimizations accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58457 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 20:40:10 +00:00
Duncan Sands
3d0f5afefb 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58455 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 20:26:50 +00:00
Duncan Sands
2fbfbd2a05 Shift amounts should have type getShiftAmountTy
(i32 for PPC, not i8).  Correct this, and some
formatting while there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58451 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 19:28:32 +00:00
Daniel Dunbar
c5e1ec47c7 Add InlineCost class for represent the estimated cost of inlining a
function.
 - This explicitly models the costs for functions which should
   "always" or "never" be inlined. This fixes bugs where such costs
   were not previously respected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58450 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 19:26:59 +00:00
Duncan Sands
fa7935fcb3 Shift amounts should have the type given by
getShiftAmountTy (i32 in the case of CellSPU).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58449 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 19:24:28 +00:00
Mon P Wang
2eb13c347f Add missing vsetcc expansion for widening
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58443 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 18:21:52 +00:00
Evan Cheng
65f244261c ARM JIT should observe -relocation-model command line option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58433 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 16:10:54 +00:00
Mon P Wang
0c39719bfc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58426 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 08:01:45 +00:00
Scott Michel
d976c21241 Resolve bug 2947: vararg-marked functions must spill registers R3-R79 to stack
so that va_start/va_arg/et.al. will walk arguments correctly for Cell SPU.

N.B.: Because neither clang nor llvm-gcc-4.2 can be built for CellSPU, this is
still unexorcised code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58415 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 01:51:48 +00:00
Evan Cheng
0f282439be Correct way to handle CONSTPOOL_ENTRY instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58409 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 23:55:43 +00:00
Evan Cheng
5be59eace5 Add debugging support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58408 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 23:55:17 +00:00
Evan Cheng
ef5784ef9b Let target resolve some relocation results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58407 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 23:54:46 +00:00
Nate Begeman
110e3b3d1b Fix PEXTRQ encoding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58403 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 23:07:17 +00:00
Dale Johannesen
b384ab9ea1 Add a RM pseudoreg for the rounding mode, which
allows ppcf128->int conversion to work with
DeadInstructionElimination.  This is now turned
off but RM is harmless.  It does not do a complete
job of modeling the rounding mode.

Revert marking MFCR as using all 7 CR subregisters;
while correct, this caused the problem in PR 2964,
plus the local RA crash noted in the comments.
This was needed to make DeadInstructionElimination,
but as we are not running that, it is backed out
for now.  Eventually it should go back in and the
other problems fixed where they're broken.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58391 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 18:26:45 +00:00
Duncan Sands
b99e740d71 Uniformize capitalization of NodeId.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58386 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 17:52:12 +00:00
Chris Lattner
f8131c99de Fix PR2967 by not deleting volatile load/stores that occur before unreachable.
I don't really see this as being needed, but there is little harm from doing
it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58385 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 17:46:26 +00:00
Duncan Sands
21c2972f7d Fix PR2977: LegalizeTypes support for expanding
VAARG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58379 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 14:25:28 +00:00
Duncan Sands
d22ec5f628 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58378 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 14:22:20 +00:00
Evan Cheng
5489893867 - More pre-split fixes: spill slot live interval computation bug; restore point bug.
- If a def is spilt, remember its spill index to allow its reuse.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58375 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 08:39:34 +00:00
Duncan Sands
23b10f5b64 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58372 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 06:42:19 +00:00
Duncan Sands
b3bc6352de Fix 80 column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58371 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 06:33:00 +00:00
Duncan Sands
86813ce5fa Fix 80 column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58370 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 06:31:03 +00:00
Evan Cheng
d0e32c5d5c - Rewrite code that update register live interval that's split.
- Create and update spill slot live intervals.
- Lots of bug fixes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 05:06:14 +00:00
Daniel Dunbar
1a99dbfe3b Factor shouldInline method out of Inliner.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58355 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 01:02:02 +00:00
Daniel Dunbar
f184c66e71 Assorted comment/naming fixes, 80-col violations, and reindentation.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58352 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 23:24:26 +00:00
Dan Gohman
b493b2774c (A & sext(C)) | (B & ~sext(C) -> C ? A : B
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58351 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 22:38:57 +00:00
Dan Gohman
2275105edb Take Chris' suggestion and define EnableFastISelVerbose and
EnableFastISelAbort variables for Release mode instead of
using ifdefs in the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58350 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 20:35:31 +00:00
Daniel Dunbar
e9da133ae0 Reuse PrintEscapedString for printing names in .ll
- One functionality change, '\\' in a name is now printed as a hex
   escape instead of "\\\\". This is consistent with other users of
   PrintEscapedString.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58343 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 19:33:02 +00:00
Dan Gohman
727809ad8a Protect the code for fast-isel debugging with #ifndef NDEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58340 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 19:08:46 +00:00
Jim Grosbach
bc6d876adf Support for constant islands in the ARM JIT.
Since the ARM constant pool handling supercedes the standard LLVM constant
pool entirely, the JIT emitter does not allocate space for the constants,
nor initialize the memory. The constant pool is considered part of the 
instruction stream.

Likewise, when resolving relocations into the constant pool, a hook into
the target back end is used to resolve from the constant ID# to the
address where the constant is stored.

For now, the support in the ARM emitter is limited to 32-bit integer. Future
patches will expand this to the full range of constants necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58338 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 18:25:49 +00:00
Duncan Sands
57760d96e2 Fix darwin ppc llvm-gcc build breakage: intercept
ppcf128 to i32 conversion and expand it into a code
sequence like in LegalizeDAG.  This needs custom
ppc lowering of FP_ROUND_INREG, so turn that on and
make it work with LegalizeTypes.  Probably PPC should
simply custom lower the original conversion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58329 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 15:00:32 +00:00
Duncan Sands
1acb29c8ea Fix a testcase provided by Bill in which the node
id could end up being wrong mostly because of
forgetting to remap new nodes that morphed into
processed nodes through CSE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58323 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 09:38:36 +00:00
Chris Lattner
6e1c6231ba Don't produce invalid comparisons after legalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58320 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 07:11:07 +00:00
Chris Lattner
7fe5e1812f fix some whitespace stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58319 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 07:10:51 +00:00
Chris Lattner
4002a1b6f1 Fix a nasty miscompilation of 176.gcc on linux/x86 where we synthesized
a memset using 16-byte XMM stores, but where the stack realignment code
didn't work.  Until it does (PR2962) disable use of xmm regs in memcpy
and memset formation for linux and other targets with insufficiently
aligned stacks.

This is part of PR2888



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58317 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 05:49:35 +00:00
Evan Cheng
1f08cc2d2b If def is in the same mbb as the barrier, spilt the value after the last use before the barrier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58314 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 05:28:21 +00:00
Evan Cheng
ae7fa5bef1 Add command line option to limit the number splits to help debugging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58312 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 01:48:24 +00:00
Evan Cheng
f62ce370a4 Avoid putting a split past the end of the live range; always shrink wrap live interval in the barrier mbb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58309 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 00:47:49 +00:00
Evan Cheng
985921e846 Silence a bogus compile time warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58297 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 23:29:28 +00:00
David Greene
c714f13090 Re-apply 55137 with fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58296 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 23:24:03 +00:00
Evan Cheng
b3990d5e94 Remove val# defined by a remat'ed def that is now dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58294 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 23:21:01 +00:00
Ted Kremenek
8e7fa916fe Fix bogus comparison of "const char *" with c-string literal. Use strcmp instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58290 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 22:43:07 +00:00
David Greene
8ad4c00c00 Have TableGen emit setSubgraphColor calls under control of a -gen-debug
flag.  Then in a debugger developers can set breakpoints at these calls
to see waht is about to be selected and what the resulting subgraph
looks like.  This really helps when debugging instruction selection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58278 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 21:56:29 +00:00
David Greene
c5e7e8d87d Add setSubgraphColor to color an entire portion of a SelectionDAG. This
will be used to support debug features in TableGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58257 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 18:17:03 +00:00
David Greene
26b86a0b56 Fix PR2634. Create new virtual registers from spills early so that we
can give it the same stack slot as the spilled interval if it is folded.
This prevents the fold/unfold code from pointing to the wrong register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58255 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 17:38:59 +00:00
Duncan Sands
0dc4045bd2 Fix UpdateNodeOperands so that it does CSE of calls
(and a bunch of other node types).  While there, I
added a doNotCSE predicate and used it to reduce code
duplication (some of the duplicated code was wrong...).
This fixes ARM/cse-libcalls.ll when using LegalizeTypes. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 15:30:53 +00:00