Commit Graph

54 Commits

Author SHA1 Message Date
Chris Lattner
6e60002a73 Silence -Woverloaded-virtual warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29929 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 00:09:00 +00:00
Jeff Cohen
62281a132f Be consistent in using class vs struct to make VC++ happy. And as it contains
methods, virtual method even, class wins.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25098 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 17:21:23 +00:00
Chris Lattner
7f7b730d79 Patch #6's in Saem's refactor-the-passmanager patch series. From him:
This sanitises the world, blows away the specialisations and adds
traits per passmanager type -- seemed most natural.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25085 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 07:47:13 +00:00
Misha Brukman
9769ab2226 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:19:05 +00:00
Misha Brukman
fb215b936d Fix grammar wrt apostrophe's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20635 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-16 03:54:50 +00:00
Reid Spencer
ce20771ec2 For PR387:\
Add runPass methods to remove -Woverloaded-virtual warnings are not \
present and circumvent possible inheritance bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18600 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 08:11:11 +00:00
Reid Spencer
ce9653ce44 For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18589 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 04:03:45 +00:00
Chris Lattner
1fca5ff62b Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17281 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 16:14:51 +00:00
Chris Lattner
b12914bfc0 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:48:05 +00:00
Reid Spencer
1f079267dc Give the -time-passes tool option a global storage location so that its
value can be discovered by the various LLVM tools.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16032 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 17:52:35 +00:00
Chris Lattner
85b0195f0e Apparently a particular vendor compiler uses the struct/class tag to MANGLE
symbols with.  Therefore, if you do not use struct/class consistently, you can
get LINK ERRORS.  grr.

This fixes the link errors for libsupport and vmcore.

-Chris


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14070 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-08 17:44:21 +00:00
Misha Brukman
c4b611af63 Fix grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12590 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-01 17:15:42 +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
John Criswell
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
Misha Brukman
d5d96b9fcd Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9021 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:42:19 +00:00
Chris Lattner
48486893f4 Standardize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:37:50 +00:00
Chris Lattner
df9ec1052b Move getAnalysisToUpdate to after the definition of AnalysisResolver.
GCC 3.4 apparently wants classes to be DEFINED before they are USED.  What is
it smoking.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8213 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-29 14:26:51 +00:00
Misha Brukman
5560c9d49c Spell `necessary' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 14:43:39 +00:00
Chris Lattner
be67780f31 #include <cassert> as necessary...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7315 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 17:58:41 +00:00
John Criswell
7a73b80b90 Merged in autoconf branch. This provides configuration via the autoconf
system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 21:59:07 +00:00
Chris Lattner
3889a2cb05 Remove a ton of extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:08:05 +00:00
John Criswell
be583b914d Included assert.h so that the code compiles under newer versions of GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-11 14:01:36 +00:00
Misha Brukman
1d06fbe893 It's 'separate'. The 'i.e.' is kinda nit-picking, but think of it this way:
'separate' is the one causing you to recompile all your passes anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5992 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 03:31:06 +00:00
Chris Lattner
f1ab454b71 Add helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5753 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-21 21:41:02 +00:00
Chris Lattner
d2c0b28c33 * Un "protect" the getAnalysis<> functions
* Add a new initializePass() method to ImmutablePass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5629 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-26 19:10:28 +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
Vikram S. Adve
0e9843db54 Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3773 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-17 11:09:59 +00:00
Chris Lattner
d0713f94af 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@3689 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-12 17:06:43 +00:00
Chris Lattner
f9bbe214fd Make getAnalysisToUpdate<AnalysisType>() public so that transformation APIs
can update analysis information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3584 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-06 02:14:47 +00:00
Chris Lattner
76a8f7fb5a - Pass now has AnalysisImpls class to implement getAnalysis() so that it is
correct even when called back by another passes run method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3531 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-30 20:19:49 +00:00
Chris Lattner
3f917b6f99 Make the getAnalyss<> members const. Using them does NOT modify the Pass object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3522 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-29 20:07:59 +00:00
Chris Lattner
2619905926 Convert comments to Doxygen style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3507 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-25 22:54:55 +00:00
Chris Lattner
1d63a167ec - Make Pass::lookupPassInfo a public member
- Fix Pass::getAnalysis<AnalysisType>() to use dynamic_cast instead of a
    static cast to handle the case where the cast from & two classes are not
    related via inheritance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3423 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-21 22:13:33 +00:00
Chris Lattner
fb30fda1de - Eliminate the need for analyses to expose an ::ID member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3414 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-21 17:08:37 +00:00
Chris Lattner
5791bb70b1 - Cleaned up the interface to AnalysisUsage to take analysis class names
instead of ::ID's.
 - Pass::getAnalysis<> now no longer takes an optional argument


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3263 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-08 19:01:11 +00:00
Chris Lattner
f9b2297380 * Fix comment descriptions
* Remove defaulted argument to ctor that is never used anyway
* Prevent copying and assignment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3122 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:01:19 +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
4c76fc048b Break part of Pass.h out into PassAnalysisSupport.h
Add PassSupport.h which contains code for Pass registration


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3010 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 17:59:55 +00:00
Chris Lattner
18961504fc *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2777 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:12:52 +00:00
Chris Lattner
4445519fab Add support for passes to announce that they only depend on the CFG of a
function.  This is crude but effective


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2505 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-06 19:31:16 +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
63f824ce18 Stub functions for timing support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2393 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 04:02:50 +00:00
Chris Lattner
3330e5be7a Move FunctionPass::doesNotModifyCFG to AnalysisUsage::preservesCFG()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2384 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 21:25:41 +00:00
Chris Lattner
d30efaf56e * Add a stub to FunctionPass so that subclasses can declare that they do not
modify the CFG.  It currently does nothing, but will in the future.
* Changes to make the public PassManager.h be MUCH smaller, and devoid of
  implementation details.  Now PassManager is just a Pimpl class that wraps
  PassManagerT<Module>, but lib/VMCore/Pass.cpp is now the only class that
  has to #include PassManagerT.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2383 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 20:46:05 +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
0e52e3e221 Allow a pass to obtain an analysis result for updating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2221 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-10 20:30:44 +00:00
Chris Lattner
6fe2e871bb Fix the release build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2096 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:18:17 +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
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
05ad462d1b Checkin new pass framework. This one is more useful and automatically
creates analysis results for passes that need them.   MethodPass's never
have to worry about being invoked on external methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1594 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-30 23:20:39 +00:00