oota-llvm.git
15 years agoAvoid a redundant assertion.
Bob Wilson [Sat, 21 Nov 2009 22:39:27 +0000 (22:39 +0000)]
Avoid a redundant assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89565 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDarwin requires a frame pointer for all non-leaf functions to support correct
Jim Grosbach [Sat, 21 Nov 2009 21:40:08 +0000 (21:40 +0000)]
Darwin requires a frame pointer for all non-leaf functions to support correct
backtraces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89562 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd predicate operand to NEON instructions. Fix lots (but not all) 80 col violations...
Evan Cheng [Sat, 21 Nov 2009 06:21:52 +0000 (06:21 +0000)]
Add predicate operand to NEON instructions. Fix lots (but not all) 80 col violations in ARMInstrNEON.td.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89542 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow target to disable if-converting predicable instructions. e.g. NEON instructions...
Evan Cheng [Sat, 21 Nov 2009 06:20:26 +0000 (06:20 +0000)]
Allow target to disable if-converting predicable instructions. e.g. NEON instructions under ARM mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89541 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCosmetic changes, which were long overdue, in DwarfDebug.cpp.
Devang Patel [Sat, 21 Nov 2009 02:48:08 +0000 (02:48 +0000)]
Cosmetic changes, which were long overdue, in DwarfDebug.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89537 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWe are not using DBG_STOPPOINT anymore.
Devang Patel [Sat, 21 Nov 2009 02:46:55 +0000 (02:46 +0000)]
We are not using DBG_STOPPOINT anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89536 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMaintain stylistic consistency.
Evan Cheng [Sat, 21 Nov 2009 02:32:35 +0000 (02:32 +0000)]
Maintain stylistic consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89535 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't leave temporary files in the test directory.
Jakob Stoklund Olesen [Sat, 21 Nov 2009 02:05:31 +0000 (02:05 +0000)]
Don't leave temporary files in the test directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89531 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBe more clever about calculating live variables through new basic blocks.
Jakob Stoklund Olesen [Sat, 21 Nov 2009 02:05:21 +0000 (02:05 +0000)]
Be more clever about calculating live variables through new basic blocks.

When splitting a critical edge, the registers live through the edge are:

- Used in a PHI instruction, or
- Live out from the predecessor, and
- Live in to the successor.

This allows the coalescer to eliminate even more phi joins.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89530 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow SmallString to implicitly convert to StringRef.
Daniel Dunbar [Sat, 21 Nov 2009 02:01:24 +0000 (02:01 +0000)]
Allow SmallString to implicitly convert to StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89529 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd more optimizations for object size checking, enable handling of
Eric Christopher [Sat, 21 Nov 2009 01:01:30 +0000 (01:01 +0000)]
Add more optimizations for object size checking, enable handling of
object size intrinsic and verify return type is correct. Collect various
code in one place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89523 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove dead code.
Devang Patel [Sat, 21 Nov 2009 00:54:03 +0000 (00:54 +0000)]
Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89522 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen generating a vector the really slow way, via loads
Dale Johannesen [Sat, 21 Nov 2009 00:53:23 +0000 (00:53 +0000)]
When generating a vector the really slow way, via loads
and stores, handle the case where the element size is not
a valid target type correctly (PPC).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89521 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThere is no need to use FoldingSet to unique DIEs.
Devang Patel [Sat, 21 Nov 2009 00:31:03 +0000 (00:31 +0000)]
There is no need to use FoldingSet to unique DIEs.
DIEs are created from MDNode, which are already uniqued. And DwarfDebug already uses ValueMaps to find and use existing DIE for a given MDNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89518 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded two SubtargetFeatures::AddFeatures methods, which accept a comma-separated...
Viktor Kutuzov [Sat, 21 Nov 2009 00:00:02 +0000 (00:00 +0000)]
Added two SubtargetFeatures::AddFeatures methods, which accept a comma-separated string or already parsed command line parameters as input, and some code re-factoring to use these new methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89516 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRestructure code to allow renaming of multiple-register groups for anti-dep breaking.
David Goodwin [Fri, 20 Nov 2009 23:33:54 +0000 (23:33 +0000)]
Restructure code to allow renaming of multiple-register groups for anti-dep breaking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89511 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnable hoisting load from constant memories.
Evan Cheng [Fri, 20 Nov 2009 23:31:34 +0000 (23:31 +0000)]
Enable hoisting load from constant memories.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89510 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a thinko that caused spurious @GOTOFFs.
Dan Gohman [Fri, 20 Nov 2009 23:30:32 +0000 (23:30 +0000)]
Fix a thinko that caused spurious @GOTOFFs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89509 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate for new getBlockAddress signature.
Dan Gohman [Fri, 20 Nov 2009 23:21:00 +0000 (23:21 +0000)]
Update for new getBlockAddress signature.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89507 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTarget-independent support for TargetFlags on BlockAddress operands,
Dan Gohman [Fri, 20 Nov 2009 23:18:13 +0000 (23:18 +0000)]
Target-independent support for TargetFlags on BlockAddress operands,
and support for blockaddresses in x86-32 PIC mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89506 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRecommitting PALIGNR shift width fixes.
Sean Callanan [Fri, 20 Nov 2009 22:28:42 +0000 (22:28 +0000)]
Recommitting PALIGNR shift width fixes.
Thanks to Daniel Dunbar for fixing clang intrinsics:
  http://llvm.org/viewvc/llvm-project?view=rev&revision=89499

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89500 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an incorrect overaggressive optimization
Dale Johannesen [Fri, 20 Nov 2009 22:16:40 +0000 (22:16 +0000)]
Remove an incorrect overaggressive optimization
(PPC specific).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89496 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReverting PALIGNR fix until I figure out how this
Sean Callanan [Fri, 20 Nov 2009 22:09:28 +0000 (22:09 +0000)]
Reverting PALIGNR fix until I figure out how this
broke the Clang testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89495 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixed PALIGNR to take 8-bit rotations in all cases.
Sean Callanan [Fri, 20 Nov 2009 21:40:28 +0000 (21:40 +0000)]
Fixed PALIGNR to take 8-bit rotations in all cases.
Also fixed the corresponding testcase, and the PALIGNR
  intrinsic (tested for correctness with llvm-gcc).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89491 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not hold on to a map slot while new entries may be inserted into the map.
Devang Patel [Fri, 20 Nov 2009 21:37:22 +0000 (21:37 +0000)]
Do not hold on to a map slot while new entries may be inserted into the map.
Use ValueMap, instead of std::map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89490 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCleanups.
David Greene [Fri, 20 Nov 2009 21:13:27 +0000 (21:13 +0000)]
Cleanups.

Make things a little more efficient as suggested by Evan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89489 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThere is no need to emit source location info for DW_TAG_pointer_type.
Devang Patel [Fri, 20 Nov 2009 21:05:37 +0000 (21:05 +0000)]
There is no need to emit source location info for DW_TAG_pointer_type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89487 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake Loop::getLoopLatch() work on loops which don't have preheaders, as
Dan Gohman [Fri, 20 Nov 2009 20:51:18 +0000 (20:51 +0000)]
Make Loop::getLoopLatch() work on loops which don't have preheaders, as
it may be used in contexts where preheader insertion may have failed due
to an indirectbr.

Make LoopSimplify's LoopSimplify::SeparateNestedLoop properly fail in
the case that it would require splitting an indirectbr edge.

These fix PR5502.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89484 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix IPSCCP's code for deleting dead blocks to tolerate outstanding
Dan Gohman [Fri, 20 Nov 2009 20:19:14 +0000 (20:19 +0000)]
Fix IPSCCP's code for deleting dead blocks to tolerate outstanding
blockaddress users. This fixes PR5569.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89483 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert "Add some rough optimizations for checking routines.", it buildeth not.
Daniel Dunbar [Fri, 20 Nov 2009 20:17:30 +0000 (20:17 +0000)]
Revert "Add some rough optimizations for checking routines.", it buildeth not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89482 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd some rough optimizations for checking routines.
Eric Christopher [Fri, 20 Nov 2009 19:57:37 +0000 (19:57 +0000)]
Add some rough optimizations for checking routines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89479 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemat VLDRD from constpool. Clean up some instruction property specifications.
Evan Cheng [Fri, 20 Nov 2009 19:57:15 +0000 (19:57 +0000)]
Remat VLDRD from constpool. Clean up some instruction property specifications.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89478 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd option -licm-const-load to hoist all loads from constant memory.
Evan Cheng [Fri, 20 Nov 2009 19:55:37 +0000 (19:55 +0000)]
Add option -licm-const-load to hoist all loads from constant memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89477 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe verify() call of CPEIsInRange() isn't right for the assertion check of
Jim Grosbach [Fri, 20 Nov 2009 19:37:38 +0000 (19:37 +0000)]
The verify() call of CPEIsInRange() isn't right for the assertion check of
constant pool ranges, as CPEIsInRange() makes conservative assumptions about
the potential alignment changes from branch adjustments. The verification,
on the other hand, runs after those branch adjustments are made, so the
effects on alignment are known and already taken into account. The sanity
check in verify should check the range directly instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89473 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse stripPointerCasts(). Thanks Duncan!
Dan Gohman [Fri, 20 Nov 2009 19:33:16 +0000 (19:33 +0000)]
Use stripPointerCasts(). Thanks Duncan!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89472 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove some old experimental code that is no longer needed. Remove additional, specul...
David Goodwin [Fri, 20 Nov 2009 19:32:48 +0000 (19:32 +0000)]
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

15 years agoMore consistent labelling of basic blocks in debug output
Jakob Stoklund Olesen [Fri, 20 Nov 2009 18:54:59 +0000 (18:54 +0000)]
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

15 years agoRevert the rule that considers comparisons between two pointers in the
Dan Gohman [Fri, 20 Nov 2009 17:50:21 +0000 (17:50 +0000)]
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

15 years agoMove the handling of CommaSeparated options into ProvideOption.
Mikhail Glushenkov [Fri, 20 Nov 2009 17:23:17 +0000 (17:23 +0000)]
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

15 years agoFix PR5563, an expensive checks failure when running on
Duncan Sands [Fri, 20 Nov 2009 13:19:51 +0000 (13:19 +0000)]
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

15 years agoFix PR5558, which was caused by a wrong fix for PR3393 (see commit 63048),
Duncan Sands [Fri, 20 Nov 2009 10:45:10 +0000 (10:45 +0000)]
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

15 years agoTry to work around grep's "Binary file (standard input) matches" complaints seen
Benjamin Kramer [Fri, 20 Nov 2009 09:53:25 +0000 (09:53 +0000)]
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

15 years agoFix -march= name for x86-64.
Daniel Dunbar [Fri, 20 Nov 2009 02:52:08 +0000 (02:52 +0000)]
Fix -march= name for x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89445 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix fast-isel to avoid selecting the return instruction if a
Dan Gohman [Fri, 20 Nov 2009 02:51:26 +0000 (02:51 +0000)]
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

15 years agoRemove verifySizes() since it's not adding much value.
Jim Grosbach [Fri, 20 Nov 2009 02:32:06 +0000 (02:32 +0000)]
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

15 years agoAlso CSE non-pic load from constant pools.
Evan Cheng [Fri, 20 Nov 2009 02:10:27 +0000 (02:10 +0000)]
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

15 years agoAdd an experimental option to run gep-splitting and no-load GVN
Dan Gohman [Fri, 20 Nov 2009 02:03:44 +0000 (02:03 +0000)]
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

15 years agoSimplify this code; it's not necessary to check isIdentifiedObject here
Dan Gohman [Fri, 20 Nov 2009 01:34:03 +0000 (01:34 +0000)]
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

15 years agoAdd MachineBasicBlock::getName, and use it in place of getBasicBlock()->getName.
Jakob Stoklund Olesen [Fri, 20 Nov 2009 01:17:03 +0000 (01:17 +0000)]
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

15 years agoTeach getSmallConstantTripMultiple about Shl operators.
Dan Gohman [Fri, 20 Nov 2009 01:09:34 +0000 (01:09 +0000)]
Teach getSmallConstantTripMultiple about Shl operators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89426 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix codegen of conditional move of immediates. We were not making use of the immediat...
Evan Cheng [Fri, 20 Nov 2009 00:54:03 +0000 (00:54 +0000)]
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

15 years agoRemoved references to LiveStacks from Spiller.* . They're no longer needed.
Lang Hames [Fri, 20 Nov 2009 00:53:30 +0000 (00:53 +0000)]
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

15 years agoRefine the capture tracking rules for comparisons to be more
Dan Gohman [Fri, 20 Nov 2009 00:50:47 +0000 (00:50 +0000)]
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

15 years agoUse isVoidTy().
Dan Gohman [Fri, 20 Nov 2009 00:43:11 +0000 (00:43 +0000)]
Use isVoidTy().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89419 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSpecify proper arch and triple for 64-bit.
Bill Wendling [Fri, 20 Nov 2009 00:40:21 +0000 (00:40 +0000)]
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

15 years agoTestcase for r89415.
Bill Wendling [Fri, 20 Nov 2009 00:32:16 +0000 (00:32 +0000)]
Testcase for r89415.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89417 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate comment to reflect instruction.
Eric Christopher [Fri, 20 Nov 2009 00:21:55 +0000 (00:21 +0000)]
Update comment to reflect instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89414 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRefine this to only apply to null in the default address space.
Dan Gohman [Thu, 19 Nov 2009 23:53:49 +0000 (23:53 +0000)]
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

15 years agoTry to fix JITTest.FarCallToKnownFunction on ARM and PPC.
Jeffrey Yasskin [Thu, 19 Nov 2009 23:42:58 +0000 (23:42 +0000)]
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

15 years agoUse CMAKE_DL_LIBS instead of raw library name. Fixes bug 5536.
Oscar Fuentes [Thu, 19 Nov 2009 23:21:43 +0000 (23:21 +0000)]
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

15 years agoFix a couple of problems with maintaining liveness information for antidep breaking.
David Goodwin [Thu, 19 Nov 2009 23:12:37 +0000 (23:12 +0000)]
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

15 years agoWhen placing constant islands and adjusting for alignment padding, inline
Jim Grosbach [Thu, 19 Nov 2009 23:10:28 +0000 (23:10 +0000)]
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

15 years agoExtend CaptureTracking to indicate when a value is never stored, even
Dan Gohman [Thu, 19 Nov 2009 21:57:48 +0000 (21:57 +0000)]
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

15 years agoRefactor cmov selection code out to a separate function. No functionality change.
Evan Cheng [Thu, 19 Nov 2009 21:45:22 +0000 (21:45 +0000)]
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

15 years agoComparing a pointer with null is not a capture.
Dan Gohman [Thu, 19 Nov 2009 21:34:07 +0000 (21:34 +0000)]
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

15 years agoOnly run this mutex test if threading is enabled. This
Duncan Sands [Thu, 19 Nov 2009 20:48:14 +0000 (20:48 +0000)]
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

15 years agoPlace new basic blocks immediately after their predecessor when splitting
Jakob Stoklund Olesen [Thu, 19 Nov 2009 19:42:16 +0000 (19:42 +0000)]
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

15 years agoReverting the EH table patches.
Bill Wendling [Thu, 19 Nov 2009 19:21:09 +0000 (19:21 +0000)]
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

15 years agoAdded NLdStLN which is similar to NLdSt with the exception that op7_4 is not
Johnny Chen [Thu, 19 Nov 2009 19:20:17 +0000 (19:20 +0000)]
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

15 years agoFix a small bug.
David Greene [Thu, 19 Nov 2009 19:09:39 +0000 (19:09 +0000)]
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

15 years agoEnable hoisting of loads from constant memory by default. In cases where
Dan Gohman [Thu, 19 Nov 2009 19:00:10 +0000 (19:00 +0000)]
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

15 years agoUse StringRef::min instead of std::min.
Daniel Dunbar [Thu, 19 Nov 2009 18:53:18 +0000 (18:53 +0000)]
Use StringRef::min instead of std::min.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89372 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix typo
Jim Grosbach [Thu, 19 Nov 2009 18:23:19 +0000 (18:23 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89369 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTableGen/OptParser: When ordering options, make "sentinel" options appear before
Daniel Dunbar [Thu, 19 Nov 2009 18:22:16 +0000 (18:22 +0000)]
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

15 years agoTrailing whitespace.
Mikhail Glushenkov [Thu, 19 Nov 2009 17:29:36 +0000 (17:29 +0000)]
Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89364 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake example/Hello compile again.
Mikhail Glushenkov [Thu, 19 Nov 2009 17:29:25 +0000 (17:29 +0000)]
Make example/Hello compile again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89363 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a typo in a comment.
Dan Gohman [Thu, 19 Nov 2009 16:35:11 +0000 (16:35 +0000)]
Fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89360 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agocstdlib is not automatically included with StringRef anymore.
Benjamin Kramer [Thu, 19 Nov 2009 16:08:04 +0000 (16:08 +0000)]
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

15 years agoReenable Split2 StringRef test with Apple gcc.
Benjamin Kramer [Thu, 19 Nov 2009 16:04:41 +0000 (16:04 +0000)]
Reenable Split2 StringRef test with Apple gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89357 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for spreading register allocation.
David Greene [Thu, 19 Nov 2009 15:55:49 +0000 (15:55 +0000)]
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

15 years agoRemove the now obsolete algorithm include from StringRef.h.
Benjamin Kramer [Thu, 19 Nov 2009 15:48:14 +0000 (15:48 +0000)]
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

15 years agoWorkaround PR5482, because all the gcc versions that I had were miscompiling StringRef:
Torok Edwin [Thu, 19 Nov 2009 15:39:50 +0000 (15:39 +0000)]
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

15 years agoUnbreak x64 MSVC build. Patch by Nicolas Capens!
Benjamin Kramer [Thu, 19 Nov 2009 12:17:31 +0000 (12:17 +0000)]
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

15 years agoAdd PS3 Triple class, Credit to John Thompson.
Edward O'Callaghan [Thu, 19 Nov 2009 11:59:00 +0000 (11:59 +0000)]
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

15 years ago80 col violation.
Evan Cheng [Thu, 19 Nov 2009 08:16:50 +0000 (08:16 +0000)]
80 col violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89337 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUnbreak test, Bruno please check.
Daniel Dunbar [Thu, 19 Nov 2009 07:18:49 +0000 (07:18 +0000)]
Unbreak test, Bruno please check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89329 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore consistent thumb1 asm printing.
Evan Cheng [Thu, 19 Nov 2009 06:57:41 +0000 (06:57 +0000)]
More consistent thumb1 asm printing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89328 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoShrink ldr / str [sp, imm0-1024] to 16-bit instructions.
Evan Cheng [Thu, 19 Nov 2009 06:32:27 +0000 (06:32 +0000)]
Shrink ldr / str [sp, imm0-1024] to 16-bit instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89326 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEliminate more * 4 in Thumb1 asm printing for consistency sake.
Evan Cheng [Thu, 19 Nov 2009 06:31:26 +0000 (06:31 +0000)]
Eliminate more * 4 in Thumb1 asm printing for consistency sake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89325 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Add sugregister logic to handle f64=(f32,f32).
Bruno Cardoso Lopes [Thu, 19 Nov 2009 06:06:13 +0000 (06:06 +0000)]
- Add sugregister logic to handle f64=(f32,f32).
- Support mips1 like load/store of doubles:

Instead of:
  sdc $f0, X($3)
Generate:
  swc $f0, X($3)
  swc $f1, X+4($3)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89322 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOnly use small sections for non linux targets!
Bruno Cardoso Lopes [Thu, 19 Nov 2009 05:28:18 +0000 (05:28 +0000)]
Only use small sections for non linux targets!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89316 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded a new Spiller implementation which wraps LiveIntervals::addIntervalsForSpills.
Lang Hames [Thu, 19 Nov 2009 04:15:33 +0000 (04:15 +0000)]
Added a new Spiller implementation which wraps LiveIntervals::addIntervalsForSpills.
All spiller calls in RegAllocLinearScan now go through the new Spiller interface.
The "-new-spill-framework" command line option has been removed. To use the trivial in-place spiller you should now pass "-spiller=trivial -rewriter=trivial".
(Note the trivial spiller/rewriter are only meant to serve as examples of the new in-place modification work. Enabling them will yield terrible, though hopefully functional, code).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89311 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoautoconf config.* claims to not know about auroraux triple.
Edward O'Callaghan [Thu, 19 Nov 2009 02:25:50 +0000 (02:25 +0000)]
autoconf config.* claims to not know about auroraux triple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89301 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach IVUsers to keep things simpler and track loop-invariant strides only
Jim Grosbach [Thu, 19 Nov 2009 02:05:44 +0000 (02:05 +0000)]
Teach IVUsers to keep things simpler and track loop-invariant strides only
for uses inside the loop. This works better with LSR. Disabled behind
-simplify-iv-users while benchmarking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89299 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEliminate duplicate phi nodes in loops. Loop rotation, for example, can introduce...
Jim Grosbach [Thu, 19 Nov 2009 02:03:18 +0000 (02:03 +0000)]
Eliminate duplicate phi nodes in loops. Loop rotation, for example, can introduce these, and it's beneficial to later passes to clean them up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89298 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake EliminateDuplicatePHINodes() available as a utility function
Jim Grosbach [Thu, 19 Nov 2009 02:02:10 +0000 (02:02 +0000)]
Make EliminateDuplicatePHINodes() available as a utility function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89297 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTest from Dhrystone to make sure that we're not emitting an aligned load for a
Bill Wendling [Thu, 19 Nov 2009 01:33:57 +0000 (01:33 +0000)]
Test from Dhrystone to make sure that we're not emitting an aligned load for a
string that's aligned at 8-bytes instead of 16-bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89295 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd TOOLALIAS makefile variable; this defines an alternate name for a program
Daniel Dunbar [Thu, 19 Nov 2009 00:14:53 +0000 (00:14 +0000)]
Add TOOLALIAS makefile variable; this defines an alternate name for a program
which the makefiles will create by symlinking the actual tool to.
 - For use by clang, where we want to make 'clang++' and alias for clang (which
   enables C++ support in the driver)

 - Not sure this is the best approach, alternative suggestions welcome!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89282 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe "ReadOnlyWithRel" enum seems to apply more to what Darwin does with the EH
Bill Wendling [Thu, 19 Nov 2009 00:09:14 +0000 (00:09 +0000)]
The "ReadOnlyWithRel" enum seems to apply more to what Darwin does with the EH
exception table than DataRel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89279 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTwine: Stores kinds as uchar instead of bitfield to be friendlier to the
Daniel Dunbar [Thu, 19 Nov 2009 00:04:43 +0000 (00:04 +0000)]
Twine: Stores kinds as uchar instead of bitfield to be friendlier to the
optimizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89278 91177308-0d34-0410-b5e6-96231b3b80d8