oota-llvm.git
14 years agoAs a temporary workaround for post-RA not handling DebugValue instructions,
Bob Wilson [Sat, 17 Apr 2010 00:49:11 +0000 (00:49 +0000)]
As a temporary workaround for post-RA not handling DebugValue instructions,
just remove them all.  Radar 7873207 (working around the root problem of
Radar 7759363).

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

14 years agoRevert "Use a simpler data structure to calculate the least recently used register...
Jakob Stoklund Olesen [Sat, 17 Apr 2010 00:38:36 +0000 (00:38 +0000)]
Revert "Use a simpler data structure to calculate the least recently used register in RegAllocLocal."

This reverts commit 101392. It broke a buildbot.

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

14 years agoReapply 101503+101520. These are "obviously correct" [Chris]
Dale Johannesen [Sat, 17 Apr 2010 00:08:21 +0000 (00:08 +0000)]
Reapply 101503+101520.  These are "obviously correct" [Chris]
and don't cause any problems on Darwin.

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

14 years agodisable r101565: an assert is getting triggered. More lurking badness no doubt.
Chris Lattner [Sat, 17 Apr 2010 00:05:36 +0000 (00:05 +0000)]
disable r101565: an assert is getting triggered.  More lurking badness no doubt.

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

14 years agoadd a note
Chris Lattner [Fri, 16 Apr 2010 23:52:30 +0000 (23:52 +0000)]
add a note

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

14 years agoRevert 101465, it broke internal OpenGL testing.
Eric Christopher [Fri, 16 Apr 2010 23:37:20 +0000 (23:37 +0000)]
Revert 101465, it broke internal OpenGL testing.

Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.

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

14 years agoAdd support to emit dwarf ranges.
Devang Patel [Fri, 16 Apr 2010 23:33:45 +0000 (23:33 +0000)]
Add support to emit dwarf ranges.

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

14 years agoUse a simpler data structure to calculate the least recently used register in RegAllo...
Jakob Stoklund Olesen [Fri, 16 Apr 2010 23:32:37 +0000 (23:32 +0000)]
Use a simpler data structure to calculate the least recently used register in RegAllocLocal.

This makes the local register allocator about 20% faster.

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

14 years agoCast to (uint64_t) instead of relying on the "ul" suffix.
Johnny Chen [Fri, 16 Apr 2010 23:30:28 +0000 (23:30 +0000)]
Cast to (uint64_t) instead of relying on the "ul" suffix.

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

14 years agoAdd a getSelectionDAGInfo member to TargetMachine.
Dan Gohman [Fri, 16 Apr 2010 23:09:10 +0000 (23:09 +0000)]
Add a getSelectionDAGInfo member to TargetMachine.

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

14 years agoupdate docs for api change.
Chris Lattner [Fri, 16 Apr 2010 23:07:44 +0000 (23:07 +0000)]
update docs for api change.

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

14 years agobuilding on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager
Chris Lattner [Fri, 16 Apr 2010 23:04:30 +0000 (23:04 +0000)]
building on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager
to keep the node entries in scc_iterator up to date instead of dangling as
the SCC mutates.

This is a really terrible problem which was causing -g to affect codegen
because it would permute the memory image of the compiler process.

Thanks to Dale for expertly hunting it down.

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

14 years agoAdd skeleton target-specific SelectionDAGInfo files.
Dan Gohman [Fri, 16 Apr 2010 23:04:22 +0000 (23:04 +0000)]
Add skeleton target-specific SelectionDAGInfo files.

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

14 years agoFixed logic error. Should check Builder for validity before calling SetSession
Johnny Chen [Fri, 16 Apr 2010 23:02:25 +0000 (23:02 +0000)]
Fixed logic error.  Should check Builder for validity before calling SetSession
on it.

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

14 years agomove ReplaceNode out of line, rename scc_iterator::fini -> isAtEnd().
Chris Lattner [Fri, 16 Apr 2010 22:59:24 +0000 (22:59 +0000)]
move ReplaceNode out of line, rename scc_iterator::fini -> isAtEnd().

No functionality change.

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

14 years agoRegenerate configure script.
Dan Gohman [Fri, 16 Apr 2010 22:59:06 +0000 (22:59 +0000)]
Regenerate configure script.

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

14 years agoAdd an autoconf check for -retain-symbols-file and conditionalize
Dan Gohman [Fri, 16 Apr 2010 22:58:15 +0000 (22:58 +0000)]
Add an autoconf check for -retain-symbols-file and conditionalize
use of that option with it. This eliminates an imprecise "Linux"
test, and should help support old versions of gold.

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

14 years agoMinor change to make the test case comply with Vd<0> == '0' when Q == '1'.
Johnny Chen [Fri, 16 Apr 2010 22:48:31 +0000 (22:48 +0000)]
Minor change to make the test case comply with Vd<0> == '0' when Q == '1'.

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

14 years agointroduce a new CallGraphSCC class, and pass it around
Chris Lattner [Fri, 16 Apr 2010 22:42:17 +0000 (22:42 +0000)]
introduce a new CallGraphSCC class, and pass it around
to CallGraphSCCPass's instead of passing around a
std::vector<CallGraphNode*>.  No functionality change,
but now we have a much tidier interface.

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

14 years agoFixed a bug in DisassembleN1RegModImmFrm() where a break stmt was missing for a
Johnny Chen [Fri, 16 Apr 2010 22:40:20 +0000 (22:40 +0000)]
Fixed a bug in DisassembleN1RegModImmFrm() where a break stmt was missing for a
case.  Also, the 0xFF hex literal involved in the shift for ESize64 should be
suffixed "ul" to preserve the shift result.

Implemented printHex*ImmOperand() by copying from ARMAsmPrinter.cpp and added a
test case for DisassembleN1RegModImmFrm()/printHex64ImmOperand().

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

14 years ago(i32 sext_in_reg (i32 aext (i16 x)), i16) -> (i32 sext x). No known test case until...
Evan Cheng [Fri, 16 Apr 2010 22:26:19 +0000 (22:26 +0000)]
(i32 sext_in_reg (i32 aext (i16 x)), i16) -> (i32 sext x). No known test case until -promote-16bit is enabled.

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

14 years agotidy up
Chris Lattner [Fri, 16 Apr 2010 21:57:10 +0000 (21:57 +0000)]
tidy up

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

14 years agomove PrintCallGraphPass out of the middle of CGPassManager.
Chris Lattner [Fri, 16 Apr 2010 21:43:55 +0000 (21:43 +0000)]
move PrintCallGraphPass out of the middle of CGPassManager.

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

14 years agoadd a missing break back, patch by Nico Schmidt!
Chris Lattner [Fri, 16 Apr 2010 21:15:15 +0000 (21:15 +0000)]
add a missing break back, patch by Nico Schmidt!

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

14 years agoCreate a new TargetSelectionDAGInfo class. This will eventually acquire
Dan Gohman [Fri, 16 Apr 2010 21:12:11 +0000 (21:12 +0000)]
Create a new TargetSelectionDAGInfo class. This will eventually acquire
SelectionDAG-specific parts of TargetLowering.

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

14 years agoCommit this, which should have accompanied 101531.
Dan Gohman [Fri, 16 Apr 2010 20:22:43 +0000 (20:22 +0000)]
Commit this, which should have accompanied 101531.

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

14 years agoEliminate an unnecessary SelectionDAG dependency in getOptimalMemOpType.
Dan Gohman [Fri, 16 Apr 2010 20:11:05 +0000 (20:11 +0000)]
Eliminate an unnecessary SelectionDAG dependency in getOptimalMemOpType.

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

14 years agoFix this code to avoid implicit assumptions about the length of the array.
Dan Gohman [Fri, 16 Apr 2010 20:08:45 +0000 (20:08 +0000)]
Fix this code to avoid implicit assumptions about the length of the array.

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

14 years agoIn the same spirit of r101524, which removed the assert() from printAddrMode2OffsetOp...
Johnny Chen [Fri, 16 Apr 2010 19:57:21 +0000 (19:57 +0000)]
In the same spirit of r101524, which removed the assert() from printAddrMode2OffsetOperand(),
this patch removes the assert() from printAddrMode3OffsetOperand() and adds a test case.

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

14 years agoRevert 101520, which depended on 101503, which was reverted.
Dan Gohman [Fri, 16 Apr 2010 19:36:41 +0000 (19:36 +0000)]
Revert 101520, which depended on 101503, which was reverted.

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

14 years agoMulticlass LdStCop was using pre-UAL syntax LDC<c>L for the L fragment. Changed
Johnny Chen [Fri, 16 Apr 2010 19:33:23 +0000 (19:33 +0000)]
Multiclass LdStCop was using pre-UAL syntax LDC<c>L for the L fragment.  Changed
to the UAL syntax of LDCL<c>, instead.

Add a test case for this change which also tests the removal of assert() from
printAddrMode2OffsetOperand().

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

14 years agoRevert commit 101503 (johannes), in the hope of fixing the dragonegg build,
Duncan Sands [Fri, 16 Apr 2010 19:28:59 +0000 (19:28 +0000)]
Revert commit 101503 (johannes), in the hope of fixing the dragonegg build,
see http://google1.osuosl.org:8011/builders/dragonegg-x86_64-linux/builds/693
Original commit text:
Use a ValueMap not a std::map for the reason indicated
in the comment.  This was causing nondeterministic changes
in inlining decisions.

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

14 years agoRemove the assert() from printAddrMode2OffsetOperand(). "#0 and #-0" are
Johnny Chen [Fri, 16 Apr 2010 19:10:52 +0000 (19:10 +0000)]
Remove the assert() from printAddrMode2OffsetOperand().  "#0 and #-0" are
considered legal instructions.

Refs: A8.6.51 LDC, LDC2 (immediate) -- page A8-107, A8.6.58 LDR (immediate, ARM)
-- page A8-121, and A8.6.194 STR (immediate, ARM) -- page A8-395.

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

14 years agoTrim a #include.
Dan Gohman [Fri, 16 Apr 2010 18:45:11 +0000 (18:45 +0000)]
Trim a #include.

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

14 years agoRevert r101455, which fails on the llvm-arm-linux buildbot.
Dan Gohman [Fri, 16 Apr 2010 18:37:31 +0000 (18:37 +0000)]
Revert r101455, which fails on the llvm-arm-linux buildbot.

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

14 years agoUse a ValueMap not a std::map for the reason indicated
Dale Johannesen [Fri, 16 Apr 2010 18:16:08 +0000 (18:16 +0000)]
Use a ValueMap not a std::map for the reason indicated
in the comment.  This was causing nondeterministic changes
in inlining decisions.

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

14 years ago80 col.
Evan Cheng [Fri, 16 Apr 2010 17:58:41 +0000 (17:58 +0000)]
80 col.

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

14 years ago80 col.
Evan Cheng [Fri, 16 Apr 2010 17:57:59 +0000 (17:57 +0000)]
80 col.

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

14 years agoAvoid creating virtual registers for unused values.
Dan Gohman [Fri, 16 Apr 2010 17:15:02 +0000 (17:15 +0000)]
Avoid creating virtual registers for unused values.

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

14 years agoFix an assertion string.
Dan Gohman [Fri, 16 Apr 2010 16:55:18 +0000 (16:55 +0000)]
Fix an assertion string.

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

14 years agoFix a comment.
Dan Gohman [Fri, 16 Apr 2010 16:52:37 +0000 (16:52 +0000)]
Fix a comment.

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

14 years agoDisable inlining of recursive calls. It can complicate tailcallelim and
Dan Gohman [Fri, 16 Apr 2010 16:01:18 +0000 (16:01 +0000)]
Disable inlining of recursive calls. It can complicate tailcallelim and
dependent analyses, and increase code size, so doing it profitably would
require more complex heuristics.

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

14 years agoRefine the detection of seemingly infinitely recursive calls where the
Dan Gohman [Fri, 16 Apr 2010 15:57:50 +0000 (15:57 +0000)]
Refine the detection of seemingly infinitely recursive calls where the
callee is expected to be expanded to something else by codegen, so that
normal infinitely recursive calls are still transformed.

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

14 years agoreapply r101434
Gabor Greif [Fri, 16 Apr 2010 15:33:14 +0000 (15:33 +0000)]
reapply r101434
with a fix for self-hosting

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary

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

14 years agoMake callIsSmall accessible as a utility function.
Dan Gohman [Fri, 16 Apr 2010 15:14:50 +0000 (15:14 +0000)]
Make callIsSmall accessible as a utility function.

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

14 years agoFix SCEVCommutativeExpr::print to be robust in the case of improper
Dan Gohman [Fri, 16 Apr 2010 15:03:25 +0000 (15:03 +0000)]
Fix SCEVCommutativeExpr::print to be robust in the case of improper
expression canonicalization. Its job is to print what's there, not to
make judgements about it.

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

14 years agoDelete a blank line.
Dan Gohman [Fri, 16 Apr 2010 13:32:55 +0000 (13:32 +0000)]
Delete a blank line.

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

14 years agoAdd Debug+Coverage to more svn:ignore properties.
Dan Gohman [Fri, 16 Apr 2010 13:29:35 +0000 (13:29 +0000)]
Add Debug+Coverage to more svn:ignore properties.

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

14 years agoAdd JIT exception handling test.
Bill Wendling [Fri, 16 Apr 2010 09:04:28 +0000 (09:04 +0000)]
Add JIT exception handling test.

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

14 years agoThe JIT calls TidyLandingPads to tidy up the landing pads. However, because the
Bill Wendling [Fri, 16 Apr 2010 08:46:10 +0000 (08:46 +0000)]
The JIT calls TidyLandingPads to tidy up the landing pads. However, because the
JIT doesn't use the MC back-end asm printer to emit labels that it uses, the
section for the MCSymbol is never set. And thus the MCSymbol for the EH label
isn't marked as "defined". Because of that, TidyLandingPads removes the needed
landing pads from the JIT output. This breaks EH for every JIT program.

This is a work-around for this limitation. We pass in the label locations
map. If the label has a non-zero value, then it was "emitted" by the JIT and
TidyLandingPads shouldn't remove that label.

A nicer solution would be to mark the MCSymbol as "used" by the JIT and not rely
upon the section being set to determine if it's defined or not.

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

14 years agocompleted my pass over all 6+ months of commits, next step, format and make comprehen...
Chris Lattner [Fri, 16 Apr 2010 06:20:22 +0000 (06:20 +0000)]
completed my pass over all 6+ months of commits, next step, format and make comprehendable.

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

14 years agoAdding support for dag combiner to promote operations for profit. This requires targe...
Evan Cheng [Fri, 16 Apr 2010 06:14:10 +0000 (06:14 +0000)]
Adding support for dag combiner to promote operations for profit. This requires target specific queries. For example, x86 should promote i16 to i32 when it does not impact load folding.
x86 support is off by default. It can be enabled with -promote-16bit.

Work in progress.

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

14 years agoUse getAL() rather than a major constant.
Evan Cheng [Fri, 16 Apr 2010 05:46:06 +0000 (05:46 +0000)]
Use getAL() rather than a major constant.

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

14 years agoAdd Debug+Coverage and friends to svn:ignore properties.
Dan Gohman [Fri, 16 Apr 2010 05:31:57 +0000 (05:31 +0000)]
Add Debug+Coverage and friends to svn:ignore properties.

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

14 years agoAdd a check for posix_spawn.
Eric Christopher [Fri, 16 Apr 2010 05:14:21 +0000 (05:14 +0000)]
Add a check for posix_spawn.

Regenerate configure and other autoconf files.

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

14 years agoRefine further the scope where the global DebugLoc value is active.
Dan Gohman [Fri, 16 Apr 2010 05:06:56 +0000 (05:06 +0000)]
Refine further the scope where the global DebugLoc value is active.

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

14 years agoRevert r64616 which worked around http://gcc.gnu.org/PR42757 , we just didn't
Nick Lewycky [Fri, 16 Apr 2010 04:32:20 +0000 (04:32 +0000)]
Revert r64616 which worked around gcc.gnu.org/PR42757 , we just didn't
know it at the time.

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

14 years agoSilence an unused variable warning.
Eric Christopher [Fri, 16 Apr 2010 04:02:04 +0000 (04:02 +0000)]
Silence an unused variable warning.

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

14 years agofix comment noticed by Bob
Chris Lattner [Fri, 16 Apr 2010 02:32:17 +0000 (02:32 +0000)]
fix comment noticed by Bob

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

14 years agoback out r101423 and r101397, they break llvm-gcc self-host on darwin10
Gabor Greif [Fri, 16 Apr 2010 01:16:20 +0000 (01:16 +0000)]
back out r101423 and r101397, they break llvm-gcc self-host on darwin10

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

14 years agomove comment.
Chris Lattner [Fri, 16 Apr 2010 01:05:52 +0000 (01:05 +0000)]
move comment.

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

14 years agofix PR6832: we were using the alignment of a pointer when we
Chris Lattner [Fri, 16 Apr 2010 01:05:38 +0000 (01:05 +0000)]
fix PR6832: we were using the alignment of a pointer when we
wanted the alignment of the pointee.

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

14 years agoCreate an exports file, so that the plugin only exports the onload symbol.
Dan Gohman [Fri, 16 Apr 2010 00:43:25 +0000 (00:43 +0000)]
Create an exports file, so that the plugin only exports the onload symbol.

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

14 years agoMake things static that don't need to be referenced from outside the file.
Dan Gohman [Fri, 16 Apr 2010 00:42:57 +0000 (00:42 +0000)]
Make things static that don't need to be referenced from outside the file.

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

14 years agoimprove comments.
Chris Lattner [Fri, 16 Apr 2010 00:38:19 +0000 (00:38 +0000)]
improve comments.

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

14 years agoAdd an svn:ignore.
Dan Gohman [Fri, 16 Apr 2010 00:26:43 +0000 (00:26 +0000)]
Add an svn:ignore.

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

14 years agopull all the ConvertToScalarInfo code together into one
Chris Lattner [Fri, 16 Apr 2010 00:24:57 +0000 (00:24 +0000)]
pull all the ConvertToScalarInfo code together into one
place.

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

14 years agomore refactoring: suck some stuff out of SRoA into
Chris Lattner [Fri, 16 Apr 2010 00:20:00 +0000 (00:20 +0000)]
more refactoring: suck some stuff out of SRoA into
ConvertToScalarInfo.

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

14 years agoshift intrinsic operand
Gabor Greif [Fri, 16 Apr 2010 00:06:45 +0000 (00:06 +0000)]
shift intrinsic operand

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

14 years agointroduce a new ConvertToScalarInfo struct to simplify
Chris Lattner [Thu, 15 Apr 2010 23:50:26 +0000 (23:50 +0000)]
introduce a new ConvertToScalarInfo struct to simplify
CanConvertToScalar/MergeInType.  Eliminate a pointless
LLVMContext argument to MergeInType.

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

14 years agoAvoid sinking machine instructions into a loop.
Jakob Stoklund Olesen [Thu, 15 Apr 2010 23:41:02 +0000 (23:41 +0000)]
Avoid sinking machine instructions into a loop.

MachineLoopInfo is already available when MachineSinking runs, so the check is
free.

There is no test case because it would require a critical edge into a loop, and
CodeGenPrepare splits those. This check is just to be extra careful.

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

14 years agoAdded another test case for am3offset operand, testing Rn, #+/-imm8.
Johnny Chen [Thu, 15 Apr 2010 23:23:40 +0000 (23:23 +0000)]
Added another test case for am3offset operand, testing Rn, #+/-imm8.
Previous checkin tested Rn, #+/-Rm.

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

14 years agoAdd test case for machine-sink on critical edges
Jakob Stoklund Olesen [Thu, 15 Apr 2010 23:19:16 +0000 (23:19 +0000)]
Add test case for machine-sink on critical edges

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

14 years agoFixed a bug in ARM disassembly where LDRSBT should have am3offset operand, not
Johnny Chen [Thu, 15 Apr 2010 23:12:47 +0000 (23:12 +0000)]
Fixed a bug in ARM disassembly where LDRSBT should have am3offset operand, not
am2offset.  Modified the instruction table entry and added a new test case.

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

14 years agoMake the export files absolute paths, and change Makefile.rules
Dan Gohman [Thu, 15 Apr 2010 23:08:00 +0000 (23:08 +0000)]
Make the export files absolute paths, and change Makefile.rules
to expect them this way, to fix srcdir!=objdir builds.

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

14 years agoAdd a dependency on the .dir file to make sure that the directory
Dan Gohman [Thu, 15 Apr 2010 22:46:27 +0000 (22:46 +0000)]
Add a dependency on the .dir file to make sure that the directory
is created before the native exports file is built in a parallel build.

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

14 years agoUse default lowering of DYNAMIC_STACKALLOC. As far as I can tell, ARM isle is doing...
Evan Cheng [Thu, 15 Apr 2010 22:20:34 +0000 (22:20 +0000)]
Use default lowering of DYNAMIC_STACKALLOC. As far as I can tell, ARM isle is doing the right thing and codegen looks correct for both Thumb and Thumb2.

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

14 years agotidy interface to isOnlyCopiedFromConstantGlobal
Chris Lattner [Thu, 15 Apr 2010 21:59:20 +0000 (21:59 +0000)]
tidy interface to isOnlyCopiedFromConstantGlobal

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

14 years agoDon't use absolute path for EXPORTED_SYMBOL_FILE, this breaks under the new
Daniel Dunbar [Thu, 15 Apr 2010 21:57:43 +0000 (21:57 +0000)]
Don't use absolute path for EXPORTED_SYMBOL_FILE, this breaks under the new
system.

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

14 years agoGeneralize the EXPORTED_SYMBOL_FILE concept in the Makefiles to work with
Dan Gohman [Thu, 15 Apr 2010 20:54:25 +0000 (20:54 +0000)]
Generalize the EXPORTED_SYMBOL_FILE concept in the Makefiles to work with
native linking export files, including running sed to prepend underscores
on darwin, and make use of it in libLTO and libEnhancedDisassembly.

Remove the leading underscores from library export files so that they
work with the new EXPORTED_SYMBOL_FILE support.

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

14 years agozap mergeinfo
Gabor Greif [Thu, 15 Apr 2010 20:52:17 +0000 (20:52 +0000)]
zap mergeinfo

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

14 years agoreapply r101364, which has been backed out in r101368
Gabor Greif [Thu, 15 Apr 2010 20:51:13 +0000 (20:51 +0000)]
reapply r101364, which has been backed out in r101368
with a fix

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary

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

14 years agoPointed out by housel on #llvm.
Duncan Sands [Thu, 15 Apr 2010 20:35:54 +0000 (20:35 +0000)]
Pointed out by housel on #llvm.

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

14 years agoFix PR6847. RegScavenger should ignore DebugValues.
Jakob Stoklund Olesen [Thu, 15 Apr 2010 20:28:39 +0000 (20:28 +0000)]
Fix PR6847. RegScavenger should ignore DebugValues.

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

14 years agoMake sure the initialization of a GC root is after its definition.
Nicolas Geoffray [Thu, 15 Apr 2010 19:53:35 +0000 (19:53 +0000)]
Make sure the initialization of a GC root is after its definition.

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

14 years agoRevert r100896 and around - this breaks the only mingw32 buildbot we have.
Anton Korobeynikov [Thu, 15 Apr 2010 19:51:42 +0000 (19:51 +0000)]
Revert r100896 and around - this breaks the only mingw32 buildbot we have.

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

14 years agoprune includes
Gabor Greif [Thu, 15 Apr 2010 19:44:21 +0000 (19:44 +0000)]
prune includes

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

14 years agoARM SelectDYN_ALLOC should emit a copy from SP rather than referencing SP directly...
Evan Cheng [Thu, 15 Apr 2010 18:42:28 +0000 (18:42 +0000)]
ARM SelectDYN_ALLOC should emit a copy from SP rather than referencing SP directly. In cases where there are two dyn_alloc in the same BB it would have caused the old SP value to be reused and badness ensues. rdar://7493908

llvm is generating poor code for dynamic alloca, I'll fix that later.

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

14 years agoDEBUG() print out "Unknown format" msg.
Johnny Chen [Thu, 15 Apr 2010 18:13:51 +0000 (18:13 +0000)]
DEBUG() print out "Unknown format" msg.

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

14 years agoReuseFrameIndexVals is used in multiple files, so it can't be static.
Dan Gohman [Thu, 15 Apr 2010 17:34:58 +0000 (17:34 +0000)]
ReuseFrameIndexVals is used in multiple files, so it can't be static.

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

14 years agoEnablePPC64RS and EnablePPC32RS are used in multiple files, so they
Dan Gohman [Thu, 15 Apr 2010 17:20:57 +0000 (17:20 +0000)]
EnablePPC64RS and EnablePPC32RS are used in multiple files, so they
can't be static.

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

14 years agoFix a bunch of namespace polution.
Dan Gohman [Thu, 15 Apr 2010 17:08:50 +0000 (17:08 +0000)]
Fix a bunch of namespace polution.

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

14 years agoFix namespace polution.
Dan Gohman [Thu, 15 Apr 2010 16:23:27 +0000 (16:23 +0000)]
Fix namespace polution.

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

14 years agoMake getPredecessorWithUniqueSuccessorForBB return the unique successor
Dan Gohman [Thu, 15 Apr 2010 16:19:08 +0000 (16:19 +0000)]
Make getPredecessorWithUniqueSuccessorForBB return the unique successor
in addition to the predecessor.

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

14 years agotypos
Gabor Greif [Thu, 15 Apr 2010 15:14:46 +0000 (15:14 +0000)]
typos

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

14 years agoback out r101364, as it trips the linux nightlybot on some clang C++ tests
Gabor Greif [Thu, 15 Apr 2010 12:46:56 +0000 (12:46 +0000)]
back out r101364, as it trips the linux nightlybot on some clang C++ tests

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

14 years agozap mergeinfo
Gabor Greif [Thu, 15 Apr 2010 11:36:12 +0000 (11:36 +0000)]
zap mergeinfo

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

14 years agoSimplify ".bc" detection.
Benjamin Kramer [Thu, 15 Apr 2010 11:33:14 +0000 (11:33 +0000)]
Simplify ".bc" detection.

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

14 years agorotate CallInst operands, i.e. move callee to the back
Gabor Greif [Thu, 15 Apr 2010 10:49:53 +0000 (10:49 +0000)]
rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary

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

14 years agoenhance the load/store narrowing optimization to handle a
Chris Lattner [Thu, 15 Apr 2010 06:10:49 +0000 (06:10 +0000)]
enhance the load/store narrowing optimization to handle a
tokenfactor in between the load/store.  This allows us to
optimize test7 into:

_test7:                                 ## @test7
## BB#0:                                ## %entry
movl (%rdx), %eax
                                        ## kill: SIL<def> ESI<kill>
movb %sil, 5(%rdi)
ret

instead of:

_test7:                                 ## @test7
## BB#0:                                ## %entry
movl 4(%esp), %ecx
movl $-65281, %eax           ## imm = 0xFFFFFFFFFFFF00FF
andl 4(%ecx), %eax
movzbl 8(%esp), %edx
shll $8, %edx
addl %eax, %edx
movl 12(%esp), %eax
movl (%eax), %eax
movl %edx, 4(%ecx)
ret

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