Commit Graph

54471 Commits

Author SHA1 Message Date
Dan Gohman
5bd698e65c Use stripPointerCasts(). Thanks Duncan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 19:33:16 +00:00
David Goodwin
557bbe6b5d Remove some old experimental code that is no longer needed. Remove additional, speculative scheduling pass as its cost did not translate into significant performance improvement. Minor tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89471 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 19:32:48 +00:00
Jakob Stoklund Olesen
6cd8103bea More consistent labelling of basic blocks in debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 18:54:59 +00:00
Dan Gohman
837be07979 Revert the rule that considers comparisons between two pointers in the
same object to be a non-capture; Duncan pointed out a way that such
a comparison could be a capture.

Make the rule that considers a comparison against null more specific,
and only consider noalias return values compared against null. This
still supports test/Transforms/GVN/nonescaping-malloc.ll, and is not
susceptible to the problem Duncan pointed out with noalias arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89468 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 17:50:21 +00:00
Mikhail Glushenkov
37628e0098 Move the handling of CommaSeparated options into ProvideOption.
Makes '--comma-separated val1,val2' mean the same thing as
'--comma-separated=val1,val2' (that is, 'val1' and 'val2' are not lumped
together as 'val1,val2'). Also declutters the main loop a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89463 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 17:23:17 +00:00
Duncan Sands
76700ba64c Fix PR5563, an expensive checks failure when running on
tests/Transforms/InstCombine/shufflemask-undef.ll.  If
anyone cares, the use of 2*e here (and the equivalent
all over the place in instcombine) seems wrong, though
harmless: it should really be twice the length of the
input vector.  I think shufflevector used to require
that the mask have the same length as the input, but I
don't think that's true any more.  I don't care enough
about vectors to do anything about this...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 13:19:51 +00:00
Duncan Sands
c088ae8b84 Fix PR5558, which was caused by a wrong fix for PR3393 (see commit 63048),
which was an expensive checks failure due to a bug in the checking.  This
patch in essence reverts the original fix for PR3393, and refixes it by a
tweak to the way expensive checking is done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89454 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 10:45:10 +00:00
Benjamin Kramer
5da15364b9 Try to work around grep's "Binary file (standard input) matches" complaints seen
on ppc buildbot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89452 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 09:53:25 +00:00
Daniel Dunbar
f6ed7824c5 Fix -march= name for x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 02:52:08 +00:00
Dan Gohman
b4afb137ef Fix fast-isel to avoid selecting the return instruction if a
tail call has been encountered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89444 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 02:51:26 +00:00
Jim Grosbach
de8b1dbf95 Remove verifySizes() since it's not adding much value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89443 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 02:32:06 +00:00
Evan Cheng
9b82425cb0 Also CSE non-pic load from constant pools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 02:10:27 +00:00
Dan Gohman
2e7e94826a Add an experimental option to run gep-splitting and no-load GVN
just before codegen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89439 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 02:03:44 +00:00
Dan Gohman
ae079c250f Simplify this code; it's not necessary to check isIdentifiedObject here
because if the results from getUnderlyingObject match, the values must
be from the same underlying object, even if we don't know what that
object is.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89434 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 01:34:03 +00:00
Jakob Stoklund Olesen
324da7647c Add MachineBasicBlock::getName, and use it in place of getBasicBlock()->getName.
Fix debug code that assumes getBasicBlock never returns NULL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89428 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 01:17:03 +00:00
Dan Gohman
ac146657fc Teach getSmallConstantTripMultiple about Shl operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89426 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 01:09:34 +00:00
Evan Cheng
9ef4835bd8 Fix codegen of conditional move of immediates. We were not making use of the immediate forms of cmov instructions at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89423 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 00:54:03 +00:00
Lang Hames
8783e401a3 Removed references to LiveStacks from Spiller.* . They're no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89422 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 00:53:30 +00:00
Dan Gohman
76c638a14c Refine the capture tracking rules for comparisons to be more
careful about crazy methods of capturing pointers using comparisons.
Comparisons of identified objects with null in the default address
space are not captures. And, comparisons of two pointers within the
same identified object are not captures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89421 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 00:50:47 +00:00
Dan Gohman
452ae47db6 Use isVoidTy().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89419 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 00:43:11 +00:00
Bill Wendling
0fe60c79fb Specify proper arch and triple for 64-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89418 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 00:40:21 +00:00
Bill Wendling
b3fa7e4e40 Testcase for r89415.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89417 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 00:32:16 +00:00
Eric Christopher
0dde97156c Update comment to reflect instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89414 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 00:21:55 +00:00
Dan Gohman
6d903092c9 Refine this to only apply to null in the default address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89411 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 23:53:49 +00:00
Jeffrey Yasskin
e03a39b096 Try to fix JITTest.FarCallToKnownFunction on ARM and PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89410 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 23:42:58 +00:00
Oscar Fuentes
470fb51961 Use CMAKE_DL_LIBS instead of raw library name. Fixes bug 5536.
Patch by Tobias Grosser!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89406 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 23:21:43 +00:00
David Goodwin
3e72d301e0 Fix a couple of problems with maintaining liveness information for antidep breaking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89404 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 23:12:37 +00:00
Jim Grosbach
4d8e90a026 When placing constant islands and adjusting for alignment padding, inline
assembly can confuse things utterly, as it's assumed that instructions in
inline assembly are 4 bytes wide. For Thumb mode, that's often not true,
so the calculations for when alignment padding will be present get thrown off,
ultimately leading to out of range constant pool entry references. Making
more conservative assumptions that padding may be necessary when inline asm
is present avoids this situation.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89403 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 23:10:28 +00:00
Dan Gohman
f94b5edc45 Extend CaptureTracking to indicate when a value is never stored, even
if it is not ultimately captured. Teach BasicAliasAnalysis that a 
local object address which does not escape and is never stored does
not alias with a value resulting from a load.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89398 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 21:57:48 +00:00
Evan Cheng
07ba906413 Refactor cmov selection code out to a separate function. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 21:45:22 +00:00
Dan Gohman
2a0fab118f Comparing a pointer with null is not a capture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89389 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 21:34:07 +00:00
Duncan Sands
b83012a180 Only run this mutex test if threading is enabled. This
fixes PR5395.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 20:48:14 +00:00
Jakob Stoklund Olesen
160069d15a Place new basic blocks immediately after their predecessor when splitting
critical edges in PHIElimination.

This has a huge impact on regalloc performance, and we recover almost all of
the 10% compile time regression that edge splitting introduced.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89381 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 19:42:16 +00:00
Bill Wendling
fb7634f1c7 Reverting the EH table patches.
$ svn merge -c -89279 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r89279 into '.':
U    lib/CodeGen/AsmPrinter/DwarfException.cpp
U    lib/Target/TargetLoweringObjectFile.cpp
$ svn merge -c -89270 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r89270 into '.':
G    lib/CodeGen/AsmPrinter/DwarfException.cpp
G    lib/Target/TargetLoweringObjectFile.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 19:21:09 +00:00
Johnny Chen
5c376ff9f0 Added NLdStLN which is similar to NLdSt with the exception that op7_4 is not
fully specified at this level.  Subclasses of NLdStLN can specify selective
bit(s) for Inst{7-4}, as is done for VLD[234]LN* and VST[234]LN* inside
ARMInstrNEON.td.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89377 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 19:20:17 +00:00
David Greene
feb5bfbc6b Fix a small bug.
Fix one case we missed to make sure we reserve registers from
allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89376 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 19:09:39 +00:00
Dan Gohman
dab249b3b7 Enable hoisting of loads from constant memory by default. In cases where
they are lowered to instruction sequences more complex than a simple
load, such that CodeGen cannot rematerialize them, a reload from a
spill slot is likely to be cheaper than the complex sequence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89374 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 19:00:10 +00:00
Daniel Dunbar
58ce7acb4f Use StringRef::min instead of std::min.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89372 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 18:53:18 +00:00
Jim Grosbach
dec6de92d1 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89369 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 18:23:19 +00:00
Daniel Dunbar
a627ef57ec TableGen/OptParser: When ordering options, make "sentinel" options appear before
everything else.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89368 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 18:22:16 +00:00
Mikhail Glushenkov
eeebecfcb4 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89364 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 17:29:36 +00:00
Mikhail Glushenkov
e0ace0c08f Make example/Hello compile again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 17:29:25 +00:00
Dan Gohman
57474fa0f6 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89360 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 16:35:11 +00:00
Benjamin Kramer
90c583fff0 cstdlib is not automatically included with StringRef anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89359 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 16:08:04 +00:00
Benjamin Kramer
49123250ae Reenable Split2 StringRef test with Apple gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89357 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 16:04:41 +00:00
David Greene
7cfd336af6 Add support for spreading register allocation.
Add a -linearscan-skip-count argument (default to 0) that tells the
allocator to remember the last N registers it allocated and skip them
when looking for a register candidate.  This tends to spread out
register usage and free up post-allocation scheduling at the cost of
slightly more register pressure.  The primary benefit is the ability
to backschedule reloads.

This is turned off by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89356 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 15:55:49 +00:00
Benjamin Kramer
1acdcd5b0d Remove the now obsolete algorithm include from StringRef.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89354 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 15:48:14 +00:00
Torok Edwin
2fe05d80d3 Workaround PR5482, because all the gcc versions that I had were miscompiling StringRef:
4.2.4, 4.3.4, 4.4.2.
The workaround is to use a local min/max implementation that takes an integer
param, and not a reference to integer param (like std::min does).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 15:39:50 +00:00
Benjamin Kramer
ac07b3df3e Unbreak x64 MSVC build. Patch by Nicolas Capens!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89341 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 12:17:31 +00:00
Edward O'Callaghan
cc9fa81fe1 Add PS3 Triple class, Credit to John Thompson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89339 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 11:59:00 +00:00