1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

1124 Commits

Author SHA1 Message Date
Chris Lattner
77fe880dcf Remove extraneous #include
finegrainify namespacification

llvm-svn: 10589
2003-12-23 07:43:38 +00:00
Chris Lattner
30fa61ca6c Fix memory corruption bug PR193
llvm-svn: 10586
2003-12-22 23:49:36 +00:00
Chris Lattner
8ec8b9c28a 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
1f0b2be06c Implement IndVarsSimplify/pointer-indvars.ll, transforming pointer
arithmetic into "array subscripts"

llvm-svn: 10580
2003-12-22 05:02:01 +00:00
Chris Lattner
dfe3e25d89 Fix PR194
llvm-svn: 10573
2003-12-22 03:58:44 +00:00
Chris Lattner
e0021ba353 Fix ADCE/2003-12-19-MergeReturn.llx
llvm-svn: 10539
2003-12-19 09:08:34 +00:00
Chris Lattner
399d5ad32e Remove the wierd "Operands" loop, by traversing basicblocks in reverse order
llvm-svn: 10536
2003-12-19 08:18:16 +00:00
Chris Lattner
68db81e684 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
a0b16fb57d Generalize a special case to fix PR187
llvm-svn: 10531
2003-12-19 06:27:08 +00:00
Chris Lattner
e0e1fe84e8 Factor code out into the Utils library
llvm-svn: 10530
2003-12-19 05:58:40 +00:00
Chris Lattner
c1952a1fd6 Add new function
llvm-svn: 10529
2003-12-19 05:56:28 +00:00
John Criswell
3304c39869 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
0659bb0c4a Merged in RELEASE_11.
llvm-svn: 10516
2003-12-18 16:43:17 +00:00
Chris Lattner
17122cbe7b 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
062d3a4ab5 Fix for PR185 & IndVarsSimplify/2003-12-15-Crash.llx
llvm-svn: 10473
2003-12-15 17:34:02 +00:00
Chris Lattner
5fc36a496f 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
0d3a8b1cb4 Do not promote volatile alias sets into registers
llvm-svn: 10458
2003-12-14 04:52:31 +00:00
Chris Lattner
1f7737b44f 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
bba48ffc66 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
6eae2a120e 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
9b1a0ca03b Don't allow dead instructions to stop sinking early.
llvm-svn: 10386
2003-12-10 20:43:29 +00:00
Chris Lattner
677f1ebb07 Fix bug: IndVarsSimplify/2003-12-10-RemoveInstrCrash.llx
llvm-svn: 10385
2003-12-10 20:43:04 +00:00
Chris Lattner
0b72993a49 Finegrainify namespacification
Fix bug: LowerInvoke/2003-12-10-Crash.llx

llvm-svn: 10382
2003-12-10 20:22:42 +00:00
Chris Lattner
2c641008e6 Finegrainify namespacification
Reorder #includes
Implement: IndVarsSimplify/2003-12-10-IndVarDeadCode.ll

llvm-svn: 10376
2003-12-10 18:06:47 +00:00
Chris Lattner
8c7f69563e Finegrainify namespacification
Fix bug: LoopSimplify/2003-12-10-ExitBlocksProblem.ll

llvm-svn: 10373
2003-12-10 17:20:35 +00:00
Chris Lattner
d6d41b5e23 Simplify code
llvm-svn: 10371
2003-12-10 16:58:24 +00:00
Chris Lattner
7eff699231 Avoid performing two identical lookups when one will suffice
llvm-svn: 10370
2003-12-10 16:57:24 +00:00
Chris Lattner
94944ee4aa 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
fe8fd04cce 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
c49a27b2b6 Do not insert one entry PHI nodes in split exit blocks!
llvm-svn: 10348
2003-12-09 23:12:55 +00:00
Chris Lattner
f5f65c4000 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
2ffca818b6 Fine grainify namespacification
Code cleanups
Make LICM::SafeToHoist marginally more efficient

llvm-svn: 10341
2003-12-09 17:18:00 +00:00
Chris Lattner
a62c29757d 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
647b7d8869 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
be2b3fb417 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
0dbb3822a4 Implement RaiseAllocations/FreeCastConstantExpr.ll
llvm-svn: 10305
2003-12-07 01:42:08 +00:00
Chris Lattner
60dae0e7d9 * 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
0d57e06a37 Finegrainify namespacification
Fix regressions ScalarRepl/basictest.ll & arraytest.ll

llvm-svn: 10287
2003-12-02 17:43:55 +00:00
Chris Lattner
a29f6743a1 Fix test: Transforms/LevelRaise/2003-11-28-IllegalTypeConversion.ll
Some gep generalization changes

llvm-svn: 10252
2003-11-29 05:31:25 +00:00
Chris Lattner
7b895914a2 Do not use index type to determine what it is indexing into!
llvm-svn: 10226
2003-11-25 21:09:18 +00:00
Chris Lattner
7d794a8431 Delete dead line
llvm-svn: 10164
2003-11-22 02:26:17 +00:00
Chris Lattner
87e444b65b Fix bug: Transforms/PruneEH/2003-11-21-PHIUpdate.llx
llvm-svn: 10163
2003-11-22 02:20:36 +00:00
Chris Lattner
a88e567e00 Do not crash when deleing a region with a dead invoke instruction
llvm-svn: 10161
2003-11-22 02:13:08 +00:00
Chris Lattner
3b71386e30 Finegrainify namespacification
The module stripping pass should not strip symbols on external globals

llvm-svn: 10157
2003-11-22 01:29:35 +00:00
Chris Lattner
c837881d43 Considering that CI is not even IN SCOPE here, I wooda thought the compiler
would have caught this.  *sigh*

llvm-svn: 10142
2003-11-21 21:57:29 +00:00
Chris Lattner
9ae9c45d43 Finegrainify namespacification
llvm-svn: 10138
2003-11-21 21:54:22 +00:00
Chris Lattner
ebbe1376b3 Get rid of using decls, finegrainify namespacification
llvm-svn: 10137
2003-11-21 21:52:10 +00:00
Chris Lattner
5f38817de9 * Finegrainify namespacification
* Make the cost metric for passing constants in as arguments to functions MUCH
  more accurate, by actually estimating the amount of code that will be constant
  propagated away.

llvm-svn: 10136
2003-11-21 21:46:09 +00:00
Chris Lattner
4a92f545ba Finegrainify namespacification
Print out the costs for functions that AREN'T inlined as well

llvm-svn: 10135
2003-11-21 21:45:31 +00:00
Chris Lattner
2b7309dd1c Minor cleanups and simplifications
llvm-svn: 10127
2003-11-21 16:52:05 +00:00