oota-llvm.git
14 years agoAdd experimental -disable-physical-join command line option.
Jakob Stoklund Olesen [Tue, 31 Aug 2010 01:27:49 +0000 (01:27 +0000)]
Add experimental -disable-physical-join command line option.

Eventually, we want to disable physreg coalescing completely, and let the
register allocator do its job using hints.

This option makes it possible to measure the impact of disabling physreg
coalescing.

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

14 years agoFix a typo.
Owen Anderson [Mon, 30 Aug 2010 23:59:30 +0000 (23:59 +0000)]
Fix a typo.

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

14 years agoIf we have an unhandled type then assert, we shouldn't get here for
Eric Christopher [Mon, 30 Aug 2010 23:48:26 +0000 (23:48 +0000)]
If we have an unhandled type then assert, we shouldn't get here for
things we can't handle.

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

14 years agoUpdate the descriptions of NoModRef and ModRef to be consistent
Dan Gohman [Mon, 30 Aug 2010 23:47:24 +0000 (23:47 +0000)]
Update the descriptions of NoModRef and ModRef to be consistent
with the descriptions of Mod and Ref.

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

14 years agoFix borken test
Anton Korobeynikov [Mon, 30 Aug 2010 23:41:49 +0000 (23:41 +0000)]
Fix borken test

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

14 years agoCombine these two tests, and make sure there's a newline at the end of the file.
Owen Anderson [Mon, 30 Aug 2010 23:37:41 +0000 (23:37 +0000)]
Combine these two tests, and make sure there's a newline at the end of the file.

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

14 years agoCleanups suggested by Chris.
Owen Anderson [Mon, 30 Aug 2010 23:34:17 +0000 (23:34 +0000)]
Cleanups suggested by Chris.

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

14 years agoRe-apply r112539, being more careful to respect the return values of the constant...
Owen Anderson [Mon, 30 Aug 2010 23:22:36 +0000 (23:22 +0000)]
Re-apply r112539, being more careful to respect the return values of the constant folding methods.  Additionally,
use the ConstantExpr::get*() methods to simplify some constant folding.

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

14 years agoExpand MOVi32imm in ARM mode after regalloc. This provides
Anton Korobeynikov [Mon, 30 Aug 2010 22:50:36 +0000 (22:50 +0000)]
Expand MOVi32imm in ARM mode after regalloc. This provides
scheduling opportunities (extra instruction can go in between
MOVT / MOVW pair removing the stall).

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

14 years agoAdd statistics to evaluate this pass.
Owen Anderson [Mon, 30 Aug 2010 22:45:55 +0000 (22:45 +0000)]
Add statistics to evaluate this pass.

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

14 years agoRevert r112539. It accidentally introduced a miscompilation.
Owen Anderson [Mon, 30 Aug 2010 22:33:41 +0000 (22:33 +0000)]
Revert r112539.  It accidentally introduced a miscompilation.

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

14 years agoFixes and cleanups pointed out by Chris. In general, be careful to handle 0 results...
Owen Anderson [Mon, 30 Aug 2010 22:07:52 +0000 (22:07 +0000)]
Fixes and cleanups pointed out by Chris.  In general, be careful to handle 0 results from ComputeValueKnownInPredecessors
(indicating undef), and re-use existing constant folding APIs.

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

14 years agoUse the existing T2I_bin_s_irs pattern instead of creating T2I_bin_sw_irs, which
Bill Wendling [Mon, 30 Aug 2010 22:05:23 +0000 (22:05 +0000)]
Use the existing T2I_bin_s_irs pattern instead of creating T2I_bin_sw_irs, which
is meant to do exactly the same thing. Thanks to Jim Grosbach for pointing this
out! :-)

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

14 years agoFix a comment.
NAKAMURA Takumi [Mon, 30 Aug 2010 21:54:03 +0000 (21:54 +0000)]
Fix a comment.

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

14 years agoRemember to clear the shadow kill flag at the same time as clearing the real
Jakob Stoklund Olesen [Mon, 30 Aug 2010 21:52:40 +0000 (21:52 +0000)]
Remember to clear the shadow kill flag at the same time as clearing the real
kill flag.

This could cause duplicate kill flags when the same register was used twice in a
continuous sequence of STRs.

There is no small test case. <rdar://problem/8218046>

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

14 years agoFix llc to run the verifier once, not twice.
Dan Gohman [Mon, 30 Aug 2010 21:41:20 +0000 (21:41 +0000)]
Fix llc to run the verifier once, not twice.

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

14 years agoRemove this from the main tree. I'll host it out of tree.
Owen Anderson [Mon, 30 Aug 2010 21:34:26 +0000 (21:34 +0000)]
Remove this from the main tree.  I'll host it out of tree.

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

14 years agoAdd comments explaining why it's not necessary to include the
Dan Gohman [Mon, 30 Aug 2010 21:18:41 +0000 (21:18 +0000)]
Add comments explaining why it's not necessary to include the
is-function-local flag in metadata uniquing bits.

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

14 years agoRemove NEON vmovn intrinsic, replacing it with vector truncate operations.
Bob Wilson [Mon, 30 Aug 2010 20:02:30 +0000 (20:02 +0000)]
Remove NEON vmovn intrinsic, replacing it with vector truncate operations.
Auto-upgrade the old intrinsic and update tests.

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

14 years agoMake ARM add rN, sp, #imm instructions rematerializable. That's how the address of...
Jim Grosbach [Mon, 30 Aug 2010 19:49:58 +0000 (19:49 +0000)]
Make ARM add rN, sp, #imm instructions rematerializable. That's how the address of locals is calculated, so this should
help relieve register pressure a bit. Recalculating the local address is
almost always going to be better than spilling.

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

14 years agoFix LLVM target initialization to deal with sociopathic outside projects
Eric Christopher [Mon, 30 Aug 2010 18:34:48 +0000 (18:34 +0000)]
Fix LLVM target initialization to deal with sociopathic outside projects
that like to randomly define things like "X86", regenerate autoconf bits
and update cmake.

Fixes PR7852.

Patch by Xerxes RĂ„nby!

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

14 years agoKill a couple of unused variables.
Eric Christopher [Mon, 30 Aug 2010 18:31:44 +0000 (18:31 +0000)]
Kill a couple of unused variables.

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

14 years agonuke dead ivar which was supposed to be committed with r112496
Chris Lattner [Mon, 30 Aug 2010 18:16:27 +0000 (18:16 +0000)]
nuke dead ivar which was supposed to be committed with r112496

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

14 years agotwo changes:
Chris Lattner [Mon, 30 Aug 2010 18:12:35 +0000 (18:12 +0000)]
two changes:
1) nuke ConstDataCoalSection, which is dead.
2) revise my previous patch for rdar://8018335,
  which was completely wrong.  Specifically, it doesn't
  make sense to mark __TEXT,__const_coal as PURE_INSTRUCTIONS,
  because it is for readonly data.  templates (it turns out)
  go to const_coal_nt.  The real fix for rdar://8018335 was
  to give ConstTextCoalSection a section kind of ReadOnly
  instead of Text.

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

14 years agoWhen expanding NEON VST pseudo instructions, if the original super-register
Bob Wilson [Mon, 30 Aug 2010 18:10:48 +0000 (18:10 +0000)]
When expanding NEON VST pseudo instructions, if the original super-register
operand is killed, add it to the expanded instruction as an implicit kill
operand instead of marking the individual subregs with kill flags.  This
should work better in general and also handles the case for VST3 where one
of the subregs was not referenced in the expanded instruction and so was
not marked killed.

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

14 years agoMCELF: The value of all common symbols is the offset from the start of the section...
Benjamin Kramer [Mon, 30 Aug 2010 17:20:17 +0000 (17:20 +0000)]
MCELF: The value of all common symbols is the offset from the start of the section.  Patch by Roman Divacky.

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

14 years agoIt is possible to try to merge a not-constant with a constantrage, when dealing with...
Owen Anderson [Mon, 30 Aug 2010 17:03:45 +0000 (17:03 +0000)]
It is possible to try to merge a not-constant with a constantrage, when dealing with ptrtoint ConstantExpr's.
Unfortunately, the only testcase I have for this is huge and doesn't reduce well because the error is
sensitive to iteration-order issues, since the problem only occurs when merging values in a particular order.

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

14 years agoPartially revert r112480. Caused test failures.
Michael J. Spencer [Mon, 30 Aug 2010 15:34:08 +0000 (15:34 +0000)]
Partially revert r112480. Caused test failures.

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

14 years agocoff-dump.py: Fix PR7996. Now it is compatible to Python-2.4.
NAKAMURA Takumi [Mon, 30 Aug 2010 15:19:56 +0000 (15:19 +0000)]
coff-dump.py: Fix PR7996. Now it is compatible to Python-2.4.

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

14 years agoFix constant-over-index.ll test on windows.
Michael J. Spencer [Mon, 30 Aug 2010 15:08:02 +0000 (15:08 +0000)]
Fix constant-over-index.ll test on windows.

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

14 years agoTest: Fix LLVMC tests on CMake.
Michael J. Spencer [Mon, 30 Aug 2010 14:49:00 +0000 (14:49 +0000)]
Test: Fix LLVMC tests on CMake.

The CMake build didn't define TEST_COMPILE_CXX_CMD. The tests assumed gcc.

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

14 years agoDon't print two "0x" prefixes. Use a raw_ostream overload instead of llvm::format.
Benjamin Kramer [Mon, 30 Aug 2010 14:46:53 +0000 (14:46 +0000)]
Don't print two "0x" prefixes. Use a raw_ostream overload instead of llvm::format.

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

14 years agoEE/JIT: Do not invoke parent's ctors/dtors from main()! (PR3897)
NAKAMURA Takumi [Mon, 30 Aug 2010 14:00:29 +0000 (14:00 +0000)]
EE/JIT: Do not invoke parent's ctors/dtors from main()! (PR3897)

On Mingw and Cygwin, the symbol __main is resolved to
callee's(eg. tools/lli) one, to invoke wrong duplicated ctors
(and register wrong callee's dtors with atexit(3)).
We expect, by callee, ExecutionEngine::runStaticConstructorsDestructors()
is called before ExecutionEngine::runFunctionAsMain() is called.

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

14 years agoThe value is offset from the start of the section for non-common symbols, submitted...
Benjamin Kramer [Mon, 30 Aug 2010 12:00:16 +0000 (12:00 +0000)]
The value is offset from the start of the section for non-common symbols, submitted by Jordan Gordeev.

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

14 years agoIndex external symbols by symbol table instead of parent section, by Roman Divacky.
Benjamin Kramer [Mon, 30 Aug 2010 11:59:29 +0000 (11:59 +0000)]
Index external symbols by symbol table instead of parent section, by Roman Divacky.

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

14 years agoMark all common symbols external. This is not exactly correct but it lets apps
Benjamin Kramer [Mon, 30 Aug 2010 11:56:55 +0000 (11:56 +0000)]
Mark all common symbols external. This is not exactly correct but it lets apps
link for now and can be adjusted later. Patch by Roman Divacky.

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

14 years agoRemove a hack that tries to understand incorrect triples from the
Duncan Sands [Mon, 30 Aug 2010 10:57:54 +0000 (10:57 +0000)]
Remove a hack that tries to understand incorrect triples from the
Triple class constructor.  Only valid triples should now be used
inside LLVM - front-ends are now responsable for rejecting or
correcting invalid target triples.  The Triple::normalize method
can be used to straighten out funky triples provided by users.
Give this a whirl through the buildbots to see if I caught all
places where triples enter LLVM.

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

14 years agoCorrect bogus module triple specifications.
Duncan Sands [Mon, 30 Aug 2010 10:48:29 +0000 (10:48 +0000)]
Correct bogus module triple specifications.

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

14 years agoAdd a new example to the LLVM distribution: a trace-based Brainfuck compiler that...
Owen Anderson [Mon, 30 Aug 2010 07:33:39 +0000 (07:33 +0000)]
Add a new example to the LLVM distribution: a trace-based Brainfuck compiler that uses LLVM as its code generator.

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

14 years agoAttempt to remove the MSIL backend from CMake as well based on Chris's r112375.
Chandler Carruth [Mon, 30 Aug 2010 07:25:54 +0000 (07:25 +0000)]
Attempt to remove the MSIL backend from CMake as well based on Chris's r112375.

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

14 years agoRevert r112461. It was failing on PPC...
Bill Wendling [Mon, 30 Aug 2010 04:36:50 +0000 (04:36 +0000)]
Revert r112461. It was failing on PPC...

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

14 years agoCreate Thumb2sI_cpsr and T2sI_cpsr. These new classes indicate that CPSR is the
Bill Wendling [Mon, 30 Aug 2010 01:47:35 +0000 (01:47 +0000)]
Create Thumb2sI_cpsr and T2sI_cpsr. These new classes indicate that CPSR is the
optional modified register (instead of reg0). Along with r112461 it will make
sure that the optional define of CPSR is marked as "def" and will thus mark the
instructions using these classes (t2ANDS*) as setting the 's' flag.

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

14 years agoWhen adding a register, we should mark it as "def" if it can optionally define
Bill Wendling [Mon, 30 Aug 2010 01:36:05 +0000 (01:36 +0000)]
When adding a register, we should mark it as "def" if it can optionally define
said (physical) register.

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

14 years agorevert 112457, it looks like it broke selfhost.
Chris Lattner [Sun, 29 Aug 2010 22:28:18 +0000 (22:28 +0000)]
revert 112457, it looks like it broke selfhost.

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

14 years agorewrite DwarfEHPrepare to use SSAUpdater to promote its allocas
Chris Lattner [Sun, 29 Aug 2010 19:54:28 +0000 (19:54 +0000)]
rewrite DwarfEHPrepare to use SSAUpdater to promote its allocas
instead of PromoteMemToReg.  This allows it to stop using DF and DT,
eliminating a computation of DT and DF from clang -O3.  Clang is now
down to 2 runs of DomFrontier.

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

14 years agoinline function into its only caller.
Chris Lattner [Sun, 29 Aug 2010 19:28:28 +0000 (19:28 +0000)]
inline function into its only caller.

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

14 years agotwo changes: 1) make AliasSet hold the list of call sites with an
Chris Lattner [Sun, 29 Aug 2010 18:42:23 +0000 (18:42 +0000)]
two changes: 1) make AliasSet hold the list of call sites with an
assertingvh so we get a violent explosion if the pointer dangles.

2) Fix AliasSetTracker::deleteValue to remove call sites with
   by-pointer comparisons instead of by-alias queries.  Using
   findAliasSetForCallSite can cause alias sets to get merged
   when they shouldn't, and can also miss alias sets when the
   call is readonly.

#2 fixes PR6889, which only repros with a .c file :(

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

14 years agoLICM does get dead instructions input to it. Instead of sinking them
Chris Lattner [Sun, 29 Aug 2010 18:22:25 +0000 (18:22 +0000)]
LICM does get dead instructions input to it. Instead of sinking them
out of loops, just delete them.

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

14 years agouse moveBefore instead of remove+insert, it avoids some
Chris Lattner [Sun, 29 Aug 2010 18:18:40 +0000 (18:18 +0000)]
use moveBefore instead of remove+insert, it avoids some
symtab manipulation, so its faster (in addition to being
more elegant)

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

14 years agorevert 112448 for now.
Chris Lattner [Sun, 29 Aug 2010 18:11:16 +0000 (18:11 +0000)]
revert 112448 for now.

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

14 years agooptimize LICM::hoist to use moveBefore. Correct its updating
Chris Lattner [Sun, 29 Aug 2010 18:03:33 +0000 (18:03 +0000)]
optimize LICM::hoist to use moveBefore.  Correct its updating
of AST to remove the hoisted instruction from the AST, since it
is no longer in the loop.

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

14 years agofix some bugs (found by inspection) where LICM would not update
Chris Lattner [Sun, 29 Aug 2010 18:00:00 +0000 (18:00 +0000)]
fix some bugs (found by inspection) where LICM would not update
LICM correctly.  When sinking an instruction, it should not add
entries for the sunk instruction to the AST, it should remove
the entry for the sunk instruction.  The blocks being sunk to
are not in the loop, so their instructions shouldn't be in the
AST (yet)!

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

14 years agorework the ownership of subloop alias information: instead of
Chris Lattner [Sun, 29 Aug 2010 17:46:00 +0000 (17:46 +0000)]
rework the ownership of subloop alias information: instead of
keeping them around until the pass is destroyed, keep them
around a) just when useful (not for outer loops) and b) destroy
them right after we use them.  This should reduce memory use
and fixes potential bugs where a loop is deleted and another
loop gets allocated to the same address.

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

14 years agoapparently unswitch had the same "Feature". Stop its
Chris Lattner [Sun, 29 Aug 2010 17:23:19 +0000 (17:23 +0000)]
apparently unswitch had the same "Feature".  Stop its
claims that it preserves domfrontier if it doesn't really.

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

14 years agonow that loop passes don't use DomFrontier, there is no reason
Chris Lattner [Sun, 29 Aug 2010 17:21:35 +0000 (17:21 +0000)]
now that loop passes don't use DomFrontier, there is no reason
for the unroller to pretend it supports updating it.  It still
has a horrible hack for DomTree.

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

14 years agoMake IVUsers iterative instead of recursive.
Dan Gohman [Sun, 29 Aug 2010 16:40:03 +0000 (16:40 +0000)]
Make IVUsers iterative instead of recursive.

This has the side effect of reversing the order of most of
IVUser's results.

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

14 years agoOptionally rerun dedicated-register filtering after applying
Dan Gohman [Sun, 29 Aug 2010 16:39:22 +0000 (16:39 +0000)]
Optionally rerun dedicated-register filtering after applying
other filtering techniques, as those may allow it to filter
out more obviously unprofitable candidates.

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

14 years agoFix several areas in LSR to do a better job keeping the main
Dan Gohman [Sun, 29 Aug 2010 16:32:54 +0000 (16:32 +0000)]
Fix several areas in LSR to do a better job keeping the main
LSRInstance data structures up to date. This fixes some
pessimizations caused by stale data which will be exposed
in an upcoming change.

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

14 years agoRefactor the three main groups of code out of
Dan Gohman [Sun, 29 Aug 2010 16:09:42 +0000 (16:09 +0000)]
Refactor the three main groups of code out of
NarrowSearchSpaceUsingHeuristics into separate functions.

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

14 years agoDelete a bogus check.
Dan Gohman [Sun, 29 Aug 2010 15:30:29 +0000 (15:30 +0000)]
Delete a bogus check.

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

14 years agoAdd some comments.
Dan Gohman [Sun, 29 Aug 2010 15:27:08 +0000 (15:27 +0000)]
Add some comments.

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

14 years agoMove this debug output into GenerateAllReuseFormula, to declutter
Dan Gohman [Sun, 29 Aug 2010 15:21:38 +0000 (15:21 +0000)]
Move this debug output into GenerateAllReuseFormula, to declutter
the high-level logic.

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

14 years agoDelete an unused declaration.
Dan Gohman [Sun, 29 Aug 2010 15:19:11 +0000 (15:19 +0000)]
Delete an unused declaration.

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

14 years agoDo one lookup instead of two.
Dan Gohman [Sun, 29 Aug 2010 15:18:49 +0000 (15:18 +0000)]
Do one lookup instead of two.

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

14 years agoRestructure the {A,+,B}<L> * {C,+,D}<L> folding so that it folds
Dan Gohman [Sun, 29 Aug 2010 15:16:58 +0000 (15:16 +0000)]
Restructure the {A,+,B}<L> * {C,+,D}<L> folding so that it folds
all applicable addrecs before recursing on getMulExpr, instead of
recursing on getMulExpr for each one.

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

14 years agoBatch up subtracts along with adds, when analyzing long chains of
Dan Gohman [Sun, 29 Aug 2010 15:10:06 +0000 (15:10 +0000)]
Batch up subtracts along with adds, when analyzing long chains of
operations.

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

14 years agoMicro-optimize GroupByComplexity.
Dan Gohman [Sun, 29 Aug 2010 15:07:13 +0000 (15:07 +0000)]
Micro-optimize GroupByComplexity.

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

14 years agoHold AddRec->getLoop() in a variable, to make the Mul code more consistent
Dan Gohman [Sun, 29 Aug 2010 14:55:19 +0000 (14:55 +0000)]
Hold AddRec->getLoop() in a variable, to make the Mul code more consistent
with the Add code.

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

14 years agoRename a variable, for consistency.
Dan Gohman [Sun, 29 Aug 2010 14:53:34 +0000 (14:53 +0000)]
Rename a variable, for consistency.

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

14 years agoUse iterators instead of indices.
Dan Gohman [Sun, 29 Aug 2010 14:52:02 +0000 (14:52 +0000)]
Use iterators instead of indices.

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

14 years agoDon't worry about union types.
Dan Gohman [Sun, 29 Aug 2010 14:50:21 +0000 (14:50 +0000)]
Don't worry about union types.

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

14 years agoMake this test less dependent on register allocation choices.
Dan Gohman [Sun, 29 Aug 2010 14:49:42 +0000 (14:49 +0000)]
Make this test less dependent on register allocation choices.

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

14 years agoUse exec.
Dan Gohman [Sun, 29 Aug 2010 14:49:00 +0000 (14:49 +0000)]
Use exec.

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

14 years agoDelete an unused declaration.
Dan Gohman [Sun, 29 Aug 2010 14:48:15 +0000 (14:48 +0000)]
Delete an unused declaration.

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

14 years agoFix lowering of INSERT_VECTOR_ELT in SPU.
Kalle Raiskila [Sun, 29 Aug 2010 12:41:50 +0000 (12:41 +0000)]
Fix lowering of INSERT_VECTOR_ELT in SPU.
The IDX was treated as byte index, not element index.

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

14 years agoFix whitespaces. No functionality changes.
Bill Wendling [Sun, 29 Aug 2010 11:31:07 +0000 (11:31 +0000)]
Fix whitespaces. No functionality changes.

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

14 years agoStop explicitly scheduling domfrontier before the loop passes,
Chris Lattner [Sun, 29 Aug 2010 07:05:51 +0000 (07:05 +0000)]
Stop explicitly scheduling domfrontier before the loop passes,
since none of them use it.  With this, we now only run
domfrontier (an N^2 analysis) 3 times at clang -O3: once for
"early" per-function cleanup, once at the start of the
per-function pipeline to support SRoA, and once late because
the EHPrepare class uses it.

EHPrepare needs to stop using it, this is silly and wasteful.

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

14 years agolicm preserves the cfg, it doesn't have to explicitly say it
Chris Lattner [Sun, 29 Aug 2010 07:02:56 +0000 (07:02 +0000)]
licm preserves the cfg, it doesn't have to explicitly say it
preserves domfrontier.  It does preserve AA though.

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

14 years agonow that it doesn't use the PromoteMemToReg function, LICM doesn't
Chris Lattner [Sun, 29 Aug 2010 06:49:44 +0000 (06:49 +0000)]
now that it doesn't use the PromoteMemToReg function, LICM doesn't
require DomFrontier.  Dropping this doesn't actually save any runs
of the pass though.

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

14 years agocompletely rewrite the memory promotion algorithm in LICM.
Chris Lattner [Sun, 29 Aug 2010 06:43:52 +0000 (06:43 +0000)]
completely rewrite the memory promotion algorithm in LICM.
Among other things, this uses SSAUpdater instead of
PromoteMemToReg.

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

14 years agoRemove NEON vaddl, vaddw, vsubl, and vsubw intrinsics. Instead, use llvm
Bob Wilson [Sun, 29 Aug 2010 05:57:34 +0000 (05:57 +0000)]
Remove NEON vaddl, vaddw, vsubl, and vsubw intrinsics.  Instead, use llvm
IR add/sub operations with one or both operands sign- or zero-extended.
Auto-upgrade the old intrinsics.

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

14 years agouse getUniqueExitBlocks instead of a manual set.
Chris Lattner [Sun, 29 Aug 2010 05:12:21 +0000 (05:12 +0000)]
use getUniqueExitBlocks instead of a manual set.

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

14 years agoA couple of small missed optimizations.
Eli Friedman [Sun, 29 Aug 2010 05:07:40 +0000 (05:07 +0000)]
A couple of small missed optimizations.

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

14 years agoreimplement LICM::sink to use SSAUpdater instead of PromoteMemToReg.
Chris Lattner [Sun, 29 Aug 2010 04:55:06 +0000 (04:55 +0000)]
reimplement LICM::sink to use SSAUpdater instead of PromoteMemToReg.
This leads to much simpler code.

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

14 years agoimplement SSAUpdater::RewriteUseAfterInsertions, a helpful form of RewriteUse.
Chris Lattner [Sun, 29 Aug 2010 04:54:06 +0000 (04:54 +0000)]
implement SSAUpdater::RewriteUseAfterInsertions, a helpful form of RewriteUse.

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

14 years agoremove dead proto
Chris Lattner [Sun, 29 Aug 2010 04:53:24 +0000 (04:53 +0000)]
remove dead proto

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

14 years agoreduce indentation in LICM::sink by using early exits, use
Chris Lattner [Sun, 29 Aug 2010 04:28:20 +0000 (04:28 +0000)]
reduce indentation in LICM::sink by using early exits, use
getUniqueExitBlocks instead of getExitBlocks and a manual
set to eliminate dupes.

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

14 years agomodernize this pass a bit: use efficient set/map and reduce indentation.
Chris Lattner [Sun, 29 Aug 2010 04:23:04 +0000 (04:23 +0000)]
modernize this pass a bit: use efficient set/map and reduce indentation.

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

14 years agoFlesh out the list of things I've worked on.
Duncan Sands [Sun, 29 Aug 2010 04:22:35 +0000 (04:22 +0000)]
Flesh out the list of things I've worked on.

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

14 years agowhen merging two alias sets, the result set is volatile if either
Chris Lattner [Sun, 29 Aug 2010 04:14:47 +0000 (04:14 +0000)]
when merging two alias sets, the result set is volatile if either
of the sets is volatile.  We were dropping the volatile bit of the
merged in set, leading (luckily) to assertions in cases like
PR7535.  I cannot produce a testcase that repros with opt, but this
is obviously correct.

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

14 years agomore cleanup
Chris Lattner [Sun, 29 Aug 2010 04:13:43 +0000 (04:13 +0000)]
more cleanup

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

14 years agoclean this up
Chris Lattner [Sun, 29 Aug 2010 04:06:55 +0000 (04:06 +0000)]
clean this up

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

14 years ago- Add a parameter to T2I_bin_irs for those patterns which set the S bit.
Bill Wendling [Sun, 29 Aug 2010 03:55:31 +0000 (03:55 +0000)]
- Add a parameter to T2I_bin_irs for those patterns which set the S bit.
- Create T2I_bin_sw_irs to be like T2I_bin_w_irs, but that it sets the S bit.

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

14 years agomerge a bunch of shuffle tests into sse2.ll
Chris Lattner [Sun, 29 Aug 2010 03:19:04 +0000 (03:19 +0000)]
merge a bunch of shuffle tests into sse2.ll

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

14 years agoadd a bunch more common shuffles to the instprinter.
Chris Lattner [Sun, 29 Aug 2010 03:08:08 +0000 (03:08 +0000)]
add a bunch more common shuffles to the instprinter.

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

14 years agoadd some nounwind's
Chris Lattner [Sun, 29 Aug 2010 03:07:47 +0000 (03:07 +0000)]
add some nounwind's

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

14 years agoName ANDflag to ANDS, which is less stupid.
Bill Wendling [Sun, 29 Aug 2010 03:06:09 +0000 (03:06 +0000)]
Name ANDflag to ANDS, which is less stupid.

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

14 years agoFile missing from last commit.
Bill Wendling [Sun, 29 Aug 2010 03:02:28 +0000 (03:02 +0000)]
File missing from last commit.

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

14 years agoCreate an ARMISD::AND node. This node is exactly like the "ARM::AND" node, but
Bill Wendling [Sun, 29 Aug 2010 03:02:11 +0000 (03:02 +0000)]
Create an ARMISD::AND node. This node is exactly like the "ARM::AND" node, but
it sets the CPSR register.

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

14 years agoMinor change.
NAKAMURA Takumi [Sat, 28 Aug 2010 21:12:51 +0000 (21:12 +0000)]
Minor change.

This is test for git svn dcommit

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