Chris Lattner
889f620841
Remove unnecesary &*'s
...
llvm-svn: 5872
2003-04-23 16:37:45 +00:00
Chris Lattner
669c6cf459
Make sure to _delete_ memory allocated by worklists
...
llvm-svn: 4523
2002-11-04 02:54:22 +00:00
Misha Brukman
632df28deb
Fix spelling of `propagate'.
...
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner
820d971233
- 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
bf3a099a62
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
dd6522e7a0
- 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
dfb3a2cd07
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3487
2002-08-22 23:37:20 +00:00
Chris Lattner
0f4093938a
Remove extra #includes
...
llvm-svn: 3322
2002-08-14 18:17:32 +00:00
Chris Lattner
6e1a1b1289
Remove support for unary operators
...
llvm-svn: 3318
2002-08-14 17:53:45 +00:00
Chris Lattner
c8b7092e54
* Add support for different "PassType's"
...
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses
llvm-svn: 3113
2002-07-26 21:12:46 +00:00
Chris Lattner
b28b680155
*** empty log message ***
...
llvm-svn: 3016
2002-07-23 18:06:35 +00:00
Chris Lattner
113f4f4609
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
71cbd42b98
Use the new DEBUG(x) macro to allow debugging code to be enabled on the commandline
...
llvm-svn: 2713
2002-05-22 17:17:27 +00:00
Chris Lattner
a482d52ff4
Fix bug: test/Regression/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
...
Improperly handling edges... by not marking them alive properly
llvm-svn: 2707
2002-05-22 16:07:20 +00:00
Chris Lattner
b710b1fb22
Fix bug: test/Regression/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll
...
That was causing a miscompilation of strtol/atoi plus others
llvm-svn: 2669
2002-05-20 20:48:03 +00:00
Chris Lattner
0b18c1d64e
Add support for printing out statistics information when -stats is added to
...
the command line
llvm-svn: 2601
2002-05-10 15:38:35 +00:00
Chris Lattner
b4cfa7ff97
Merge all individual .h files into a single Scalar.h file
...
llvm-svn: 2537
2002-05-07 20:03:00 +00:00
Chris Lattner
3d86d49604
Add #include no longer included by llvm/Transforms/Scalar/ConstantProp.h
...
llvm-svn: 2517
2002-05-07 18:11:30 +00:00
Chris Lattner
d66a6e33e9
* Convert InstWorkList to vector instead of set, because on big programs it
...
is empirically faster by a noticable margin, even though duplicates can
happen.
llvm-svn: 2511
2002-05-07 04:29:32 +00:00
Chris Lattner
940daedc22
Implement constant propogation of shift instructions
...
llvm-svn: 2471
2002-05-06 03:01:37 +00:00
Chris Lattner
7b80b53ab9
Ok, really it only takes me 3 times to get this right!
...
Now use #if 0 instead of #ifdef 0
llvm-svn: 2448
2002-05-02 21:49:50 +00:00
Chris Lattner
dd390e1736
Oops, disable debugging code all the way. :)
...
llvm-svn: 2447
2002-05-02 21:47:40 +00:00
Chris Lattner
fe6c9eeae3
* Finish the implementation of isEdgeFeasible this fixes bug:
...
test/Regression/Transforms/SCCP/2002-05-02-EdgeFailure.ll
* SCCP now preserves the CFG: It leaves conditional branches the way they
are in the program, not simplifying them. A seperate pass should eliminate
the potentially dead basic blocks and edges in the CFG.
llvm-svn: 2446
2002-05-02 21:44:00 +00:00
Chris Lattner
13b52e71d8
* Enable SCCP debugging to be turned on with a simple change of #define
...
* Change worklist to a set so that duplicates cannot happen
* Add support for the invoke instruction
* Avoid marking store and free instructions as overdefined, since they
cannot produce a value anyway.
* Inline the OperandChangedState implementation
* Add isEdgeFeasible in preparation to fix a bug. Right now it behaves
exactly as before.
* Remove obsolete comment about constant pools
llvm-svn: 2445
2002-05-02 21:18:01 +00:00
Chris Lattner
5364d1a74a
* Simplify the code by not bothering to name the folded constant
...
* Do not skip the instruction immediately after a folded instruction. This
was causing the testcase failure:
test/Regression/Transforms/SCCP/2002-05-02-MissSecondInst.ll
llvm-svn: 2443
2002-05-02 20:32:51 +00:00
Chris Lattner
7d3253876a
Significantly clean up SCCP pass. Now the two classes are merged and in
...
an anonymous namespace where they belong.
llvm-svn: 2415
2002-04-29 21:26:08 +00:00
Chris Lattner
d5a847057b
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
37104aace8
Add new optional getPassName() virtual function that a Pass can override
...
to make debugging output a lot nicer.
llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner
f12cc842b3
Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
...
llvm-svn: 2386
2002-04-28 21:27:06 +00:00
Chris Lattner
ca14237696
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
c8e665431b
* Rename MethodPass class to FunctionPass
...
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
66cfaf1da2
Changes because the Terminator::getSuccessor function now FAILS if successor
...
IDX is out of range instead of returning null.
llvm-svn: 2332
2002-04-27 03:15:45 +00:00
Chris Lattner
6e56079654
Convert SCCP over to use InstVisitor instead of hand crafted switch
...
llvm-svn: 2286
2002-04-18 15:13:15 +00:00
Chris Lattner
5873900709
GEP instructions can never be constant propogated.
...
llvm-svn: 2284
2002-04-18 14:44:13 +00:00
Chris Lattner
2e9fa6d101
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
f8e4dc33ab
s/Method/Function
...
Remove extraneous #includes of llvm/Assembly/Writer
llvm-svn: 2178
2002-04-08 22:03:00 +00:00
Chris Lattner
65b529fe6d
ConstantHandling moved into VMCore library
...
llvm-svn: 2165
2002-04-08 20:18:09 +00:00
Chris Lattner
57698e2c0b
Change references from Method to Function
...
change references from MethodARgument to FunctionArgument
llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Chris Lattner
477fe0845a
Fix bug: test/Regression/Other/2002-03-11-ConstPropCrash.ll
...
llvm-svn: 1858
2002-03-11 22:11:07 +00:00
Chris Lattner
04805fa29c
Change over to use new style pass mechanism, now passes only expose small
...
creation functions in their public header file, unless they can help it.
llvm-svn: 1816
2002-02-26 21:46:54 +00:00
Chris Lattner
60a6591d83
Method.h no longer includes BasicBlock.h
...
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h
llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner
352151e222
MethodPass's are now guaranteed to not be run on external methods!
...
llvm-svn: 1611
2002-01-31 00:51:24 +00:00
Chris Lattner
ee965abc36
Move stuff out of the Optimizations directories into the appropriate Transforms
...
directories. Eliminate the opt namespace.
llvm-svn: 1520
2002-01-21 23:17:48 +00:00
Chris Lattner
7f74a56e24
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
3462ae3ad7
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
fb5ae02e1a
Split the PHINode class out from the iOther.h file into the iPHINode.h file
...
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner
5de2204fe8
Create a new #include "Support/..." directory structure to move things
...
from "llvm/Support/..." that are not llvm dependant.
Move files and fix #includes
llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
c4ad64cb9c
Misc cleanups
...
llvm-svn: 1377
2001-11-26 18:57:38 +00:00
Chris Lattner
9db8b765cd
Implemented constant propogation of cast instructions
...
llvm-svn: 1064
2001-10-31 05:07:57 +00:00
Chris Lattner
5398a6eb6c
Convert optimizations to the pass infrastructure
...
llvm-svn: 873
2001-10-18 01:32:34 +00:00