Commit Graph

19156 Commits

Author SHA1 Message Date
Evan Cheng
93a8e5ea0c Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37566 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-13 00:04:00 +00:00
Evan Cheng
cc8fb46cdc Now if-converting all 4 variants of triangles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37565 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 23:54:05 +00:00
Owen Anderson
71fcebcf8a Fix test/Transforms/GVNPRE/2007-06-12-PhiTranslate.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37564 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 22:43:57 +00:00
Devang Patel
d75405fe95 isReachableFromEntry() is not suitable for post dominator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37562 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 17:50:25 +00:00
Devang Patel
de6e132055 Remove redundant check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37561 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 17:35:20 +00:00
Devang Patel
5fd306bf0d Check A dominates B and vise versa first while searching for nearest
common dominator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37559 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 17:17:57 +00:00
Owen Anderson
239e71201e Refactor some code, and fix test/Transforms/GVNPRE/2007-06-12-NoExit.ll by being more careful when using
post-dominator information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37556 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 16:57:50 +00:00
Dale Johannesen
ce0b23721e Sink CmpInst's to their uses to reduce register pressure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37554 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 16:50:17 +00:00
Devang Patel
4d42dea253 Break DominatorTree from ETNode.
Remove unused PostETForest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37551 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 00:54:38 +00:00
Owen Anderson
65d2862a60 Fix a few more bugs, including an instance of walking in reverse topological rather than topological order. This
fixes a testcase extracted from llvm-test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37550 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 00:50:47 +00:00
Devang Patel
bdfa1f837c Use SmallPtrSet instaed of std::set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37548 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 00:40:51 +00:00
Devang Patel
87f05a2416 Check immediate dominators first while searching for nearset common dominator.
Fix 80 col violations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37547 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 00:35:38 +00:00
Devang Patel
3726b82a55 Maintain DFS number in DomTreeNode itself.
This means now ETNodes are not useful anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37546 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 00:14:41 +00:00
Devang Patel
fe7d4e50b8 Add and use DominatorTreeBase::findNearestCommonDominator().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37545 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-11 23:31:22 +00:00
Lauro Ramos Venancio
976e2da081 Fix a typo in bswap lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37544 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-11 23:16:16 +00:00
Evan Cheng
9618bcaf7d Restructure code to reduce ifcvt compile time cost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37543 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-11 22:26:22 +00:00
Devang Patel
f60e5a2cd9 Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37542 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-11 21:45:31 +00:00
Devang Patel
b28aaadfff simplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37541 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-11 21:25:31 +00:00
Devang Patel
e3f653606d Simplify. Dominator Tree is required so always available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37540 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-11 21:18:00 +00:00
Owen Anderson
0e71466405 Handle functions with multiple exit blocks properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37539 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-11 16:25:17 +00:00
Devang Patel
2099ff065d Use DominatorTree instead of ETForest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37538 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-11 15:40:48 +00:00
Reid Spencer
a9bf49c7e3 Fix the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37537 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-10 00:19:17 +00:00
Owen Anderson
139fe848a2 Perform PRE of comparison operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37536 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-09 18:35:31 +00:00
Chris Lattner
fdbe720416 fix x86-64 mmx calling convention for real, which passes in integer gprs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37534 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-09 05:08:10 +00:00
Chris Lattner
6b7c21cc30 fix mmx handling bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37533 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-09 05:01:50 +00:00
Nick Lewycky
ae5eb7accf Fix edge case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37532 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-09 04:20:33 +00:00
Evan Cheng
1c9f91d7b2 Don't change CFG during analysis stage. Do so during ifcvt and invalidate predecessors accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37531 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-09 01:03:43 +00:00
Owen Anderson
b8b873cb7d Collect statistics from GVN-PRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37530 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 22:02:36 +00:00
Evan Cheng
7e75ba802e Carefully remove extraneous CFG edges after each ifcvt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37529 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 22:01:07 +00:00
Evan Cheng
bfd2ec4a8e Add a utility routine to check for unpredicated terminator instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37528 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 21:59:56 +00:00
Lauro Ramos Venancio
61718a6285 Define AsmTransCBE for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37527 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 21:06:23 +00:00
Owen Anderson
a7f916cf89 Fix typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37526 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 20:57:08 +00:00
Owen Anderson
8338ff5ff1 Fix a bug that was causing the elimination phase not to replace values when it should be.
With this patch, GVN-PRE now correctly optimizes the example from the thesis.

Many thanks to Daniel Berlin for helping me find errors in this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37525 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 20:44:02 +00:00
Evan Cheng
2acdbcccd8 Correct transfer predicate information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37524 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 19:17:12 +00:00
Evan Cheng
edf4896a14 Hidden options to help debugging ifcvt issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37523 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 19:10:51 +00:00
David Greene
2513330de8 Factor live variable analysis so it does not do register coalescing
simultaneously.  Move that pass to SimpleRegisterCoalescing.

This makes it easier to implement alternative register allocation and
coalescing strategies while maintaining reuse of the existing live
interval analysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37520 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 17:18:56 +00:00
Evan Cheng
ac5f142b9f Allow more cmp / bcc to be predicated; clean up triangle ifcvt checking code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37518 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 09:36:04 +00:00
Evan Cheng
1fc7cb695c Fix ARM condition code subsumission check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37517 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 09:14:47 +00:00
Evan Cheng
f81dea45b5 tBcc is not a barrier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37516 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 09:13:23 +00:00
Duncan Sands
6cc7608213 Use more realistically sized vectors. Reserve capacity if we know in advance
how much will be used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37515 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 08:59:11 +00:00
Owen Anderson
900997ba3b Small bugfix, and const-ify some methods (Thanks, Bill).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37513 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 01:52:45 +00:00
Devang Patel
dba2413b2e Update LoopSimplify to require and preserve DominatorTree only.
Now LoopSimplify does not require nor preserve ETForest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37512 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 01:50:32 +00:00
Dale Johannesen
1a90a5aebe Make throttle a hidden parameter, per review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37511 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 01:08:52 +00:00
Owen Anderson
397d405731 Add partial redundancy elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37510 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 01:03:01 +00:00
Dale Johannesen
53af4c01a8 Throttle tail merging; handling blocks with large numbers of predecessors
is too slow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37509 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 00:34:27 +00:00
Devang Patel
53c279b194 Use DominatorTree instead of ETForest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37507 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 00:17:13 +00:00
Devang Patel
f86a73cbef Do not preserve ETForest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37506 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 00:02:08 +00:00
Devang Patel
6ea7ac6a1e Use DominatorTree instead of ETForest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37505 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-07 23:53:38 +00:00
Devang Patel
e029b2c369 Add instruction level dominates(A,B) interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-07 23:52:40 +00:00
Evan Cheng
27af5c414b 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
2007-06-07 22:31:28 +00:00