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

53 Commits

Author SHA1 Message Date
Chris Lattner
c29f25e260 Adjust to changes in instruction interfaces.
llvm-svn: 19900
2005-01-29 00:39:08 +00:00
Chris Lattner
ef0888e493 hasConstantValue will soon return instructions that don't dominate the PHI node,
so prepare for this.

llvm-svn: 17095
2004-10-17 21:22:38 +00:00
Alkis Evlogimenos
7ff66b2884 Pull assignment out of for loop conditional in order for this to
compile under windows. Patch contributed by Paolo Invernizzi!

llvm-svn: 16534
2004-09-28 02:40:37 +00:00
Chris Lattner
c137c9ac39 Prototype these functions more accurately
llvm-svn: 16432
2004-09-20 04:43:15 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Misha Brukman
58104df77b Fix #includes of i*.h => Instructions.h as per PR403.
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Chris Lattner
0193bbef1f Fix PR404 try #2
This version takes about 1s longer than the previous one (down to 2.35s),
but on the positive side, it actually works :)

llvm-svn: 14856
2004-07-15 08:20:22 +00:00
Chris Lattner
fde0e6bb95 Revert previous patch until I get a bug fixed
llvm-svn: 14853
2004-07-15 05:36:31 +00:00
Chris Lattner
9896dfb8e7 Fix PR404: Loop simplify is really slow on 252.eon
This eliminates an N*N*logN algorithm from the loop simplify pass, replacing
it with a much simpler and faster alternative.  In a debug build, this reduces
gccas time on eon from 85s to 42s.

llvm-svn: 14851
2004-07-15 04:27:04 +00:00
Chris Lattner
5a0ed18724 Correct rewriting of exit blocks after my last patch
llvm-svn: 13048
2004-04-18 22:27:10 +00:00
Chris Lattner
7174acca00 Change the ExitBlocks list from being explicitly contained in the Loop
structure to being dynamically computed on demand.  This makes updating
loop information MUCH easier.

llvm-svn: 13045
2004-04-18 22:14:10 +00:00
Chris Lattner
70f6a0ddcf Fix LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll
LoopSimplify was not updating dominator frontiers correctly in some cases.

llvm-svn: 12890
2004-04-13 16:23:25 +00:00
Chris Lattner
ae63c235f9 Refactor code a bit to make it simpler and eliminate the goto
llvm-svn: 12888
2004-04-13 15:21:18 +00:00
Chris Lattner
faf377df58 This patch addresses PR35: Loop simplify should reconstruct nested loops.
This is fairly straight-forward, but was a real nightmare to get just
perfect.  aarg.  :)

llvm-svn: 12884
2004-04-13 05:05:33 +00:00
Chris Lattner
441ab4b903 Remove some assertions that are now bogus with the last patch I put in
llvm-svn: 12595
2004-04-01 19:21:46 +00:00
Chris Lattner
eda638b0be Fix PR306: Loop simplify incorrectly updates dominator information
Testcase: LoopSimplify/2004-04-01-IncorrectDomUpdate.ll

llvm-svn: 12592
2004-04-01 19:06:07 +00:00
Chris Lattner
9ae2b6acd7 Fix a regression from this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040308/013095.html

Basically, this patch only updated the immediate dominatees of the header node
to tell them that the preheader also dominated them.  In practice, ALL
dominatees of the header node are also dominated by the preheader.

This fixes: LoopSimplify/2004-03-15-IncorrectDomUpdate.
and PR293

llvm-svn: 12434
2004-03-16 06:00:15 +00:00
Chris Lattner
39b3ae34bd If a block is dead, dominators will not be calculated for it. Because of this
loop information won't see it, and we could have unreachable blocks pointing to
the non-header node of blocks in a natural loop.  This isn't tidy, so have the
loopsimplify pass clean it up.

llvm-svn: 12380
2004-03-14 03:59:22 +00:00
Chris Lattner
8d45aeaff1 This little patch speeds up the loop used to update the dominator set analysis.
On the testcase from GCC PR12440, which has a LOT of loops (1392 of which require
preheaders to be inserted), this speeds up the loopsimplify pass from 1.931s to
0.1875s.  The loop in question goes from 1.65s -> 0.0097s, which isn't bad. All of
these times are a debug build.

This adds a dependency on DominatorTree analysis that was not there before, but
we always had dominatortree available anyway, because LICM requires both loop
simplify and DT, so this doesn't add any extra analysis in practice.

llvm-svn: 12362
2004-03-13 22:01:26 +00:00
Chris Lattner
3f57a7faab Fix another dominator update bug. These bugs keep getting exposed because GCSE
keeps finding more code motion opportunities now that the dominators are correct!

llvm-svn: 11142
2004-02-05 23:20:59 +00:00
Chris Lattner
f2a8b9e75b Fix bug updating dominators
llvm-svn: 11140
2004-02-05 22:33:26 +00:00
Chris Lattner
6875c14234 Fix PR223: Loopsimplify incorrectly updates dominator information
The problem is that the dominator update code didn't "realize" that it's
possible for the newly inserted basic block to dominate anything.  Because
it IS possible, stuff was getting updated wrong.

llvm-svn: 11137
2004-02-05 21:12:24 +00:00
Chris Lattner
68aef33986 Adjust to the new BasicBlock ctor, which requires a function parameter
llvm-svn: 11114
2004-02-04 03:58:28 +00:00
Chris Lattner
1736f44b1d 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
a0b16fb57d Generalize a special case to fix PR187
llvm-svn: 10531
2003-12-19 06:27:08 +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
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
2b7309dd1c Minor cleanups and simplifications
llvm-svn: 10127
2003-11-21 16:52:05 +00:00
Chris Lattner
feeb3261f2 Start using the nicer terminator auto-insertion API
llvm-svn: 10111
2003-11-20 18:25:24 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
7519b1216b Add support to the loop canonicalization pass to make it transform loops to
have a SINGLE backedge.  This is useful to, for example, the -indvars pass.

This implements testcase LoopSimplify/single-backedge.ll and closes PR#34

llvm-svn: 9065
2003-10-13 00:37:13 +00:00
Chris Lattner
f4ca01758d Rename loop preheaders pass to loop simplify
llvm-svn: 9061
2003-10-12 21:52:28 +00:00
Chris Lattner
1c8a980870 File is renamed to LoopSimplify.cpp
llvm-svn: 9059
2003-10-12 21:44:18 +00:00
Chris Lattner
7fe9661cae First step in renaming the preheaders pass to loopsimplify
llvm-svn: 9058
2003-10-12 21:43:28 +00:00
Chris Lattner
510dfc942a The preheader insertion pass only depends on the CFG. Mark it as such, which
allows GCCAS to only run it once.

llvm-svn: 9056
2003-10-12 19:33:10 +00:00
Misha Brukman
868eac95dd Fix spelling.
llvm-svn: 9027
2003-10-10 17:57:28 +00:00
Chris Lattner
3d39abeeb7 Renamed DominatorTree::Node::getNode() -> getBlock()
llvm-svn: 8469
2003-09-11 16:26:13 +00:00
Misha Brukman
cac883668e Spell `occurrence' correctly.
llvm-svn: 8425
2003-09-09 21:54:45 +00:00
Chris Lattner
7190bb52f3 Fix grammar, add comment
llvm-svn: 7967
2003-08-18 22:54:06 +00:00
Misha Brukman
56f7db4178 Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
6cb27840a7 Fix bug: LoopPreheaders/2003-05-12-PreheaderExitOfChild.ll
llvm-svn: 6153
2003-05-12 22:04:34 +00:00
Chris Lattner
db6b7ba364 Remove unnecesary &*'s
llvm-svn: 5872
2003-04-23 16:37:45 +00:00
Chris Lattner
dec7727a9f Fix bug I introduced yesterday :(
llvm-svn: 5669
2003-02-28 16:54:17 +00:00
Chris Lattner
e2aebf5906 Fix bug: LICM/2003-02-27-PreheaderExitNodeUpdate.ll
llvm-svn: 5667
2003-02-28 03:07:54 +00:00
Chris Lattner
d64f135965 Fix bug: 2003-02-27-PreheaderExitNodeUpdate.ll by updating exit node info
llvm-svn: 5664
2003-02-27 22:48:57 +00:00
Chris Lattner
74b9aaa89c Add a new assertion to check that stuff is happening right
Ironically the exit block modification code wasn't updating the exit block
information itself.  Fix this.

llvm-svn: 5659
2003-02-27 22:31:07 +00:00
Chris Lattner
e8dda81b22 * Don't forget to update Loop information!
* Remove bogus assertion: there may be a single outside predecessor and
    still need a new loop-preheader if the predecessor has multiple
    successors.  See bug: LICM/2003-02-27-PreheaderProblem.ll

llvm-svn: 5655
2003-02-27 21:50:19 +00:00
Chris Lattner
b078b28fa5 * Significant changes to the preheader insertion pass:
- Now we perform loop exit-block splitting to ensure exit blocks are
     always dominated by the loop header.
   - We now preserve dominance frontier information
   - This fixes bug: LICM/2003-02-26-LoopExitNotDominated.ll

llvm-svn: 5652
2003-02-27 20:27:08 +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