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

39 Commits

Author SHA1 Message Date
Devang Patel
8c31ea5290 Before deleting a basic block, give other loop passes a chance cleanup analysis values, related to the instructions in the basic block.
llvm-svn: 67719
2009-03-25 23:57:48 +00:00
Chris Lattner
33852b4f35 Sprinkle some PrettyStackEntry magic into the passmanager. With this, we now
get nice and happy stack traces when we crash in an optimizer or codegen.  For
example, an abort put in UnswitchLoops now looks like this:

Stack dump:
0.	Program arguments: clang pr3399.c -S -O3 
1.	<eof> parser at end of file
2.	per-module optimization passes
3.	Running pass 'CallGraph Pass Manager' on module 'pr3399.c'.
4.	Running pass 'Loop Pass Manager' on function '@foo'
5.	Running pass 'Unswitch loops' on basic block '%for.inc'
Abort

llvm-svn: 66260
2009-03-06 06:45:05 +00:00
Dan Gohman
59b08852dc Add a method to ScalarEvolution for telling it when a loop has been
modified in a way that may effect the trip count calculation. Change
IndVars to use this method when it rewrites pointer or floating-point
induction variables instead of using a doInitialization method to
sneak these changes in before ScalarEvolution has a chance to see
the loop. This eliminates the need for LoopPass to depend on
ScalarEvolution.

llvm-svn: 64810
2009-02-17 20:49:49 +00:00
Dan Gohman
c99426d513 Move dumpPassStructure out of line.
llvm-svn: 64796
2009-02-17 19:41:26 +00:00
Dan Gohman
e1f9be27bc Tidy up several unbeseeming casts from pointer to intptr_t.
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Chris Lattner
a4e876cf8a Don't call getAnalysisUsage unless -debug-pass is enabled. This speeds
up the passmgr by avoiding useless work.

llvm-svn: 54528
2008-08-08 15:14:09 +00:00
Dan Gohman
fee8b04935 Fix spelling of "hierarchy" in comments.
llvm-svn: 53489
2008-07-11 22:51:32 +00:00
Devang Patel
f3ca5b9a8b Keep track of inherited analysis (e.g. dominator tree).
llvm-svn: 53088
2008-07-03 07:02:30 +00:00
Devang Patel
0fc2badc38 Fix typos in comments.
Thanks for the feedback!

llvm-svn: 52978
2008-07-01 19:50:56 +00:00
Devang Patel
1e1f4a0bdd Add dom info verifier.
llvm-svn: 52967
2008-07-01 17:44:24 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Dan Gohman
30ba45b569 Use empty() member functions when that's what's being tested for instead
of comparing begin() and end().

llvm-svn: 42585
2007-10-03 19:26:29 +00:00
Devang Patel
d9c8d99cac ooops...
llvm-svn: 42118
2007-09-18 23:58:14 +00:00
Anton Korobeynikov
4e15adaf04 - Use correct header for SCEV inside LoopPass.cpp
- Move SCEVExpander::expand() out-of-line workarounding possible toolchain bug

llvm-svn: 41197
2007-08-20 21:17:26 +00:00
Devang Patel
6dd3a5f747 Introduce Simple Analysis interface for loop passes.
Right now, this interface provides hooks for only to operations, 1) clone basic block 2) delete value.

llvm-svn: 40625
2007-07-31 08:00:57 +00:00
Devang Patel
45675e56ad Verify loop info.
llvm-svn: 40062
2007-07-19 18:02:32 +00:00
Duncan Sands
8c6657894f Replace mysterious code causing a g++-4.2 warning
with hopefully correct code that pleases g++-4.2.

llvm-svn: 40051
2007-07-19 09:42:01 +00:00
Devang Patel
593a23252d Add loop info verification mechanism.
llvm-svn: 37822
2007-06-29 23:13:42 +00:00
Devang Patel
cd45427a87 Drop 'const'
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
8ee9065162 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.

llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
38a66bc82e Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Devang Patel
6a56e3c1a0 Now IndVarSimplify is a LoopPass.
llvm-svn: 35003
2007-03-07 06:39:01 +00:00
Devang Patel
c35610b9f9 Now LoopUnswitch is a LoopPass.
llvm-svn: 34992
2007-03-07 00:26:10 +00:00
Devang Patel
bee9c51214 Insert loop into LQ before visiting children.
llvm-svn: 34982
2007-03-06 19:50:49 +00:00
Devang Patel
57322d0462 Use schedulePass() instead of assignPassManager() to add new LPPassManager.
This ensures that require analysis info is available.

llvm-svn: 34980
2007-03-06 19:11:25 +00:00
Devang Patel
b44e86318e Add LPPassManager::insertLoop().
llvm-svn: 34979
2007-03-06 19:00:02 +00:00
Devang Patel
8490ffbcdc LPPassManager::deleteLoopFromQueue() add meat. Cut-n-paste code from
LoopUnswitch pass.

llvm-svn: 34977
2007-03-06 18:38:33 +00:00
Devang Patel
d3cf506865 LPPassManager. Implement preparePassManager() hook.
llvm-svn: 34975
2007-03-06 17:59:37 +00:00
Devang Patel
e3abf559e5 LPPassManager : Add initialization and finalizatino hooks.
llvm-svn: 34968
2007-03-06 16:59:03 +00:00
Devang Patel
e4da6fa801 Use std::deque to manage loop queue inside LPPassManager.
llvm-svn: 34943
2007-03-06 02:30:46 +00:00
Devang Patel
6668a341ae Avoid constructing std::strings unless pass debugging is ON.
llvm-svn: 34933
2007-03-05 20:01:30 +00:00
Devang Patel
e0c0b3bea6 Fix thinko.
llvm-svn: 34528
2007-02-23 18:05:55 +00:00
Devang Patel
06b8983669 Loop passes are set up to accept pointer.
llvm-svn: 34527
2007-02-23 17:53:17 +00:00
Devang Patel
46cad14ab8 Teach LoopPass to assign itself one Loop Pass Manager.
llvm-svn: 34510
2007-02-23 00:36:57 +00:00
Devang Patel
9a7b18fa3d Add facility that allows LoopPass to re-insert a loop into
Loop Pass Manager's queue.

llvm-svn: 34509
2007-02-23 00:16:44 +00:00
Devang Patel
bbfd00e658 Add LPPassManager interface that LoopPass can use to skip
rest of the passes in the queue for a loop.

llvm-svn: 34508
2007-02-23 00:10:16 +00:00
Devang Patel
d7448faaed Populate and walk loop queue.
llvm-svn: 34505
2007-02-22 23:45:15 +00:00
Devang Patel
b170ebf833 Add LoopQueue. This is used by loop pass manager to manage loop nest.
llvm-svn: 34504
2007-02-22 23:30:07 +00:00
Devang Patel
aabb87cffe Add Loop Pass Manager.
llvm-svn: 34487
2007-02-22 08:56:17 +00:00