Commit Graph

51 Commits

Author SHA1 Message Date
Brian Gaeke
7ff4006f82 Fix problem with inserting FunctionPasses that depend on ImmutablePasses
(e.g., LICM) into FunctionPassManagers. The problem is that we were
using a C-style cast to cast required analysis passes to PassClass*, but
if it's a FunctionPassManager, and the required analysis pass is an
ImmutablePass, the types aren't really compatible, so the C-style cast
causes a crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15140 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 19:35:50 +00:00
Chris Lattner
4d143ee019 IA64 compat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14867 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 00:08:28 +00:00
Chris Lattner
d9a98de5c8 Ugh, apparently there is no common ground here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14026 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-04 20:48:51 +00:00
Misha Brukman
4230f40add Keep transitively-required passes alive for queries to work after the initial
user pass is destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12332 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-12 06:16:28 +00:00
Chris Lattner
cbee990a29 Fix -debug-pass=Executions, which relied on Function, Module, and BasicBlock
being annotable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12013 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 22:37:04 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Chris Lattner
e860e0d69c Make code gcc 3.4 clean
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9719 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 05:15:42 +00:00
John Criswell
856ba76200 Added LLVM copyright header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9321 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 15:17:13 +00:00
Chris Lattner
236f646371 This is a header file, hear me roar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9075 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 05:34:24 +00:00
Chris Lattner
cf3056db0f Regularize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9071 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 03:32:08 +00:00
Brian Gaeke
1d3fa21cdd Add new method to FunctionPassManager to add ImmutablePasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7838 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 06:07:57 +00:00
Chris Lattner
01189952bb Dramatically simplify how -time-passes works.
This also enables -time-passes for FunctionPassManagers, which allows it to
be used for the JIT


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7834 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 05:20:28 +00:00
Chris Lattner
1d5fc3f416 Add support for GCC 3.3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6865 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-23 19:16:20 +00:00
Chris Lattner
a172846d3a Fix a nasty bug where the ConstantMerge pass was invalidating the TargetData pass
even though it was immutable.  Immutable passes should never end up in CurrentAnalyses!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5906 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 20:07:38 +00:00
Chris Lattner
bf22c73c9c Allow ImmutablePass's to require other immutable passes and to be initialized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5630 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-26 19:10:57 +00:00
Chris Lattner
a3183be835 Fix a misunderstanding of the standard associative containers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5565 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-14 05:34:36 +00:00
Misha Brukman
a3bbcb5b66 Fix spelling of `propagate'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4423 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:06:16 +00:00
Chris Lattner
cb2610ea03 - Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
setPreservesCFG to be less confusing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4255 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 20:00:28 +00:00
Chris Lattner
57b062a8cc Make sure to use the TimerGroup that we created!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3995 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 20:12:06 +00:00
Chris Lattner
ccc7bef873 Make sure not to count the PassManager wrapers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3994 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 20:08:11 +00:00
Chris Lattner
f1da555028 Factor timer code out of PassManager implementation, into a generic interface
exposed by Support/Timer.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3993 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 19:54:07 +00:00
Chris Lattner
3f00ef9660 Fix a problem that was caused by stale analyses being in CurrentAnalyses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3981 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:50:22 +00:00
Chris Lattner
6ffa0a7f7c * Fix ugly bug in previous checkin where I reused the name 'i' one too many times
* Print out immutable passes in the -debug-pass=Structure report.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3923 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 22:26:52 +00:00
Chris Lattner
70b4f3e051 Add support for ImmutablePasses, which are not run, and cannot be
invalidated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3921 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 21:59:11 +00:00
Chris Lattner
e0a54f88a0 Add a new BasicBlockPass::doInitialization/Finalization(Function &) pair of
methods that may be useful for BasicBlockPasses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3688 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-12 17:06:40 +00:00
Chris Lattner
c4e4a99677 Enable "garbage detection" of LLVM objects. Check for leaks after running
every pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3621 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-08 19:00:07 +00:00
Chris Lattner
a3cd9de40e - Use Pass::AnalysisImpls instead of findAnalysisGroupMemeber
- -debug-pass=Details now prints implementation class names for analysis
    groups
  - Rework how AnalysisGroups are resolved to be simpler and better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3535 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-30 20:25:01 +00:00
Chris Lattner
789bc84262 - Implement the new AnalysisGroup feature, neccesary for Value#ing and pointer analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3426 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-21 22:17:09 +00:00
Chris Lattner
b8fa514b1d Sort -time-passes report first by user+system, then by Wall clock time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3407 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-20 18:47:53 +00:00
Chris Lattner
ca0a1f7d49 Enhance -time-passes to be more detailed and useful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3199 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-01 19:33:09 +00:00
Chris Lattner
7a40d6db08 We need iostream in PassManagerT.h to use cerr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3183 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 18:04:17 +00:00
Chris Lattner
48c1bc7b3a Implement new -debug-pass=Arguments option that causes PassManager to
print out the command line options for the optimizations it is running.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3165 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 19:51:02 +00:00
Chris Lattner
37d66c4dea * Move some code from Pass.cpp to PassManagerT.h
* Implement stuff so that code can declare that they only depend on the CFG of
  a function, not on anything else.  This speeds up GCCAS a lot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3155 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 16:27:02 +00:00
Chris Lattner
d472e47b6c * Eliminate the Provided set. All Passes now finally just automatically
provide themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3125 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:03:38 +00:00
Chris Lattner
a59cbb2043 * Standardize how analysis results/passes as printed with the print() virtual
methods
* Eliminate AnalysisID:  Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
  the analyses themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3116 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-27 01:12:17 +00:00
Chris Lattner
fe8041ae39 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3065 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 22:08:53 +00:00
Anand Shukla
d05e22cb6f changes for 64bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2801 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 22:07:38 +00:00
Chris Lattner
7e70829632 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:13:24 +00:00
Chris Lattner
ee37bb34d1 Fix problem where subpasses would invalidate all analyses outstanding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2418 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-30 18:50:17 +00:00
Chris Lattner
96c466b06a Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2395 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 14:57:45 +00:00
Chris Lattner
691fa3cfb1 Add a new command line option for PassManager using utilities.
Now for llc, gccas, analyze, opt, etc you can specify the -time-passes
command line option that outputs a timing summary report that indicates
how long each pass takes to execute.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2394 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 04:04:29 +00:00
Chris Lattner
3adc069c8b Move include/llvm/PassManager.h to lib/VMCore/PassManagerT.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2382 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 20:42:50 +00:00
Chris Lattner
2e9175a085 Minor changes to allow Modules (which are no longer Values) to work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2361 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 05:14:06 +00:00
Chris Lattner
f57b845547 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 06:56:12 +00:00
Chris Lattner
a364ad0f9d Make build work in release mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2113 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:35:24 +00:00
Chris Lattner
e7506a366e Rename Method to Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 22:51:58 +00:00
Chris Lattner
2bfc0310ff Make an assertion provide a more helpful error message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1883 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-17 21:16:01 +00:00
Chris Lattner
6ff53e77cc Add more debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1627 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-01 04:53:36 +00:00
Chris Lattner
ce885e9f9d * Make debugging output nicer
* Implement pass memory freeing after the pass is unused
* Expose PassManager typedef in Pass.h instead of PassManager.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1617 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-31 18:32:27 +00:00
Chris Lattner
a4e4b23b6d Fix bug where we didn't initialize and finalize basic block passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1599 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-31 00:40:44 +00:00