Evan Cheng
|
1236ef7bcc
|
Only remove the edge from entry to false if false block is merged.
llvm-svn: 37503
|
2007-06-07 22:31:28 +00:00 |
Evan Cheng
|
d3f3f0adad
|
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.
llvm-svn: 37487
|
2007-06-07 08:13:00 +00:00 |
Evan Cheng
|
be9859eea2
|
Lots of bug fixes. Now finally in a reasonable state.
llvm-svn: 37485
|
2007-06-07 02:12:15 +00:00 |
Owen Anderson
|
cfb6f40424
|
Quick patch to fix the build, based on what it appears Evan meant to write.
Evan, please check that this is in fact correct.
llvm-svn: 37471
|
2007-06-06 16:22:00 +00:00 |
Evan Cheng
|
9030b98aca
|
Lots of bug fixes.
llvm-svn: 37467
|
2007-06-06 10:16:17 +00:00 |
Evan Cheng
|
e4ec918be0
|
If a unconditional branch is added to branch to the false path during ifcvt, the predicated block cannot be iteratively ifcvted.
llvm-svn: 37456
|
2007-06-06 02:08:52 +00:00 |
Evan Cheng
|
b30a89457c
|
Minor statistics counting bug.
llvm-svn: 37451
|
2007-06-06 01:12:44 +00:00 |
Evan Cheng
|
30565998bb
|
Fix a couple of typos and be smarter about order of blocks when ifcvt a diamond.
llvm-svn: 37449
|
2007-06-06 00:57:55 +00:00 |
Evan Cheng
|
7948422b78
|
Fix diamond shape ifcvt bugs.
llvm-svn: 37444
|
2007-06-05 23:46:14 +00:00 |
Evan Cheng
|
c1a0b8ce1d
|
ReplaceUsesOfBlockWith() can modify the predecessors list.
llvm-svn: 37441
|
2007-06-05 22:03:53 +00:00 |
Evan Cheng
|
3e5bf0827c
|
Do not ifcvt if either true / false path is a backedge. Not profitable in almost all cases.
llvm-svn: 37440
|
2007-06-05 20:38:42 +00:00 |
Evan Cheng
|
2c1acd6d9e
|
I had a senior moment.
llvm-svn: 37433
|
2007-06-05 07:05:25 +00:00 |
Evan Cheng
|
6e4babe8cc
|
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.
llvm-svn: 37430
|
2007-06-05 01:31:40 +00:00 |
Evan Cheng
|
17aad8164e
|
Fix some subtle bugs: bug during succeessor copying; incorrectly updating states of ifcvted blocks.
llvm-svn: 37429
|
2007-06-05 00:07:37 +00:00 |
Evan Cheng
|
91233153bf
|
Forgot to check for if iterator reached the end.
llvm-svn: 37420
|
2007-06-04 20:33:36 +00:00 |
Evan Cheng
|
312b723af2
|
Let IfConverter loose. Allow more aggressive subsumptions; reorder basic blocks to expose more ifcvt opportunities; code clean up and fixes.
llvm-svn: 37409
|
2007-06-04 06:47:22 +00:00 |
Evan Cheng
|
4dcf1e8582
|
Correctly mark early-exit on the false path.
llvm-svn: 37387
|
2007-06-01 20:29:21 +00:00 |
Evan Cheng
|
6a2cf070cc
|
Ifcvt triangle: don't ifcvt 'true' BB if it has other predecessors; don't merge 'false' BB if it has other predecessors.
llvm-svn: 37382
|
2007-06-01 07:41:07 +00:00 |
Evan Cheng
|
95c7917d92
|
Remove a bogus check. Even terminators in a ifcvt need to be predicated. Unconditional branches can usually be converted to conditional ones.
llvm-svn: 37380
|
2007-06-01 00:55:26 +00:00 |
Evan Cheng
|
20e05997f5
|
Allow multiple ifcvt candidates to share children blocks; add some debugging code.
llvm-svn: 37379
|
2007-06-01 00:12:12 +00:00 |
Evan Cheng
|
e6ccb6c5ed
|
Fix a typo.
llvm-svn: 37374
|
2007-05-31 20:53:33 +00:00 |
Evan Cheng
|
905a8f4940
|
Change traversal order to bottom up in preparation for more aggressive if-conversion.
llvm-svn: 37365
|
2007-05-30 19:49:19 +00:00 |
Evan Cheng
|
20f7d30f92
|
Don't merge in tail block of a diamond if it has more than one predecessors after if-conversion.
llvm-svn: 37353
|
2007-05-29 23:37:20 +00:00 |
Evan Cheng
|
c2237ce217
|
If there is an empty block between a source and its successor block, it still requires a unconditional branch.
llvm-svn: 37344
|
2007-05-29 22:31:16 +00:00 |
Evan Cheng
|
13f5f7df95
|
Silly boog.
llvm-svn: 37328
|
2007-05-25 00:59:01 +00:00 |
Evan Cheng
|
d0e669199b
|
Preliminary iterative if-conversion support.
llvm-svn: 37309
|
2007-05-23 07:23:16 +00:00 |
Evan Cheng
|
e26c0916a3
|
If-convert early exit blocks (returns, etc.); bug fixes, etc.
llvm-svn: 37270
|
2007-05-21 22:22:58 +00:00 |
Evan Cheng
|
018cffbca4
|
Clean up.
llvm-svn: 37237
|
2007-05-18 19:32:08 +00:00 |
Evan Cheng
|
faaf716540
|
Change to depth-first traversal.
llvm-svn: 37236
|
2007-05-18 19:26:33 +00:00 |
Evan Cheng
|
2e82cefd24
|
Some restructuring in preparation for most aggressive if-conversion.
llvm-svn: 37231
|
2007-05-18 18:14:37 +00:00 |
Evan Cheng
|
f25d3a5d73
|
Watch out for blocks that end with a return.
llvm-svn: 37227
|
2007-05-18 17:06:53 +00:00 |
Evan Cheng
|
478b805956
|
If true / false blocks fallthrough before ifcvt, add unconditional branches to ifcvt'd block.
llvm-svn: 37200
|
2007-05-18 01:55:58 +00:00 |
Evan Cheng
|
0f745da4fe
|
Make use of target specific block size limits; bug fixes.
llvm-svn: 37195
|
2007-05-18 00:20:58 +00:00 |
Evan Cheng
|
af71610429
|
isBlockPredicable() always ignore terminal instructions; add comments.
llvm-svn: 37126
|
2007-05-16 21:54:37 +00:00 |
Evan Cheng
|
5ea933a009
|
Rename M_PREDICATED to M_PREDICABLE; Moved isPredicable() to MachineInstr.
llvm-svn: 37121
|
2007-05-16 20:56:08 +00:00 |
Evan Cheng
|
35fc2119b0
|
Devang points out that we need an assertion here.
llvm-svn: 37097
|
2007-05-16 05:11:10 +00:00 |
Evan Cheng
|
f5e53a58db
|
Initial commit of (very basic) if converter.
llvm-svn: 37092
|
2007-05-16 02:00:57 +00:00 |