1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 14:32:51 +01:00
Commit Graph

55 Commits

Author SHA1 Message Date
Devang Patel
14b9a01c02 Skeleton for transformations to truncate loop's iteration space.
llvm-svn: 42054
2007-09-17 20:39:48 +00:00
Bill Wendling
843ac5aebe Temporary reverting r41817
(http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070910/053370.html). It's
causing SPASS to fail.

llvm-svn: 41938
2007-09-14 01:13:55 +00:00
Devang Patel
8f8fe2f0da Avoid negative logic.
llvm-svn: 41829
2007-09-11 01:10:45 +00:00
Devang Patel
9bc265b94a Refactor code into a separate method.
llvm-svn: 41826
2007-09-11 00:42:56 +00:00
Devang Patel
49ffe783eb Clear split info object.
llvm-svn: 41823
2007-09-11 00:23:56 +00:00
Devang Patel
8394964f1a Split condition does not have to be ICmpInst in all cases.
llvm-svn: 41822
2007-09-11 00:12:56 +00:00
Devang Patel
82374f7476 Check all terminators inside loop.
llvm-svn: 41821
2007-09-10 23:57:58 +00:00
Devang Patel
ce76c29be0 Swap exit condition operands if it works.
llvm-svn: 41817
2007-09-10 23:34:06 +00:00
Devang Patel
76790c1b28 Filter exit conditions which are not yet handled.
llvm-svn: 41800
2007-09-10 18:33:42 +00:00
Devang Patel
c649f24384 Use simpler test to filter loops.
llvm-svn: 41516
2007-08-27 21:34:31 +00:00
Devang Patel
cbfa564c1c Move exit condition and exit branch from exiting block into loop header and dominator info. This avoid execution of dead iteration. Loop is already filter in the beginning such that this change is safe.
llvm-svn: 41394
2007-08-25 02:39:24 +00:00
Devang Patel
d961a55c5a Constant split values needs upper bound and lower bound check, just like any other split value.
llvm-svn: 41389
2007-08-25 01:09:14 +00:00
Devang Patel
027410a7aa While calculating upper loop bound for first loop and lower loop bound for second loop, take care of edge cases.
llvm-svn: 41387
2007-08-25 00:56:38 +00:00
Devang Patel
c46dc61548 Fix regression that I caused yesterday night while adding logic to select appropriate split condition branch.
llvm-svn: 41365
2007-08-24 19:32:26 +00:00
Devang Patel
0b351a64db It is not safe to execute split condition's true branch first all the time. If split
condition predicate is GT or GE then execute false branch first.

llvm-svn: 41358
2007-08-24 06:17:19 +00:00
Devang Patel
59af13f0cf Reject ICMP_NE as index split condition.
llvm-svn: 41357
2007-08-24 06:02:25 +00:00
Devang Patel
4b52632179 Tightenup loop filter.
llvm-svn: 41356
2007-08-24 05:36:56 +00:00
Devang Patel
8b1d0a1ad2 Remove incomplete cost analysis.
llvm-svn: 41354
2007-08-24 05:21:13 +00:00
Devang Patel
4ad7c57729 Remove dead code.
llvm-svn: 41295
2007-08-22 21:07:41 +00:00
Devang Patel
798ba45c39 Fix typo.
llvm-svn: 41292
2007-08-22 20:55:18 +00:00
Devang Patel
59b8967a74 Cosmetic change
"True Loop" and "False Loop" naming terminology to refer two loops
after loop cloning is confusing. Instead just use A_Loop and B_Loop.

llvm-svn: 41287
2007-08-22 19:33:29 +00:00
Devang Patel
797fbef078 Refactor loop condition check in a separate function.
llvm-svn: 41282
2007-08-22 18:27:01 +00:00
Devang Patel
7e6f9f4779 Fix thinko.
Starting value of second loop's induction variable can not be lower 
then starting value of original loop's induction variable.

llvm-svn: 41280
2007-08-22 18:07:47 +00:00
Devang Patel
60f5256cd1 Rename bunch of variables.
llvm-svn: 41250
2007-08-21 21:12:02 +00:00
Devang Patel
4fe5509c7d Preserve LCSSA.
llvm-svn: 41246
2007-08-21 19:47:46 +00:00
Devang Patel
b64f73f8f0 s/ExitBlock/ExitingBlock/g
llvm-svn: 41204
2007-08-20 23:51:18 +00:00
Devang Patel
b6ebf8cbf3 Replace indunction variable with split value in loop body.
This fixes art miscompile.

llvm-svn: 41195
2007-08-20 20:49:01 +00:00
Devang Patel
6c91023dad Do not split loops rejected by processOneIterationLoop().
llvm-svn: 41194
2007-08-20 20:24:15 +00:00
Devang Patel
17cd20c077 Avoid spliting loops where two split condition branches are not independent.
llvm-svn: 41148
2007-08-18 00:00:32 +00:00
Devang Patel
fded73828f When one branch of condition is eliminated then head of the other
branch is not necessary immediate dominators of merge blcok in all cases.

llvm-svn: 41144
2007-08-17 21:59:16 +00:00
Devang Patel
423d18e306 Dominance frontier is now required.
llvm-svn: 41096
2007-08-15 03:34:53 +00:00
Devang Patel
315ea9c519 Cleanup removeBlocks.
Use dominance frontier to fixup incoming edges of successor blocks not domianted by DeadBB.
Use df_iterator to walk and delete basic blocks dominated by DeadBB.

llvm-svn: 41095
2007-08-15 03:31:47 +00:00
Reid Spencer
2cfe29fc0b Remove unneeded header file.
llvm-svn: 41094
2007-08-15 03:01:04 +00:00
Devang Patel
b0924a406a Avoid triangle loops.
llvm-svn: 41093
2007-08-15 02:14:55 +00:00
Devang Patel
d39b9d41bb Avoid nested loops at the moment.
llvm-svn: 41090
2007-08-14 23:53:57 +00:00
Devang Patel
7ff808f08e Fix dominance frontier update while removing blocks.
llvm-svn: 41082
2007-08-14 18:35:57 +00:00
Devang Patel
5d8b2b3293 Handle last value assignments.
llvm-svn: 41063
2007-08-14 01:30:57 +00:00
Devang Patel
55b6a8f212 StartValue is already calculated.
llvm-svn: 41062
2007-08-14 00:15:45 +00:00
Devang Patel
762259ba73 Preserve simple analysis.
llvm-svn: 41054
2007-08-13 22:22:13 +00:00
Devang Patel
e3ea62e49a Preserve dominator info.
llvm-svn: 41053
2007-08-13 22:13:24 +00:00
Devang Patel
63d1affed8 Split loops and do CFG cleanup.
llvm-svn: 41029
2007-08-12 07:02:51 +00:00
Reid Spencer
c71871ba30 Remove unused variables.
llvm-svn: 41028
2007-08-12 04:45:36 +00:00
Devang Patel
c8cff19c2e Clone loop.
llvm-svn: 40998
2007-08-10 18:07:13 +00:00
Devang Patel
b1160475fd Remove unncessary duplication.
llvm-svn: 40979
2007-08-10 00:59:03 +00:00
Devang Patel
23c5e2dcd3 Calculate exit and start value of true loop and false loop respectively.
llvm-svn: 40978
2007-08-10 00:53:35 +00:00
Devang Patel
51da0a465a ExitCondition and Induction variable are loop constraints
not split condition constraints.

llvm-svn: 40977
2007-08-10 00:33:50 +00:00
Devang Patel
652613b1db Traverse loop blocks' terminators to find split candidates.
llvm-svn: 40960
2007-08-09 01:39:01 +00:00
Devang Patel
30bf54b9d3 Add cost analysis.
llvm-svn: 40952
2007-08-08 22:25:28 +00:00
Devang Patel
ed9b08c44f Preserve dom info while processing one iteration loop.
llvm-svn: 40947
2007-08-08 21:39:47 +00:00
Devang Patel
a74e533c5e Clear split info.
llvm-svn: 40944
2007-08-08 21:18:27 +00:00