1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

270 Commits

Author SHA1 Message Date
Chris Lattner
61d594690a Fix a huge performance problem in reassociate by introducing a
rank map cache for instruction ranks

llvm-svn: 5030
2002-12-15 03:56:00 +00:00
Chris Lattner
18fe81719d Minor changes:
* Reword comment to make more clear
  * Don't print out BB's after modification made
  * Don't delete and new an instruction when we need to move something, just move it.

llvm-svn: 5029
2002-12-15 03:49:50 +00:00
Chris Lattner
be53e88459 Remove dead code
llvm-svn: 4952
2002-12-07 18:42:13 +00:00
Chris Lattner
6c9d57c590 Fix bug: 2002-12-05-MissedConstProp.ll pointed out by Casey Carter
llvm-svn: 4935
2002-12-05 22:41:53 +00:00
Chris Lattner
b5027095e5 - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.

llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
0141841bc4 Fix warning
llvm-svn: 4649
2002-11-09 00:49:43 +00:00
Chris Lattner
f03f32d2e8 Fix spelling error
llvm-svn: 4645
2002-11-08 23:18:37 +00:00
Chris Lattner
aaf2fa34a5 Instcombine this away:
%A = getelementptr [4 x int]* %M, long 0, long 0
        %B = getelementptr int* %A, long 2

llvm-svn: 4536
2002-11-04 16:43:32 +00:00
Chris Lattner
ecddf3396f Add a transformation to turn:
malloc Ty, C
int
  malloc [C x Ty], 1

llvm-svn: 4534
2002-11-04 16:18:53 +00:00
Chris Lattner
b9fa84c1ed Make sure to _delete_ memory allocated by worklists
llvm-svn: 4523
2002-11-04 02:54:22 +00:00
Chris Lattner
b913f4e785 Fixes to the reassociate pass to make it respect dominance properties
Huge thanks go to Casey Carter for writing this fix, reassociate is now
reoperational!

llvm-svn: 4471
2002-10-31 17:12:59 +00:00
Chris Lattner
1ec9725ef8 BreakCriticalEdges should update dominance frontier information as well as
other dominance stuff.  Patch contributed by Casey Carter

llvm-svn: 4457
2002-10-31 02:44:36 +00:00
Misha Brukman
c9c721edf0 Fix spelling of `propagate'.
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner
b565d3ac5b - Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
setPreservesCFG to be less confusing.

llvm-svn: 4255
2002-10-21 20:00:28 +00:00
Chris Lattner
d68e6d1718 - Fix bug: cee/2002-10-07-NoImmediateDominator.ll
llvm-svn: 4081
2002-10-08 21:53:51 +00:00
Chris Lattner
40df2d9d4c - Checkin LARGE number of Changes to CEE pass that will make it much more
powerful, but that are largely disabled.  The basic idea here is that it
    is trying to forward branches across basic blocks that have PHI nodes in
    it, which are crucial to be able to handle cases like whet.ll.
    Unfortunately we are not updating SSA correctly, causing sim.c to die, and I
    don't have time to fix the regression now, so I must disable the
    functionality.

llvm-svn: 4077
2002-10-08 21:34:15 +00:00
Chris Lattner
3cf20c3f14 Expose isCriticalEdge & SplitCriticalEdge methods from crit-edges pass
llvm-svn: 4075
2002-10-08 21:06:27 +00:00
Chris Lattner
b32252aa71 It is illegal for PHI nodes to have zero values, delete the code to handle them
llvm-svn: 4071
2002-10-08 17:07:39 +00:00
Chris Lattner
55c7ae3cdc Fold ashr -1, X into -1
llvm-svn: 4070
2002-10-08 16:16:40 +00:00
Chris Lattner
7cf9f6f4b1 Updates to work with recent Statistic's changes:
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.
    * Updated ProgrammersManual with new semantics.

llvm-svn: 4002
2002-10-01 22:38:41 +00:00
Chris Lattner
61e8de1c61 Fix bug in LICM that caused the previous big win. :(
llvm-svn: 3980
2002-09-29 22:26:07 +00:00
Chris Lattner
ef0e95bb42 Hoist the contents of Loops in depth first order in the dominator tree,
rather than in random order.  This causes LICM to be DRAMATICALLY more
effective. For example, on bzip2.c, it is able to hoist 302 loads and
2380 total instructions, as opposed to 44/338 before.  This  obviously
makes other transformations much more powerful as well!

llvm-svn: 3978
2002-09-29 21:46:09 +00:00
Chris Lattner
b731880895 Fix major bugs in dominator set & tree information updating
llvm-svn: 3975
2002-09-29 21:41:38 +00:00
Chris Lattner
0bbb8f6e06 - Further cleanups of LICM pass, remove extra work from previous implementation
- Do not clone instructions then insert clone outside of loop.  Just move them.

llvm-svn: 3951
2002-09-26 19:40:25 +00:00
Chris Lattner
0c66734ac5 Improve comments, doxygenize more
llvm-svn: 3950
2002-09-26 16:52:07 +00:00
Chris Lattner
21eb78d59d Clean up LICM significantly now that it is guaranteed to have loop preheaders
llvm-svn: 3947
2002-09-26 16:38:03 +00:00
Chris Lattner
9cdbd428b0 Change pass name to something sane
llvm-svn: 3946
2002-09-26 16:37:37 +00:00
Chris Lattner
fe9fba6f5b Loop invariant code motion now depends on the LoopPreheader pass. Dead code
has not yet been removed.

llvm-svn: 3945
2002-09-26 16:19:31 +00:00
Chris Lattner
f9676d651d - Cleanup break-crit-edges pass by making SplitCriticalEdge a member method.
- break-crit-edges pass does not invalidate loop-preheader pass.

llvm-svn: 3944
2002-09-26 16:18:51 +00:00
Chris Lattner
e5996b4c88 Checkin new loop-preheader insertion pass.
llvm-svn: 3942
2002-09-26 16:17:31 +00:00
Chris Lattner
7ab2bba3d3 Change LowerAllocations pass to 'require' TargetData instead of it being
passed in.

llvm-svn: 3929
2002-09-25 23:47:47 +00:00
Chris Lattner
7fafece8e0 Eliminate extraneous #include
llvm-svn: 3916
2002-09-24 21:18:40 +00:00
Chris Lattner
25ba5ac7ce - Do not expose Critical Edge breaking mechanics outside the BCE pass, thus
removing it from Transforms/Local.h and from Transforms/Utils/*

llvm-svn: 3910
2002-09-24 15:51:56 +00:00
Chris Lattner
1014aae962 Correlated Exprs pass now requires BCE pass instead of doing it manually
llvm-svn: 3908
2002-09-24 15:43:56 +00:00
Chris Lattner
49588769e0 - Expose passinfo from BreakCriticalEdges pass so that it may be "Required"
by other passes.  Make BCE pass be in anonymous namespace now.

llvm-svn: 3907
2002-09-24 15:43:12 +00:00
Chris Lattner
e62cdff96c Add new BreakCriticalEdges pass
llvm-svn: 3903
2002-09-24 00:08:39 +00:00
Chris Lattner
b6c408778a Optimize away cases like:
%cast109 = cast uint %cast212 to short          ; <short> [#uses=1]
        %cast214 = cast short %cast109 to uint          ; <uint> [#uses=1]
        %cast215 = cast uint %cast214 to short          ; <short> [#uses=1]

llvm-svn: 3897
2002-09-23 23:39:43 +00:00
Chris Lattner
2a53929c5d * Fix bug: CorrelatedExprs/2002-09-23-PHIUpdateBug.ll
* Make sure "Changed" is updated correctly

llvm-svn: 3891
2002-09-23 20:06:22 +00:00
Chris Lattner
5ccb21f41d Fix bug: test/Regression/Transforms/InstCombine/2002-09-17-GetElementPtrCrash.ll
Thanks to Casey for finding it!

llvm-svn: 3783
2002-09-17 21:05:42 +00:00
Vikram S. Adve
4bcec53ed7 Extract most of the transformation into an externally accessible
function -- DecomposeArrayRef(GetElementPtrInst* GEP) -- that can
be invoked on a single instruction at a time.

llvm-svn: 3755
2002-09-16 16:40:07 +00:00
Misha Brukman
2e598f0092 Function.h is unnecessary when Module.h is included.
llvm-svn: 3716
2002-09-14 03:04:02 +00:00
Chris Lattner
fb017cb38c - Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.

llvm-svn: 3682
2002-09-11 01:21:33 +00:00
Chris Lattner
5f4b79edaf Fix the last of the silly bugs I just introduced. :(
llvm-svn: 3674
2002-09-10 23:46:10 +00:00
Chris Lattner
5143d4a3b3 Add cannonicalization of shl X, 1 -> add X, X
llvm-svn: 3671
2002-09-10 23:04:09 +00:00
Chris Lattner
37c3a1d80c Clean up code due to auto-insert constructors
llvm-svn: 3665
2002-09-10 22:38:47 +00:00
Chris Lattner
da9702a8a1 Simplify code (somtimes dramatically), by using the new "auto-insert" feature
of instruction constructors.

llvm-svn: 3656
2002-09-10 17:04:02 +00:00
Chris Lattner
7787814c22 * Clean up code a little bit
* Fix bug: test/Regression/Transforms/IndVarsSimplify/2002-09-09-PointerIndVar.ll

llvm-svn: 3644
2002-09-10 05:24:05 +00:00
Chris Lattner
4f5abce7f6 Hack unneccesary now that shifts of pointers are no longer legal!
llvm-svn: 3640
2002-09-10 03:50:54 +00:00
Chris Lattner
c1de581f8e Fix Bug: test/Regression/Transforms/InstCombine/2002-09-08-PointerShiftBug.ll
llvm-svn: 3626
2002-09-08 21:39:07 +00:00
Chris Lattner
c30029172a Minor simplification
llvm-svn: 3619
2002-09-08 18:55:04 +00:00