Devang Patel
a28a7f1b2d
Split condition does not have to be ICmpInst in all cases.
...
llvm-svn: 41822
2007-09-11 00:12:56 +00:00
Devang Patel
f4202e91f8
Check all terminators inside loop.
...
llvm-svn: 41821
2007-09-10 23:57:58 +00:00
Chris Lattner
e804567cd8
remove some dead code, this is handled by constant folding.
...
llvm-svn: 41819
2007-09-10 23:46:29 +00:00
Devang Patel
2181b8e86a
Swap exit condition operands if it works.
...
llvm-svn: 41817
2007-09-10 23:34:06 +00:00
Chris Lattner
c75cbe6473
Prevent tailcallelim from breaking "recursive" calls to builtins.
...
llvm-svn: 41804
2007-09-10 20:58:55 +00:00
Devang Patel
f8ab0a9acc
Filter exit conditions which are not yet handled.
...
llvm-svn: 41800
2007-09-10 18:33:42 +00:00
Devang Patel
d7409fdce5
Require SCEV before LCSSA.
...
llvm-svn: 41798
2007-09-10 18:08:23 +00:00
Chris Lattner
85a51e0060
Don't zap back to back volatile load/stores
...
llvm-svn: 41759
2007-09-07 05:33:03 +00:00
Dale Johannesen
bed9dc423c
Next round of APFloat changes.
...
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double. Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)
llvm-svn: 41747
2007-09-06 18:13:44 +00:00
Nick Lewycky
0c5c47944a
Use isTrueWhenEqual. Thanks Chris!
...
llvm-svn: 41741
2007-09-06 02:40:25 +00:00
Nick Lewycky
b0b066eaaa
When the two operands of an icmp are equal, there are five possible predicates
...
that would make the icmp true. Fixes PR1637.
llvm-svn: 41740
2007-09-06 01:10:22 +00:00
Chuck Rose III
2320323647
Forgot to obey 80 column rule. Fixing that.
...
llvm-svn: 41725
2007-09-05 20:36:41 +00:00
Chuck Rose III
e58572233d
Added default parameters to GetElementPtrInstr constructor call. Visual Studio 2k5 was getting confused and was unable to compile it. Suspected compiler error.
...
llvm-svn: 41721
2007-09-05 16:54:38 +00:00
Devang Patel
f6ef552f3d
Insert cloned loop basic blocks before original loop header.
...
llvm-svn: 41713
2007-09-04 20:46:35 +00:00
David Greene
c656cbb8c2
Update GEP constructors to use an iterator interface to fix
...
GLIBCXX_DEBUG issues.
llvm-svn: 41697
2007-09-04 15:46:09 +00:00
Anton Korobeynikov
35322d745c
Silence warning while compiling with gcc 4.2
...
llvm-svn: 41676
2007-09-02 22:11:14 +00:00
Evan Cheng
ffac17a223
Fix a gcroot lowering bug.
...
llvm-svn: 41668
2007-09-01 02:00:51 +00:00
Chris Lattner
0e258b8518
Cut off crazy computation. This helps PR1622 slightly.
...
llvm-svn: 41522
2007-08-28 04:23:55 +00:00
Devang Patel
d2456a171d
Use simpler test to filter loops.
...
llvm-svn: 41516
2007-08-27 21:34:31 +00:00
David Greene
703623d571
Update InvokeInst to work like CallInst
...
llvm-svn: 41506
2007-08-27 19:04:21 +00:00
Dan Gohman
71eaf62e5f
Change comments to refer to @malloc and @free instead of %malloc and %free.
...
llvm-svn: 41488
2007-08-27 16:11:48 +00:00
Anton Korobeynikov
24fb6b2f8c
Don't promote volatile loads/stores. This is needed (for example) to handle setjmp/longjmp properly.
...
This fixes PR1520.
llvm-svn: 41461
2007-08-26 21:43:30 +00:00
Owen Anderson
2b9ec7ff33
Don't DSe volatile stores.
...
llvm-svn: 41456
2007-08-26 21:14:47 +00:00
Devang Patel
6114751544
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
c1ef32ef3d
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
4e63e1f5b5
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
f5a01bf025
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
4bc9298f2a
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
4be56a5d12
Reject ICMP_NE as index split condition.
...
llvm-svn: 41357
2007-08-24 06:02:25 +00:00
Devang Patel
5e46fac6de
Tightenup loop filter.
...
llvm-svn: 41356
2007-08-24 05:36:56 +00:00
Devang Patel
504dc0aaed
Remove incomplete cost analysis.
...
llvm-svn: 41354
2007-08-24 05:21:13 +00:00
Chris Lattner
b0f158cfdf
rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()
...
Add an APSInt::toString() method.
llvm-svn: 41309
2007-08-23 05:15:32 +00:00
Devang Patel
887db2d832
Remove dead code.
...
llvm-svn: 41295
2007-08-22 21:07:41 +00:00
Devang Patel
6f4f23320d
Fix typo.
...
llvm-svn: 41292
2007-08-22 20:55:18 +00:00
Devang Patel
31206b56d5
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
90da534987
Refactor loop condition check in a separate function.
...
llvm-svn: 41282
2007-08-22 18:27:01 +00:00
Devang Patel
cd8beb7645
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
a12000d572
Rename bunch of variables.
...
llvm-svn: 41250
2007-08-21 21:12:02 +00:00
Devang Patel
f98db5e62a
Preserve LCSSA.
...
llvm-svn: 41246
2007-08-21 19:47:46 +00:00
Devang Patel
b5933bbbd5
Use SmallVector instead of std::vector.
...
llvm-svn: 41207
2007-08-21 00:31:24 +00:00
Devang Patel
8f4228d619
s/ExitBlock/ExitingBlock/g
...
llvm-svn: 41204
2007-08-20 23:51:18 +00:00
Devang Patel
49c4f9a889
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
c2e2d15f45
Do not split loops rejected by processOneIterationLoop().
...
llvm-svn: 41194
2007-08-20 20:24:15 +00:00
Nick Lewycky
bfa9499a88
Oops, remove assert that wasn't meant to be committed.
...
llvm-svn: 41170
2007-08-18 23:21:28 +00:00
Nick Lewycky
5b5b1ab9e0
Never insert duplicate edges.
...
llvm-svn: 41169
2007-08-18 23:18:03 +00:00
Nick Lewycky
a0d49dac26
Typo.
...
llvm-svn: 41168
2007-08-18 15:08:56 +00:00
Devang Patel
1282b6e181
Avoid spliting loops where two split condition branches are not independent.
...
llvm-svn: 41148
2007-08-18 00:00:32 +00:00
Devang Patel
d1fcfcc76c
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
Owen Anderson
f5023a7a84
Factor out some code into a helper function.
...
llvm-svn: 41131
2007-08-16 22:51:56 +00:00
Owen Anderson
221a43604e
Add some more comments to GVN.
...
llvm-svn: 41129
2007-08-16 22:02:55 +00:00