oota-llvm.git
16 years agoAdd new method - nearestCommonDominator().
Devang Patel [Fri, 8 Jun 2007 00:21:17 +0000 (00:21 +0000)]
Add new method - nearestCommonDominator().

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

16 years agoUse DominatorTree instead of ETForest.
Devang Patel [Fri, 8 Jun 2007 00:17:13 +0000 (00:17 +0000)]
Use DominatorTree instead of ETForest.

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

16 years agoDo not preserve ETForest.
Devang Patel [Fri, 8 Jun 2007 00:02:08 +0000 (00:02 +0000)]
Do not preserve ETForest.

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

16 years agoUse DominatorTree instead of ETForest.
Devang Patel [Thu, 7 Jun 2007 23:53:38 +0000 (23:53 +0000)]
Use DominatorTree instead of ETForest.

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

16 years agoAdd instruction level dominates(A,B) interface.
Devang Patel [Thu, 7 Jun 2007 23:52:40 +0000 (23:52 +0000)]
Add instruction level dominates(A,B) interface.

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

16 years agoOnly remove the edge from entry to false if false block is merged.
Evan Cheng [Thu, 7 Jun 2007 22:31:28 +0000 (22:31 +0000)]
Only remove the edge from entry to false if false block is merged.

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

16 years agoDo not require ETForest. Now it is unused by LICM.
Devang Patel [Thu, 7 Jun 2007 22:21:15 +0000 (22:21 +0000)]
Do not require ETForest. Now it is unused by LICM.

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

16 years agoDo not use ETForest as well as DomiantorTree. DominatorTree is sufficient.
Devang Patel [Thu, 7 Jun 2007 22:17:16 +0000 (22:17 +0000)]
Do not use ETForest as well as DomiantorTree.  DominatorTree is sufficient.

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

16 years agoUse DominatorTree instead of ETForest.
Devang Patel [Thu, 7 Jun 2007 21:57:03 +0000 (21:57 +0000)]
Use DominatorTree instead of ETForest.
This allows faster immediate domiantor walk.

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

16 years agoUse DominatorTree instead of ETForest.
Devang Patel [Thu, 7 Jun 2007 21:42:15 +0000 (21:42 +0000)]
Use DominatorTree instead of ETForest.

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

16 years agoUse DominatorTree instead of ETForest.
Devang Patel [Thu, 7 Jun 2007 21:35:27 +0000 (21:35 +0000)]
Use DominatorTree instead of ETForest.

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

16 years agoAdd basic block level properlyDominates(A,B) interface.
Devang Patel [Thu, 7 Jun 2007 21:34:22 +0000 (21:34 +0000)]
Add basic block level properlyDominates(A,B) interface.

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

16 years agoDo not change the size of function arguments. PR 1489.
Dale Johannesen [Thu, 7 Jun 2007 21:07:15 +0000 (21:07 +0000)]
Do not change the size of function arguments.  PR 1489.

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

16 years agoUse DominatorTree instead of ETForest.
Devang Patel [Thu, 7 Jun 2007 18:45:06 +0000 (18:45 +0000)]
Use DominatorTree instead of ETForest.

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

16 years agoUse DominatorTree instead of ETForest.
Devang Patel [Thu, 7 Jun 2007 18:40:55 +0000 (18:40 +0000)]
Use DominatorTree instead of ETForest.

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

16 years agoAdd BasicBlock level dominates(A,B) interface.
Devang Patel [Thu, 7 Jun 2007 18:39:40 +0000 (18:39 +0000)]
Add BasicBlock level dominates(A,B) interface.

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

16 years agoMaintain ETNode as part of DomTreeNode.
Devang Patel [Thu, 7 Jun 2007 17:47:21 +0000 (17:47 +0000)]
Maintain ETNode as part of DomTreeNode.
This adds redundancy for now.

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

16 years agoFormating fixes.
Tanya Lattner [Thu, 7 Jun 2007 17:12:16 +0000 (17:12 +0000)]
Formating fixes.

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

16 years agoCorrect typo. Should be "not allowed"
Tanya Lattner [Thu, 7 Jun 2007 16:44:52 +0000 (16:44 +0000)]
Correct typo. Should be "not allowed"

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

16 years agoMake the struct bigger, in an attempt to get a "struct return" on more
Duncan Sands [Thu, 7 Jun 2007 09:35:33 +0000 (09:35 +0000)]
Make the struct bigger, in an attempt to get a "struct return" on more
platforms.

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

16 years agoMake this test pass if llvm-g++ was built without exception handling support.
Duncan Sands [Thu, 7 Jun 2007 09:00:48 +0000 (09:00 +0000)]
Make this test pass if llvm-g++ was built without exception handling support.

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

16 years agoifcvt a triangle: don't merge ifcvt block with rejoin block if it can fall through...
Evan Cheng [Thu, 7 Jun 2007 08:13:00 +0000 (08:13 +0000)]
ifcvt a triangle: don't merge ifcvt block with rejoin block if it can fall through to it. If merged, the resulting block is not a candidate for iterative ifcvting since it contains both predicated and non-predicated code.

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

16 years agoAdd assert to check if the attributes ZExt/SExt, NoAlias are apply to the
Zhou Sheng [Thu, 7 Jun 2007 06:12:03 +0000 (06:12 +0000)]
Add assert to check if the attributes ZExt/SExt, NoAlias are apply to the
correct type of parameters.

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

16 years agoLots of bug fixes. Now finally in a reasonable state.
Evan Cheng [Thu, 7 Jun 2007 02:12:15 +0000 (02:12 +0000)]
Lots of bug fixes. Now finally in a reasonable state.

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

16 years agoStupid cut-n-paste bug caused me soooo much grief. Why wasn't there a compilation...
Evan Cheng [Thu, 7 Jun 2007 01:37:54 +0000 (01:37 +0000)]
Stupid cut-n-paste bug caused me soooo much grief. Why wasn't there a compilation warning? I blame it on the FE folks.

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

16 years agoFix bugpoint to run -llc-safe with -Xlinker.
Lauro Ramos Venancio [Wed, 6 Jun 2007 23:10:56 +0000 (23:10 +0000)]
Fix bugpoint to run -llc-safe with -Xlinker.

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

16 years agoPropagate alignment, section name and visibility when linking "appending
Lauro Ramos Venancio [Wed, 6 Jun 2007 22:01:12 +0000 (22:01 +0000)]
Propagate alignment, section name and visibility when linking "appending
global values".
Fix noinline linkage.

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

16 years agoInstruct the inliner to obey the noinline attribute. Add test case.
Tanya Lattner [Wed, 6 Jun 2007 21:59:26 +0000 (21:59 +0000)]
Instruct the inliner to obey the noinline attribute. Add test case.

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

16 years agoReally use attribute.
Tanya Lattner [Wed, 6 Jun 2007 21:00:46 +0000 (21:00 +0000)]
Really use attribute.

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

16 years agoTest case for noinline attribute.
Tanya Lattner [Wed, 6 Jun 2007 20:52:16 +0000 (20:52 +0000)]
Test case for noinline attribute.

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

16 years agosimplify this code and fix PR1493, now that llvm-gcc3 is dead.
Chris Lattner [Wed, 6 Jun 2007 20:51:41 +0000 (20:51 +0000)]
simplify this code and fix PR1493, now that llvm-gcc3 is dead.

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

16 years agoif internalize is disabled, don't run the pass at all!
Chris Lattner [Wed, 6 Jun 2007 20:51:14 +0000 (20:51 +0000)]
if internalize is disabled, don't run the pass at all!

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

16 years agoRevert changes for noinline.
Tanya Lattner [Wed, 6 Jun 2007 20:46:40 +0000 (20:46 +0000)]
Revert changes for noinline.

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

16 years agoAdd new dominator tree node into dominator tree node map.
Devang Patel [Wed, 6 Jun 2007 20:08:11 +0000 (20:08 +0000)]
Add new dominator tree node into dominator tree node map.

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

16 years agoupdate to match latest changes
Chris Lattner [Wed, 6 Jun 2007 18:28:13 +0000 (18:28 +0000)]
update to match latest changes

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

16 years agoAdd a test for PR1499.
Lauro Ramos Venancio [Wed, 6 Jun 2007 17:10:02 +0000 (17:10 +0000)]
Add a test for PR1499.

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

16 years agoFix PR1499.
Lauro Ramos Venancio [Wed, 6 Jun 2007 17:08:48 +0000 (17:08 +0000)]
Fix PR1499.

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

16 years agoQuick patch to fix the build, based on what it appears Evan meant to write.
Owen Anderson [Wed, 6 Jun 2007 16:22:00 +0000 (16:22 +0000)]
Quick patch to fix the build, based on what it appears Evan meant to write.

Evan, please check that this is in fact correct.

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

16 years agoFold the exception actions table harder: if two typeid lists start the
Duncan Sands [Wed, 6 Jun 2007 15:37:31 +0000 (15:37 +0000)]
Fold the exception actions table harder: if two typeid lists start the
same, only output one copy of the common part.

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

16 years agoOptimize this test. Firstly, only Instructions may use other Instructions.
Nick Lewycky [Wed, 6 Jun 2007 11:26:20 +0000 (11:26 +0000)]
Optimize this test. Firstly, only Instructions may use other Instructions.
Secondly, checking whether removal succeeded tells you whether it was in
the map to begin with.

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

16 years agoMark these instructions clobbersPred. They modify the condition code register.
Evan Cheng [Wed, 6 Jun 2007 10:17:05 +0000 (10:17 +0000)]
Mark these instructions clobbersPred. They modify the condition code register.

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

16 years agoLots of bug fixes.
Evan Cheng [Wed, 6 Jun 2007 10:16:17 +0000 (10:16 +0000)]
Lots of bug fixes.

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

16 years agoAdded clobbersPred.
Evan Cheng [Wed, 6 Jun 2007 10:15:28 +0000 (10:15 +0000)]
Added clobbersPred.

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

16 years agoAdd clobbersPred - instruction that clobbers condition code / register which are...
Evan Cheng [Wed, 6 Jun 2007 10:14:55 +0000 (10:14 +0000)]
Add clobbersPred - instruction that clobbers condition code / register which are used to predicate instructions.

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

16 years agoAdd a machine instruction flag indicating the instruction can clobber condition code...
Evan Cheng [Wed, 6 Jun 2007 10:13:55 +0000 (10:13 +0000)]
Add a machine instruction flag indicating the instruction can clobber condition code / register(s) used to predicate instructions.

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

16 years agoAdditional fix for PR1422: make sure the landing pad label is placed in the
Duncan Sands [Wed, 6 Jun 2007 10:05:18 +0000 (10:05 +0000)]
Additional fix for PR1422: make sure the landing pad label is placed in the
correct machine basic block - do not rely on the eh.exception intrinsic
being in the landing pad: the loop optimizers can move it out.

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

16 years ago"Simplified" testcase for PR1422.
Duncan Sands [Wed, 6 Jun 2007 09:59:53 +0000 (09:59 +0000)]
"Simplified" testcase for PR1422.

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

16 years agoInitial Mips support, here we go! =)
Bruno Cardoso Lopes [Wed, 6 Jun 2007 07:42:06 +0000 (07:42 +0000)]
Initial Mips support, here we go! =)
- Modifications from the last patch included
  (issues pointed by Evan Cheng are now fixed).
- Added more MipsI instructions.
- Added more patterns to match branch instructions.

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

16 years agoIgnore llvm.noinline
Tanya Lattner [Wed, 6 Jun 2007 05:53:50 +0000 (05:53 +0000)]
Ignore llvm.noinline

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

16 years agoFix PR1487 and Transforms/IndVar/2007-06-06-DeleteDanglesPtr.ll
Nick Lewycky [Wed, 6 Jun 2007 04:12:20 +0000 (04:12 +0000)]
Fix PR1487 and Transforms/IndVar/2007-06-06-DeleteDanglesPtr.ll

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

16 years agonew testcase for PR1487
Nick Lewycky [Wed, 6 Jun 2007 04:11:21 +0000 (04:11 +0000)]
new testcase for PR1487

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

16 years agoInform ScalarEvolutions that we're deleting Values.
Nick Lewycky [Wed, 6 Jun 2007 03:51:56 +0000 (03:51 +0000)]
Inform ScalarEvolutions that we're deleting Values.
This is the obviously correct part of the fix for PR1487.

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

16 years agoIf a unconditional branch is added to branch to the false path during ifcvt, the...
Evan Cheng [Wed, 6 Jun 2007 02:08:52 +0000 (02:08 +0000)]
If a unconditional branch is added to branch to the false path during ifcvt, the predicated block cannot be iteratively ifcvted.

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

16 years agoAdd simple full redundancy elimination.
Owen Anderson [Wed, 6 Jun 2007 01:27:49 +0000 (01:27 +0000)]
Add simple full redundancy elimination.

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

16 years agoFix PR1495 and CodeGen/X86/2007-06-05-LSR-Dominator.ll
Chris Lattner [Wed, 6 Jun 2007 01:23:55 +0000 (01:23 +0000)]
Fix PR1495 and CodeGen/X86/2007-06-05-LSR-Dominator.ll

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

16 years agoadd accessor
Chris Lattner [Wed, 6 Jun 2007 01:22:09 +0000 (01:22 +0000)]
add accessor

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

16 years agonew testcase for PR1495
Chris Lattner [Wed, 6 Jun 2007 01:21:46 +0000 (01:21 +0000)]
new testcase for PR1495

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

16 years agoMinor statistics counting bug.
Evan Cheng [Wed, 6 Jun 2007 01:12:44 +0000 (01:12 +0000)]
Minor statistics counting bug.

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

16 years agoBreak friendship.
Devang Patel [Wed, 6 Jun 2007 00:59:48 +0000 (00:59 +0000)]
Break friendship.

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

16 years agoFix a couple of typos and be smarter about order of blocks when ifcvt a diamond.
Evan Cheng [Wed, 6 Jun 2007 00:57:55 +0000 (00:57 +0000)]
Fix a couple of typos and be smarter about order of blocks when ifcvt a diamond.

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

16 years agoRename.
Devang Patel [Wed, 6 Jun 2007 00:49:02 +0000 (00:49 +0000)]
Rename.

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

16 years agoSimplify class hierarchy.
Devang Patel [Wed, 6 Jun 2007 00:46:36 +0000 (00:46 +0000)]
Simplify class hierarchy.

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

16 years agoAvoid non-trivial loop unswitching while optimizing for size.
Devang Patel [Wed, 6 Jun 2007 00:21:03 +0000 (00:21 +0000)]
Avoid non-trivial loop unswitching while optimizing for size.

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

16 years agoFix a user-reported error building with GCC 3.4.4 on Cygwin.
Chris Lattner [Tue, 5 Jun 2007 23:49:06 +0000 (23:49 +0000)]
Fix a user-reported error building with GCC 3.4.4 on Cygwin.

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

16 years agoFix diamond shape ifcvt bugs.
Evan Cheng [Tue, 5 Jun 2007 23:46:14 +0000 (23:46 +0000)]
Fix diamond shape ifcvt bugs.

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

16 years agoFix a misunderstanding of the algorithm. Really, we should be tracking values
Owen Anderson [Tue, 5 Jun 2007 23:46:12 +0000 (23:46 +0000)]
Fix a misunderstanding of the algorithm.  Really, we should be tracking values
and expression separately.  We can get around this, however, by only keeping
opaque values in TMP_GEN.

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

16 years agoDon't leak memory.
Owen Anderson [Tue, 5 Jun 2007 22:11:49 +0000 (22:11 +0000)]
Don't leak memory.

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

16 years agoReplaceUsesOfBlockWith() can modify the predecessors list.
Evan Cheng [Tue, 5 Jun 2007 22:03:53 +0000 (22:03 +0000)]
ReplaceUsesOfBlockWith() can modify the predecessors list.

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

16 years agoDo not ifcvt if either true / false path is a backedge. Not profitable in almost...
Evan Cheng [Tue, 5 Jun 2007 20:38:42 +0000 (20:38 +0000)]
Do not ifcvt if either true / false path is a backedge. Not profitable in almost all cases.

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

16 years agoFix PR 1497
Devang Patel [Tue, 5 Jun 2007 20:24:36 +0000 (20:24 +0000)]
Fix PR 1497
Use separate pass id for CFGOnlyPrinter.

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

16 years agoNew test.
Devang Patel [Tue, 5 Jun 2007 20:23:20 +0000 (20:23 +0000)]
New test.

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

16 years agoPrint predicate of the second instruction of the two-piece constant MI.
Evan Cheng [Tue, 5 Jun 2007 18:55:18 +0000 (18:55 +0000)]
Print predicate of the second instruction of the two-piece constant MI.

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

16 years agoFix a small bug, some 80 cols violations, and add some more debugging output.
Owen Anderson [Tue, 5 Jun 2007 17:31:23 +0000 (17:31 +0000)]
Fix a small bug, some 80 cols violations, and add some more debugging output.

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

16 years agoAllow insertelement, extractelement, and shufflevector to be hoisted/sunk
Dan Gohman [Tue, 5 Jun 2007 16:05:55 +0000 (16:05 +0000)]
Allow insertelement, extractelement, and shufflevector to be hoisted/sunk
by LICM.

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

16 years agoPIC label asm printing cosmetic changes.
Evan Cheng [Tue, 5 Jun 2007 07:36:38 +0000 (07:36 +0000)]
PIC label asm printing cosmetic changes.

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

16 years agoI had a senior moment.
Evan Cheng [Tue, 5 Jun 2007 07:05:25 +0000 (07:05 +0000)]
I had a senior moment.

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

16 years agoCommit first round work of PR1373. "noalias" is now fully supported in
Zhou Sheng [Tue, 5 Jun 2007 05:28:26 +0000 (05:28 +0000)]
Commit first round work of PR1373. "noalias" is now fully supported in
VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll
updated also.

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

16 years agoNew test.
Evan Cheng [Tue, 5 Jun 2007 01:45:08 +0000 (01:45 +0000)]
New test.

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

16 years agoIf the predicated block requires an early exit, end the block there and add a uncondi...
Evan Cheng [Tue, 5 Jun 2007 01:31:40 +0000 (01:31 +0000)]
If the predicated block requires an early exit, end the block there and add a unconditional branch to false block. AnalyzeBranch() does not understand early exits.

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

16 years agoFix some subtle bugs: bug during succeessor copying; incorrectly updating states...
Evan Cheng [Tue, 5 Jun 2007 00:07:37 +0000 (00:07 +0000)]
Fix some subtle bugs: bug during succeessor copying; incorrectly updating states of ifcvted blocks.

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

16 years agoPatches by Chuck Rose to unbreak V Studio builds.
Bill Wendling [Mon, 4 Jun 2007 23:52:59 +0000 (23:52 +0000)]
Patches by Chuck Rose to unbreak V Studio builds.

Thanks Chuck!

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

16 years agoTail merging wasn't working for predecessors of landing pads. PR 1496.
Dale Johannesen [Mon, 4 Jun 2007 23:52:54 +0000 (23:52 +0000)]
Tail merging wasn't working for predecessors of landing pads.  PR 1496.

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

16 years agos/ETNode::getChildren/ETNode::getETNodeChildren/g
Devang Patel [Mon, 4 Jun 2007 23:45:02 +0000 (23:45 +0000)]
s/ETNode::getChildren/ETNode::getETNodeChildren/g

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

16 years agoDon't use std::set_difference when the two sets are sorted differently. Compute
Owen Anderson [Mon, 4 Jun 2007 23:34:56 +0000 (23:34 +0000)]
Don't use std::set_difference when the two sets are sorted differently.  Compute
the difference manually instead.

This allows GVNPRE to produce correct analysis for the example in the GVNPRE
paper.

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

16 years agoFix a bunch of small bugs, and improve the debugging output significantly.
Owen Anderson [Mon, 4 Jun 2007 23:28:33 +0000 (23:28 +0000)]
Fix a bunch of small bugs, and improve the debugging output significantly.

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

16 years agoWhen rebuilding constant structs, make sure to honor the isPacked bit.
Chris Lattner [Mon, 4 Jun 2007 22:23:42 +0000 (22:23 +0000)]
When rebuilding constant structs, make sure to honor the isPacked bit.
This fixes PR1491 and GlobalOpt/2007-06-04-PackedStruct.ll

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

16 years agonew testcase for PR1491
Chris Lattner [Mon, 4 Jun 2007 22:23:17 +0000 (22:23 +0000)]
new testcase for PR1491

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

16 years agoGlobal ctors / dtors alignment shouldn't be hard-coded at 4. e.g. It could be 8 for...
Evan Cheng [Mon, 4 Jun 2007 20:39:18 +0000 (20:39 +0000)]
Global ctors / dtors alignment shouldn't be hard-coded at 4. e.g. It could be 8 for 64-bit targets.

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

16 years agoForgot to check for if iterator reached the end.
Evan Cheng [Mon, 4 Jun 2007 20:33:36 +0000 (20:33 +0000)]
Forgot to check for if iterator reached the end.

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

16 years agoMisuse of hasExternalLinkage(), should be checking isDeclaration().
Evan Cheng [Mon, 4 Jun 2007 18:54:57 +0000 (18:54 +0000)]
Misuse of hasExternalLinkage(), should be checking isDeclaration().

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

16 years agoMake phi_translate correct.
Owen Anderson [Mon, 4 Jun 2007 18:05:26 +0000 (18:05 +0000)]
Make phi_translate correct.

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

16 years agoAdd FIXMEs.
Devang Patel [Mon, 4 Jun 2007 17:38:00 +0000 (17:38 +0000)]
Add FIXMEs.

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

16 years agoRemove unused method.
Devang Patel [Mon, 4 Jun 2007 16:49:36 +0000 (16:49 +0000)]
Remove unused method.

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

16 years agos/DominatorTree::createNewNode/DominatorTree::addNewBlock/g
Devang Patel [Mon, 4 Jun 2007 16:43:25 +0000 (16:43 +0000)]
s/DominatorTree::createNewNode/DominatorTree::addNewBlock/g

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

16 years agoAdd basic block level interface to change immediate dominator
Devang Patel [Mon, 4 Jun 2007 16:22:33 +0000 (16:22 +0000)]
Add basic block level interface to change immediate dominator
and create new node.

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

16 years agoPass the DAG to SDNode::dump to let it do more detailed dumps in some cases.
Dan Gohman [Mon, 4 Jun 2007 16:17:33 +0000 (16:17 +0000)]
Pass the DAG to SDNode::dump to let it do more detailed dumps in some cases.

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

16 years agoRemove the operator<< for MVT::ValueType in preparation for MVT::ValueType
Dan Gohman [Mon, 4 Jun 2007 16:11:03 +0000 (16:11 +0000)]
Remove the operator<< for MVT::ValueType in preparation for MVT::ValueType
being changed from an enum to an integer type, which can't have a custom
operator<< overload.

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

16 years agoResolve implicit alignment before computing the FoldingSet information so
Dan Gohman [Mon, 4 Jun 2007 15:49:41 +0000 (15:49 +0000)]
Resolve implicit alignment before computing the FoldingSet information so
that the CSE map always contains explicit alignment information. This allows
more loads to be CSE'd when there is a mix of explicit-alignment loads and
implicit-alignment loads.

Also, in SelectionDAG::FindModifiedNodeSlot, add the operands to the
FoldingSetNodeID before the load/store information instead of after, so
that it matches what is done elsewhere.

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

16 years agoFix LLVM build on NetBSD. Patch by Neil Booth.
Devang Patel [Mon, 4 Jun 2007 15:28:57 +0000 (15:28 +0000)]
Fix LLVM build on NetBSD. Patch by Neil Booth.

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

16 years agoLet IfConverter loose. Allow more aggressive subsumptions; reorder basic blocks to...
Evan Cheng [Mon, 4 Jun 2007 06:47:22 +0000 (06:47 +0000)]
Let IfConverter loose. Allow more aggressive subsumptions; reorder basic blocks to expose more ifcvt opportunities; code clean up and fixes.

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