1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

259 Commits

Author SHA1 Message Date
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
Chris Lattner
bd03f18e04 Initial checkin of Correlated Expression Elimination Pass
llvm-svn: 3599
2002-09-06 18:41:55 +00:00
Chris Lattner
3ce5b343c5 - Renamed Type::isIntegral() to Type::isInteger()
- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.

llvm-svn: 3574
2002-09-03 01:08:28 +00:00
Chris Lattner
cd49f0ec5d Add constant prop & DIE to InstCombine, so it cleans up after itself
llvm-svn: 3568
2002-09-02 04:59:56 +00:00
Chris Lattner
bb8f1a072b - Implement SCCP of getelementptr instructions
- Implement SCCP of globals into ConstantExprs hopefully opening new
   opportunities for more SCCP.

llvm-svn: 3555
2002-08-30 23:39:00 +00:00
Chris Lattner
a146c9e769 Really minor cleanups
llvm-svn: 3549
2002-08-30 22:53:30 +00:00
Chris Lattner
b0cbcfd5e4 - GCSE now no longer counts instructions not removed (due to no common
dominator as being removed)
  - GCSE now uses new Value #'ing interface, instead of dealing with AA itself
  - GCSE worklist implementation much simpler, class cleaned up.

llvm-svn: 3533
2002-08-30 20:22:29 +00:00
Chris Lattner
66b1127636 - instcombine demorgan's law: and (not A), (not B) == not (or A, B)
llvm-svn: 3495
2002-08-23 18:32:43 +00:00
Chris Lattner
20b85d96e4 Eliminated the MemAccessInst class, folding contents into GEP class.
llvm-svn: 3487
2002-08-22 23:37:20 +00:00
Chris Lattner
969c616d51 Load & StoreInst no longer derive from MemAccessInst, so we don't have
to handle indexing anymore

llvm-svn: 3485
2002-08-22 22:49:05 +00:00
Chris Lattner
8b8d72c1f2 Add capability of using pointer analysis to LICM
llvm-svn: 3478
2002-08-22 21:39:55 +00:00
Chris Lattner
5addf774a3 Remove long obsolete comments
llvm-svn: 3476
2002-08-22 21:25:54 +00:00