oota-llvm.git
16 years agoReally disable PRE.
Owen Anderson [Fri, 20 Jun 2008 08:59:13 +0000 (08:59 +0000)]
Really disable PRE.

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

16 years ago"Just a small update for the project files for adding a missing preprocessor
Chris Lattner [Fri, 20 Jun 2008 05:35:58 +0000 (05:35 +0000)]
"Just a small update for the project files for adding a missing preprocessor
definition for VS2005 (without SP1). It suppress the (bogus) M$ deprecated
warning."

Patch by Cédric Venet!

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

16 years agoFix a warning, closing PR2452
Chris Lattner [Fri, 20 Jun 2008 05:33:29 +0000 (05:33 +0000)]
Fix a warning, closing PR2452

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

16 years agoFix a warning.
Chris Lattner [Fri, 20 Jun 2008 05:31:04 +0000 (05:31 +0000)]
Fix a warning.

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

16 years agoFix an error handling redefinition of linkonce functions where the
Chris Lattner [Fri, 20 Jun 2008 05:29:39 +0000 (05:29 +0000)]
Fix an error handling redefinition of linkonce functions where the
types differ.  Patch by Nathan Keynes!

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

16 years agofix a warning.
Chris Lattner [Fri, 20 Jun 2008 05:28:56 +0000 (05:28 +0000)]
fix a warning.

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

16 years agoFix PR2471, which is a bug involving an invalid promotion from a conditional load.
Chris Lattner [Fri, 20 Jun 2008 05:12:56 +0000 (05:12 +0000)]
Fix PR2471, which is a bug involving an invalid promotion from a conditional load.

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

16 years agoFix typo, fix suggested by Nicholas Olsen
Chris Lattner [Fri, 20 Jun 2008 05:03:17 +0000 (05:03 +0000)]
Fix typo, fix suggested by Nicholas Olsen

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

16 years agoAdd C binding for ExecutionEngine::addGlobalMapping.
Gordon Henriksen [Fri, 20 Jun 2008 02:16:11 +0000 (02:16 +0000)]
Add C binding for ExecutionEngine::addGlobalMapping.

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

16 years agoTeach ReturnInst lowering about aggregate return values.
Dan Gohman [Fri, 20 Jun 2008 01:29:26 +0000 (01:29 +0000)]
Teach ReturnInst lowering about aggregate return values.

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

16 years agoChange around the data structures used to store availability sets, resulting in a...
Owen Anderson [Fri, 20 Jun 2008 01:15:47 +0000 (01:15 +0000)]
Change around the data structures used to store availability sets, resulting in a GVN+PRE that is faster that GVN alone was before.

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

16 years agoTeach SCCP about insertvalue and extractvalue, and about
Dan Gohman [Fri, 20 Jun 2008 01:15:44 +0000 (01:15 +0000)]
Teach SCCP about insertvalue and extractvalue, and about
propagating constants across aggregate return values when
insertvalue and extractvalue are used.

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

16 years agoTeach InlineFunction how to differentiate between multiple-value
Dan Gohman [Fri, 20 Jun 2008 01:03:44 +0000 (01:03 +0000)]
Teach InlineFunction how to differentiate between multiple-value
return statements and aggregate returns so that it handles both
correctly.

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

16 years agoDisable PRE for now. It seems to be breaking llvm-gcc bootstrapping.
Evan Cheng [Fri, 20 Jun 2008 01:01:07 +0000 (01:01 +0000)]
Disable PRE for now. It seems to be breaking llvm-gcc bootstrapping.

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

16 years agoFix the index calculations for the extractvalue lowering code.
Dan Gohman [Fri, 20 Jun 2008 00:54:19 +0000 (00:54 +0000)]
Fix the index calculations for the extractvalue lowering code.

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

16 years agoSimplify the ComputeLinearIndex logic and fix a few bugs.
Dan Gohman [Fri, 20 Jun 2008 00:53:00 +0000 (00:53 +0000)]
Simplify the ComputeLinearIndex logic and fix a few bugs.

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

16 years agoIt's invalid to take the one-past-the-end address of a non-array
Dan Gohman [Fri, 20 Jun 2008 00:49:21 +0000 (00:49 +0000)]
It's invalid to take the one-past-the-end address of a non-array
object.

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

16 years agoSimplify this code. Thanks Chris!
Dan Gohman [Fri, 20 Jun 2008 00:47:44 +0000 (00:47 +0000)]
Simplify this code. Thanks Chris!

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

16 years agoISD::UNDEF should be expanded recursively / iteratively.
Evan Cheng [Thu, 19 Jun 2008 22:01:11 +0000 (22:01 +0000)]
ISD::UNDEF should be expanded recursively / iteratively.

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

16 years agoAdd a hidden -disable-pre flag for testing purposes. This should be removed
Owen Anderson [Thu, 19 Jun 2008 19:57:25 +0000 (19:57 +0000)]
Add a hidden -disable-pre flag for testing purposes.  This should be removed
once benchmarking is completed.

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

16 years agoPRE requires that critical edges be split.
Owen Anderson [Thu, 19 Jun 2008 19:54:19 +0000 (19:54 +0000)]
PRE requires that critical edges be split.

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

16 years agoRemove dead code causing a warning.
Bill Wendling [Thu, 19 Jun 2008 18:00:44 +0000 (18:00 +0000)]
Remove dead code causing a warning.

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

16 years agoUse the common API for adding instructions to basic blocks instead of
Dan Gohman [Thu, 19 Jun 2008 17:53:32 +0000 (17:53 +0000)]
Use the common API for adding instructions to basic blocks instead of
using BasicBlock::getInstList.

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

16 years agoBe sure to remove values from the value numbering table after we delete them.
Owen Anderson [Thu, 19 Jun 2008 17:53:26 +0000 (17:53 +0000)]
Be sure to remove values from the value numbering table after we delete them.
This fixes a failure on povray.

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

16 years agoUse Instruction::moveBefore instead of manipulating the instruction list
Dan Gohman [Thu, 19 Jun 2008 17:47:47 +0000 (17:47 +0000)]
Use Instruction::moveBefore instead of manipulating the instruction list
directly.

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

16 years agoAvoid using BasicBlock::getInstList directly in a few places.
Dan Gohman [Thu, 19 Jun 2008 17:37:25 +0000 (17:37 +0000)]
Avoid using BasicBlock::getInstList directly in a few places.

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

16 years agoRevert support for insertvalue and extractvalue instructions for the moment.
Owen Anderson [Thu, 19 Jun 2008 17:25:39 +0000 (17:25 +0000)]
Revert support for insertvalue and extractvalue instructions for the moment.
GVN expects that all inputs which to an instruction fall somewhere in the value
hierarchy, which isn't true for these.

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

16 years agoUse the transferSuccessors helper function.
Dan Gohman [Thu, 19 Jun 2008 17:22:29 +0000 (17:22 +0000)]
Use the transferSuccessors helper function.

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

16 years agoDelete dead code.
Dan Gohman [Thu, 19 Jun 2008 17:18:39 +0000 (17:18 +0000)]
Delete dead code.

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

16 years agoAdd an idx_iterator to the insertvalue and extractvalue instructions.
Owen Anderson [Thu, 19 Jun 2008 17:15:57 +0000 (17:15 +0000)]
Add an idx_iterator to the insertvalue and extractvalue instructions.

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

16 years agoThe inline keyword goes before the return type. This fixes a compiler warning.
Dan Gohman [Thu, 19 Jun 2008 16:16:06 +0000 (16:16 +0000)]
The inline keyword goes before the return type. This fixes a compiler warning.

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

16 years agoModify some ipconstprop tests to also test with invokes.
Matthijs Kooijman [Thu, 19 Jun 2008 09:27:44 +0000 (09:27 +0000)]
Modify some ipconstprop tests to also test with invokes.

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

16 years agoUse a CallSite to find the nth argument of a call/invoke instruction instead of
Matthijs Kooijman [Thu, 19 Jun 2008 08:53:24 +0000 (08:53 +0000)]
Use a CallSite to find the nth argument of a call/invoke instruction instead of
using getOperand() directly. This makes things work with invoke instructions as
well.

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

16 years agoFix some warnings reported by gcc-4.3. Hopefully
Duncan Sands [Thu, 19 Jun 2008 08:47:31 +0000 (08:47 +0000)]
Fix some warnings reported by gcc-4.3.  Hopefully
this still compiles on windows - I can't test!

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

16 years agoMissed a check.
Evan Cheng [Thu, 19 Jun 2008 06:17:19 +0000 (06:17 +0000)]
Missed a check.

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

16 years agoFix a bug with <8 x i16> shuffle lowering on X86 where parts of the
Eli Friedman [Thu, 19 Jun 2008 06:09:51 +0000 (06:09 +0000)]
Fix a bug with <8 x i16> shuffle lowering on X86 where parts of the
shuffle could be skipped.  The check is invalid because the loop index i
doesn't correspond to the element actually inserted. The correct check is
already done a few lines earlier, for whether the element is already in
the right spot, so this shouldn't have any effect on the codegen for
code that was already correct.

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

16 years agoRevert my last patch, which was causing regression test failures.
Owen Anderson [Thu, 19 Jun 2008 05:29:34 +0000 (05:29 +0000)]
Revert my last patch, which was causing regression test failures.

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

16 years agoNew test case.
Evan Cheng [Thu, 19 Jun 2008 01:50:24 +0000 (01:50 +0000)]
New test case.

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

16 years agoThis also got better (55 - 51 instructions). But doing one more re-materialization.
Evan Cheng [Thu, 19 Jun 2008 01:50:13 +0000 (01:50 +0000)]
This also got better (55 - 51 instructions). But doing one more re-materialization.

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

16 years agoThis got better.
Evan Cheng [Thu, 19 Jun 2008 01:46:43 +0000 (01:46 +0000)]
This got better.

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

16 years agoCoalesce copy from one register class to a sub register class. e.g. X86::MOV16to16_.
Evan Cheng [Thu, 19 Jun 2008 01:39:21 +0000 (01:39 +0000)]
Coalesce copy from one register class to a sub register class. e.g. X86::MOV16to16_.

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

16 years agoCosmetic changes.
Evan Cheng [Thu, 19 Jun 2008 01:21:26 +0000 (01:21 +0000)]
Cosmetic changes.

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

16 years agoUnneeded include's.
Evan Cheng [Thu, 19 Jun 2008 01:21:02 +0000 (01:21 +0000)]
Unneeded include's.

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

16 years agoMinor spiller tweak to unfavor reload into load/store instructions.
Evan Cheng [Thu, 19 Jun 2008 01:16:17 +0000 (01:16 +0000)]
Minor spiller tweak to unfavor reload into load/store instructions.

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

16 years agoInsert empty slots into the instruction numbering in live intervals, so that we can...
Owen Anderson [Thu, 19 Jun 2008 00:10:49 +0000 (00:10 +0000)]
Insert empty slots into the instruction numbering in live intervals, so that we can more easily
add new instructions.

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

16 years agoRemove this test until the corresponding patch is reapplied because it's causing...
Owen Anderson [Wed, 18 Jun 2008 22:37:31 +0000 (22:37 +0000)]
Remove this test until the corresponding patch is reapplied because it's causing make check to crash for some people.

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

16 years agoAdd support for extractvalue and insertvalue instructions in GVN.
Owen Anderson [Wed, 18 Jun 2008 21:59:00 +0000 (21:59 +0000)]
Add support for extractvalue and insertvalue instructions in GVN.

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

16 years agoAdd local PRE to GVN. This only operates in cases where it would not increase code...
Owen Anderson [Wed, 18 Jun 2008 21:41:49 +0000 (21:41 +0000)]
Add local PRE to GVN.  This only operates in cases where it would not increase code size, namely when the instantiated expression
would only need to be created in one predecessor.

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

16 years agoRefactor the way to get a string containing the features of the target.
Bill Wendling [Wed, 18 Jun 2008 21:39:02 +0000 (21:39 +0000)]
Refactor the way to get a string containing the features of the target.

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

16 years agoFix the source line debug information for the Windows platform.
Argyrios Kyrtzidis [Wed, 18 Jun 2008 19:27:37 +0000 (19:27 +0000)]
Fix the source line debug information for the Windows platform.

According to DWARF-2 specification, the line information is provided through an offset in the .debug_line section.
Replace the label reference that is used with a section offset.

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

16 years agoFix a missing comma spotted by Bram Geron.
Dan Gohman [Wed, 18 Jun 2008 18:42:13 +0000 (18:42 +0000)]
Fix a missing comma spotted by Bram Geron.

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

16 years agoFix the regressions on sext-misc.ll my patch yesterday caused.
Chris Lattner [Wed, 18 Jun 2008 18:11:55 +0000 (18:11 +0000)]
Fix the regressions on sext-misc.ll my patch yesterday caused.

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

16 years agoRevert r52459, which was causing an infinite loop or massive slowdown on MultiSource...
Owen Anderson [Wed, 18 Jun 2008 17:32:16 +0000 (17:32 +0000)]
Revert r52459, which was causing an infinite loop or massive slowdown on MultiSource/Applications/SPASS, and possibly others as well.
Please reapply once this is fixed.

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

16 years agoMove SCEVExpander::visitAddExpr out-of-line.
Dan Gohman [Wed, 18 Jun 2008 16:37:11 +0000 (16:37 +0000)]
Move SCEVExpander::visitAddExpr out-of-line.

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

16 years agoMove LSR's private isZero function to a public SCEV member
Dan Gohman [Wed, 18 Jun 2008 16:23:07 +0000 (16:23 +0000)]
Move LSR's private isZero function to a public SCEV member
function, and make use of it in several places.

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

16 years agofix validator warning
Gabor Greif [Wed, 18 Jun 2008 14:05:31 +0000 (14:05 +0000)]
fix validator warning

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

16 years agoprettify, no semantic changes
Gabor Greif [Wed, 18 Jun 2008 13:44:57 +0000 (13:44 +0000)]
prettify, no semantic changes

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

16 years agoRewrite the DeadArgumentElimination pass, to use a more explicit tracking of
Matthijs Kooijman [Wed, 18 Jun 2008 11:12:53 +0000 (11:12 +0000)]
Rewrite the DeadArgumentElimination pass, to use a more explicit tracking of
dependencies between return values and/or arguments. Also make the handling of
arguments and return values the same.

The pass now looks properly inside returned structs, but only at the first
level (ie, not inside nested structs).

Also add a testcase for testing various variations of (multiple) dead rerturn
values.

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

16 years agoReapply r52397 (make IPConstProp promote returned arguments), but fixed this
Matthijs Kooijman [Wed, 18 Jun 2008 08:30:37 +0000 (08:30 +0000)]
Reapply r52397 (make IPConstProp promote returned arguments), but fixed this
time. Sorry for the trouble!

This time, also add a testcase, which I should have done in the first place...

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

16 years agoXOR32rr, etc. are not AsCheapAsMove, but MOV32ri, etc. are.
Evan Cheng [Wed, 18 Jun 2008 08:13:07 +0000 (08:13 +0000)]
XOR32rr, etc. are not AsCheapAsMove, but MOV32ri, etc. are.

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

16 years agoReapply r52396, it was unrelated to the breakage (that was caused by r52397, my
Matthijs Kooijman [Wed, 18 Jun 2008 08:09:27 +0000 (08:09 +0000)]
Reapply r52396, it was unrelated to the breakage (that was caused by r52397, my
commit after this).

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

16 years agoComplete support for two-address pass rematerialization. Now *almost* always a win.
Evan Cheng [Wed, 18 Jun 2008 07:49:14 +0000 (07:49 +0000)]
Complete support for two-address pass rematerialization. Now *almost* always a win.

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

16 years agoAdd MachineRegisterInfo::use_empty.
Evan Cheng [Wed, 18 Jun 2008 07:47:55 +0000 (07:47 +0000)]
Add MachineRegisterInfo::use_empty.

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

16 years agoCosmetic.
Evan Cheng [Wed, 18 Jun 2008 07:47:28 +0000 (07:47 +0000)]
Cosmetic.

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

16 years agoIf compiling for PPC on an i386 box, the LTO wouldn't get the altivec (and
Bill Wendling [Wed, 18 Jun 2008 06:35:30 +0000 (06:35 +0000)]
If compiling for PPC on an i386 box, the LTO wouldn't get the altivec (and
other) feature information. The workaround is inelegant and could be cleaned up
if this information were available some other way (say, in the IR).

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

16 years agoimplement some simple bswap optimizations, rdar://5992453
Chris Lattner [Wed, 18 Jun 2008 04:33:20 +0000 (04:33 +0000)]
implement some simple bswap optimizations, rdar://5992453

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

16 years agotemporarily revert this testcase since its patch was reverted.
Chris Lattner [Wed, 18 Jun 2008 04:03:23 +0000 (04:03 +0000)]
temporarily revert this testcase since its patch was reverted.

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

16 years agomake truncate/sext elimination capable of changing phi's. This
Chris Lattner [Wed, 18 Jun 2008 04:00:49 +0000 (04:00 +0000)]
make truncate/sext elimination capable of changing phi's.  This
implements rdar://6013816 and the testcase in Transforms/InstCombine/sext-misc.ll.

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

16 years agoUnbreak DECLARE isel in pic mode.
Evan Cheng [Wed, 18 Jun 2008 02:48:27 +0000 (02:48 +0000)]
Unbreak DECLARE isel in pic mode.

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

16 years agoPreserve dominance frontier while trivially unswitching loop.
Devang Patel [Wed, 18 Jun 2008 02:16:38 +0000 (02:16 +0000)]
Preserve dominance frontier while trivially unswitching loop.

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

16 years agoCheck empty dominance frontier.
Devang Patel [Wed, 18 Jun 2008 02:12:09 +0000 (02:12 +0000)]
Check empty dominance frontier.

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

16 years agoAuto-upgrade code for multiple-value return statements. This code
Dan Gohman [Tue, 17 Jun 2008 23:38:43 +0000 (23:38 +0000)]
Auto-upgrade code for multiple-value return statements. This code
isn't actually called yet.

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

16 years agoIn InsertValueInst's copy ctor, actually copy the operands.
Dan Gohman [Tue, 17 Jun 2008 23:25:49 +0000 (23:25 +0000)]
In InsertValueInst's copy ctor, actually copy the operands.

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

16 years agoWe don't want to find dependencies within the same block in this case. It leads...
Owen Anderson [Tue, 17 Jun 2008 22:27:06 +0000 (22:27 +0000)]
We don't want to find dependencies within the same block in this case.  It leads to incorrect results because
we're detecting something at or after the call we're querying on.

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

16 years agoImplement the ExtractValueInst::getIndexedType that accepts one
Dan Gohman [Tue, 17 Jun 2008 21:07:55 +0000 (21:07 +0000)]
Implement the ExtractValueInst::getIndexedType that accepts one
index value.

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

16 years agoLive-through live interval is [mbb start, mbb end+1].
Evan Cheng [Tue, 17 Jun 2008 20:13:36 +0000 (20:13 +0000)]
Live-through live interval is [mbb start, mbb end+1].

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

16 years agoWhen extending a liveinterval by commuting, don't throw away the live ranges that...
Evan Cheng [Tue, 17 Jun 2008 20:11:16 +0000 (20:11 +0000)]
When extending a liveinterval by commuting, don't throw away the live ranges that are not affected.

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

16 years agoConsistently set "Buckets[NumBuckets] = reinterpret_cast<void*>(-1)" throughout Foldi...
Ted Kremenek [Tue, 17 Jun 2008 19:12:43 +0000 (19:12 +0000)]
Consistently set "Buckets[NumBuckets] = reinterpret_cast<void*>(-1)" throughout FoldingSet.cpp.

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

16 years agoAdd an insertBefore method for attaching previously unattached instructions,
Owen Anderson [Tue, 17 Jun 2008 18:29:27 +0000 (18:29 +0000)]
Add an insertBefore method for attaching previously unattached instructions,
such as those created by clone(), to a basic block.

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

16 years agoFix use of placement new to actually use an address.
Owen Anderson [Tue, 17 Jun 2008 18:07:43 +0000 (18:07 +0000)]
Fix use of placement new to actually use an address.

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

16 years agoIt's not safe to remove SUBREG_TO_REG that looks like identity copies, e.g. movl...
Evan Cheng [Tue, 17 Jun 2008 17:59:16 +0000 (17:59 +0000)]
It's not safe to remove SUBREG_TO_REG that looks like identity copies, e.g. movl %eax, %eax on x86-64 actually does a zero-extend.

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

16 years agoAdd one more 'magic' define :)
Anton Korobeynikov [Tue, 17 Jun 2008 17:57:43 +0000 (17:57 +0000)]
Add one more 'magic' define :)

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

16 years agoUnbreak non-PPC builds
Anton Korobeynikov [Tue, 17 Jun 2008 17:38:31 +0000 (17:38 +0000)]
Unbreak non-PPC builds

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

16 years agoProvide generic hooks for icache invalidation. Add PPC implementation.
Anton Korobeynikov [Tue, 17 Jun 2008 17:30:05 +0000 (17:30 +0000)]
Provide generic hooks for icache invalidation. Add PPC implementation.
Patch by Gary Benson!

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

16 years agorevert recent patch which is causing widespread breakage.
Chris Lattner [Tue, 17 Jun 2008 17:06:43 +0000 (17:06 +0000)]
revert recent patch which is causing widespread breakage.

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

16 years agoDon't forget to initialize SymbolSearchingDisabled.
Evan Cheng [Tue, 17 Jun 2008 16:49:02 +0000 (16:49 +0000)]
Don't forget to initialize SymbolSearchingDisabled.

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

16 years agoFix typo that changed the logic to something wrong.
Duncan Sands [Tue, 17 Jun 2008 15:55:30 +0000 (15:55 +0000)]
Fix typo that changed the logic to something wrong.
Spotted by Nick Lewycky.

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

16 years agoSplit type expansion into ExpandInteger and ExpandFloat
Duncan Sands [Tue, 17 Jun 2008 14:27:01 +0000 (14:27 +0000)]
Split type expansion into ExpandInteger and ExpandFloat
rather than bundling them together.  Rename FloatToInt
to PromoteFloat (better, if not perfect).  Reorganize
files by types rather than by operations.

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

16 years agoForgot to commit the ValueTracking header file along with r52396.
Matthijs Kooijman [Tue, 17 Jun 2008 13:54:33 +0000 (13:54 +0000)]
Forgot to commit the ValueTracking header file along with r52396.

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

16 years agoLearn IPConstProp to propagate arguments that are directly returned. Strictly
Matthijs Kooijman [Tue, 17 Jun 2008 12:20:24 +0000 (12:20 +0000)]
Learn IPConstProp to propagate arguments that are directly returned. Strictly
speaking these are not constant values. However, when a function always returns
one of its arguments, then from the point of view of each caller the return
value is constant (or at least a known value) and can be replaced.

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

16 years agoLearn IPConstProp to look at individual return values and propagate them
Matthijs Kooijman [Tue, 17 Jun 2008 12:02:52 +0000 (12:02 +0000)]
Learn IPConstProp to look at individual return values and propagate them
individually.

Also learn IPConstProp how returning first class aggregates work, in addition
to old style multiple return instructions.

Modify the return-constants testscase to confirm this behaviour.

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

16 years ago80 column fixes.
Matthijs Kooijman [Tue, 17 Jun 2008 08:26:32 +0000 (08:26 +0000)]
80 column fixes.

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

16 years agoUse a SmallVector instead of an array, since auto_ptr doesn't handle arrays
Matthijs Kooijman [Tue, 17 Jun 2008 08:24:37 +0000 (08:24 +0000)]
Use a SmallVector instead of an array, since auto_ptr doesn't handle arrays
properly.

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

16 years agoadd a new -enable-value-prop flag for llcbeta, that enables propagation
Chris Lattner [Tue, 17 Jun 2008 06:09:18 +0000 (06:09 +0000)]
add a new -enable-value-prop flag for llcbeta, that enables propagation
of value info (sign/zero ext info) from one MBB to another.  This doesn't
handle much right now because of two limitations:

1) only handles zext/sext, not random bit propagation (no assert exists
   for this)
2) doesn't handle phis.

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

16 years agoFix spelling.
Duncan Sands [Tue, 17 Jun 2008 03:24:13 +0000 (03:24 +0000)]
Fix spelling.

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

16 years agoRather than avoiding to wrap ISD::DECLARE GV operand in X86ISD::Wrapper, simply handl...
Evan Cheng [Tue, 17 Jun 2008 02:01:22 +0000 (02:01 +0000)]
Rather than avoiding to wrap ISD::DECLARE GV operand in X86ISD::Wrapper, simply handle it at dagisel time with x86 specific isel code.

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

16 years agoAdd a missing ~ (dtor became ctor) which caused crashes on a bunch of stuff.
Chris Lattner [Mon, 16 Jun 2008 23:06:51 +0000 (23:06 +0000)]
Add a missing ~ (dtor became ctor) which caused crashes on a bunch of stuff.

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

16 years agoDo not issue identity copies.
Evan Cheng [Mon, 16 Jun 2008 22:52:53 +0000 (22:52 +0000)]
Do not issue identity copies.

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

16 years agoRefine the change in r52258 for avoiding use-before-def conditions
Dan Gohman [Mon, 16 Jun 2008 22:34:15 +0000 (22:34 +0000)]
Refine the change in r52258 for avoiding use-before-def conditions
when changing the stride of a comparison so that it's slightly
more precise, by having it scan the instruction list to determine
if there is a use of the condition after the point where the
condition will be inserted.

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

16 years agoswitch TypeHasCycleThroughItself from using an std::set to using a SmallPtrSet,
Chris Lattner [Mon, 16 Jun 2008 21:20:58 +0000 (21:20 +0000)]
switch TypeHasCycleThroughItself from using an std::set to using a SmallPtrSet,
this speeds up the linking testcase in PR1860 by 44% (.379 -> 0.263)

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