Chris Lattner
05fe6847a8
Implement SCCP/phitest.ll
...
llvm-svn: 10763
2004-01-12 03:57:30 +00:00
Chris Lattner
fafa2ff2d6
Implement Transforms/ScalarRepl/phinodepromote.ll, which is an important
...
case that the C/C++ front-end generates.
llvm-svn: 10761
2004-01-12 01:18:32 +00:00
Chris Lattner
3bcecb92f3
Update obsolete comments
...
Fix iterator invalidation problems which was causing -mstrip to miss some
entries, and read free'd memory. This shrinks the symbol table of 254.gap
from 333 to 284 bytes! :)
llvm-svn: 10751
2004-01-10 21:36:49 +00:00
Chris Lattner
df3c342a4c
Finegrainify namespacification
...
llvm-svn: 10727
2004-01-09 06:12:26 +00:00
Chris Lattner
fdf788eebd
Remove dependence on structure index type. s/MT/FT
...
llvm-svn: 10726
2004-01-09 06:02:51 +00:00
Chris Lattner
49525f8cf4
Finegrainify namespacification
...
llvm-svn: 10725
2004-01-09 06:02:20 +00:00
Chris Lattner
ff66958154
Finegrainify namespacification
...
add flags for PR82
llvm-svn: 10724
2004-01-09 05:53:38 +00:00
Chris Lattner
9cc1a0e40d
Inching towards fixing PR82
...
llvm-svn: 10722
2004-01-09 05:44:50 +00:00
Chris Lattner
59d2d7fc33
Improve encapsulation in the Loop and LoopInfo classes by eliminating the
...
getSubLoops/getTopLevelLoops methods, replacing them with iterator-based
accessors.
llvm-svn: 10714
2004-01-08 00:09:44 +00:00
Chris Lattner
56db5e98c8
Merging constants can cause further room for improvement. Iterate until
...
we converge
llvm-svn: 10618
2003-12-28 07:19:08 +00:00
Chris Lattner
30513e0a3a
rename ClassifyExpression -> ClassifyExpr
...
llvm-svn: 10592
2003-12-23 08:04:08 +00:00
Chris Lattner
7e755e443f
More minor non-functional changes. This now computes the exit condition, though
...
it doesn't do anything with it.
llvm-svn: 10590
2003-12-23 07:47:09 +00:00
Chris Lattner
93bfb6c741
Remove extraneous #include
...
finegrainify namespacification
llvm-svn: 10589
2003-12-23 07:43:38 +00:00
Chris Lattner
c2ee05427e
Fix memory corruption bug PR193
...
llvm-svn: 10586
2003-12-22 23:49:36 +00:00
Chris Lattner
a02d5aa6ce
Don't mind me, I'm just refactoring away. This patch makes room for LFTR, but
...
contains no functionality changes.
llvm-svn: 10583
2003-12-22 09:53:29 +00:00
Chris Lattner
6449dcefbc
Implement IndVarsSimplify/pointer-indvars.ll, transforming pointer
...
arithmetic into "array subscripts"
llvm-svn: 10580
2003-12-22 05:02:01 +00:00
Chris Lattner
d3678bc7c5
Fix PR194
...
llvm-svn: 10573
2003-12-22 03:58:44 +00:00
Chris Lattner
fc7bdac1b3
Fix ADCE/2003-12-19-MergeReturn.llx
...
llvm-svn: 10539
2003-12-19 09:08:34 +00:00
Chris Lattner
918460190f
Remove the wierd "Operands" loop, by traversing basicblocks in reverse order
...
llvm-svn: 10536
2003-12-19 08:18:16 +00:00
Chris Lattner
547192d688
Implement LICM/sink_multiple.ll, by sinking all possible instructions in the
...
loop before hoisting any.
llvm-svn: 10534
2003-12-19 07:22:45 +00:00
Chris Lattner
031a3f8cc7
Generalize a special case to fix PR187
...
llvm-svn: 10531
2003-12-19 06:27:08 +00:00
Chris Lattner
91daeb5431
Factor code out into the Utils library
...
llvm-svn: 10530
2003-12-19 05:58:40 +00:00
Chris Lattner
04efa4b155
Add new function
...
llvm-svn: 10529
2003-12-19 05:56:28 +00:00
John Criswell
b22e9b4b35
Reverted back to previous revision - this was previously merged
...
according to the CVS log messages.
llvm-svn: 10517
2003-12-18 17:19:19 +00:00
John Criswell
86a3a48697
Merged in RELEASE_11.
...
llvm-svn: 10516
2003-12-18 16:43:17 +00:00
Chris Lattner
9e2b42a0c8
When we delete instructions from the loop, make sure to remove them from the
...
AliasSetTracker as well.
llvm-svn: 10507
2003-12-18 08:12:32 +00:00
Chris Lattner
6c08bb8b8e
Fix for PR185 & IndVarsSimplify/2003-12-15-Crash.llx
...
llvm-svn: 10473
2003-12-15 17:34:02 +00:00
Chris Lattner
884e824534
Refactor code just a little bit, allowing us to implement TailCallElim/return_constant.ll
...
llvm-svn: 10467
2003-12-14 23:57:39 +00:00
Chris Lattner
d1c371c32c
Do not promote volatile alias sets into registers
...
llvm-svn: 10458
2003-12-14 04:52:31 +00:00
Chris Lattner
34399dda2d
Fix LICM/2003-12-11-SinkingToPHI.ll, and quite possibly all of the other known problems in the universe.
...
llvm-svn: 10409
2003-12-11 22:23:32 +00:00
Chris Lattner
027253b0d5
verifyFunction depends on dominator info, which levelraise does not declare
...
that it needs. This is pretty scary code! This fixes
Regression.Transforms.LevelRaise.2002-07-16-SourceAndDestCrash
Regression.Transforms.LevelRaise.2002-07-31-AssertionFailure
llvm-svn: 10406
2003-12-11 21:47:37 +00:00
Chris Lattner
6281fd3ead
Fix bug: LICM/sink_multiple_exits.ll
...
Thanks for pointing this out John :)
llvm-svn: 10387
2003-12-10 22:35:56 +00:00
Chris Lattner
55c2113b7b
Don't allow dead instructions to stop sinking early.
...
llvm-svn: 10386
2003-12-10 20:43:29 +00:00
Chris Lattner
713907e2b8
Fix bug: IndVarsSimplify/2003-12-10-RemoveInstrCrash.llx
...
llvm-svn: 10385
2003-12-10 20:43:04 +00:00
Chris Lattner
7e5bd59da2
Finegrainify namespacification
...
Fix bug: LowerInvoke/2003-12-10-Crash.llx
llvm-svn: 10382
2003-12-10 20:22:42 +00:00
Chris Lattner
ccd9f3c1f8
Finegrainify namespacification
...
Reorder #includes
Implement: IndVarsSimplify/2003-12-10-IndVarDeadCode.ll
llvm-svn: 10376
2003-12-10 18:06:47 +00:00
Chris Lattner
7710f2f49e
Finegrainify namespacification
...
Fix bug: LoopSimplify/2003-12-10-ExitBlocksProblem.ll
llvm-svn: 10373
2003-12-10 17:20:35 +00:00
Chris Lattner
6364314a6e
Simplify code
...
llvm-svn: 10371
2003-12-10 16:58:24 +00:00
Chris Lattner
48b4b852b4
Avoid performing two identical lookups when one will suffice
...
llvm-svn: 10370
2003-12-10 16:57:24 +00:00
Chris Lattner
edda1af35a
Make LICM itself a bit more efficient, and make the generated code more efficient too: don't insert a store in every exit block, because a particular block may be exited to more than once by a loop
...
llvm-svn: 10369
2003-12-10 15:56:24 +00:00
Chris Lattner
aaaea51090
Implement instruction sinking out of loops. This still can do a little bit
...
better job, but this is the majority of the work. This implements
LICM/sink*.ll
llvm-svn: 10358
2003-12-10 06:41:05 +00:00
Chris Lattner
6c237bcdf2
Do not insert one entry PHI nodes in split exit blocks!
...
llvm-svn: 10348
2003-12-09 23:12:55 +00:00
Chris Lattner
65c1193d55
Refactor code a little bit, eliminating the gratuitous InstVisitor, which
...
should make subsequent changes simpler. This also allows us to hoist vaarg
and vanext instructions
llvm-svn: 10342
2003-12-09 19:32:44 +00:00
Chris Lattner
c05176843e
Fine grainify namespacification
...
Code cleanups
Make LICM::SafeToHoist marginally more efficient
llvm-svn: 10341
2003-12-09 17:18:00 +00:00
Chris Lattner
50663a1a78
Implement: TailCallElim/accum_recursion_constant_arg.ll
...
Also make sure to clean up any PHI nodes that are inserted which are pointless.
llvm-svn: 10333
2003-12-08 23:37:35 +00:00
Chris Lattner
198e620752
Implement: test/Regression/Transforms/TailCallElim/accum_recursion.ll
...
We now insert accumulator variables as necessary to eliminate tail recursion
more aggressively. This is still fairly limited, but allows us to transform
fib/factorial, and other functions into nice happy loops. :)
llvm-svn: 10332
2003-12-08 23:19:26 +00:00
Chris Lattner
a7b6f3ab9c
Cleanup and restructure the code to make it easier to read and maintain.
...
The only functionality change is that we now implement:
Regression/Transforms/TailCallElim/intervening-inst.ll
Which is really kinda pointless, because it means that trivially dead code
does not interfere with -tce, but trivially dead code probably wouldn't be
around anytime when this pass is run anyway.
The point of including this change it to support other more aggressive
transformations when we have the analysis capabilities to do so.
llvm-svn: 10312
2003-12-08 05:34:54 +00:00
Chris Lattner
771804b541
Implement RaiseAllocations/FreeCastConstantExpr.ll
...
llvm-svn: 10305
2003-12-07 01:42:08 +00:00
Chris Lattner
8427bffb9a
* Finegrainify namespacification
...
* Transform: free <ty>* (cast <ty2>* X to <ty>*) into free <ty2>* X
llvm-svn: 10303
2003-12-07 01:24:23 +00:00
Chris Lattner
40d2aeb28f
Finegrainify namespacification
...
Fix regressions ScalarRepl/basictest.ll & arraytest.ll
llvm-svn: 10287
2003-12-02 17:43:55 +00:00