Commit Graph

84 Commits

Author SHA1 Message Date
Reid Spencer
5cbf985dcb For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 20:08:39 +00:00
Devang Patel
cde53d3c1e 1) Remove old AnalysisResolver.
2) Rename AnalysisResolver_New as AnalysisResolver


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32938 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 22:47:07 +00:00
Devang Patel
cccd80dfa3 Remove old pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32927 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 20:16:23 +00:00
Devang Patel
c7d0f4be88 ModulePass and ImmutablePass. Force out of line virtual method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 22:49:00 +00:00
Devang Patel
e8ff1ce734 Using PDL as a prefix for PassDebugLevel enums is not a good idea.
Fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32562 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 21:13:31 +00:00
Devang Patel
45dc02d6f9 Move enum PassDebugLevel from PassManagerT.h to Pass.h.
Use PDL as the prefix for these enums.
Define and use PassDebugging_New in new PassManager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32554 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 20:03:48 +00:00
Devang Patel
3162691f69 Add #ifdef switch toggle between old and new pass manager. However,
continue to use old pass manager at the moment. To use new manager
remove #define USE_OLD_PASSMANAGER 1 from Pass.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32525 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 02:36:01 +00:00
Chris Lattner
87f28e87d7 fix PR1039 by making timing info be destroyed by llvm_shutdown, not by
static dtors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32411 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 07:40:46 +00:00
Bill Wendling
832171cb97 Removing even more <iostream> includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32320 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 20:04:42 +00:00
Chris Lattner
ee740834ab Switch analysis groups to be unregistered when llvm_shutdown is called.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32110 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 23:46:50 +00:00
Chris Lattner
baf2ecda5f Start moving pass registration over to using the ManagedStatic mechanism.
This fixes issues where passes get unregistered before llvm_shutdown is
called, and is generally cleaner and simpler.  Analysis groups up next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32108 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 23:27:45 +00:00
Chris Lattner
947c7689fc move 'cfgonly' pass tracking into PassInfo, instead of handling it with
yet-another global data structure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32102 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 22:21:11 +00:00
Chris Lattner
b2cd4bac87 Add explicit doInitialization/doFinalization methods instead of making
the FunctionPassManager redo this for each function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30079 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 04:07:39 +00:00
Chris Lattner
2dd3d423aa We no longer care whether something is an opt vs analysis pass, only whether
something is a pass vs an analysis group now.  Simplify interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29920 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:21:55 +00:00
Chris Lattner
0300f3e712 Change the ModuleProvider interface to not throw exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29024 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 21:35:01 +00:00
Reid Spencer
6df60a9eff For PR780:
Break the "IncludeFile" mechanism into its own header file and adjust other
files accordingly. Use this facility for the IntrinsicInst problem which
was the subject of PR800.
More to follow on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 20:00:19 +00:00
Chris Lattner
1ac2d51806 Speedup and simplify pass registration by the observation that there is
exactly one PassInfo object per RegisterPass object and that their lifetimes
are the same.  As such, there is no reason for the RegisterPass object to
dynamically allocate the PassInfo object at compiler startup time: just inline
the object by-value.  This should reduce codesize, heap size, and startup time. Yaay.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25521 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 01:01:04 +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
Reid Spencer
e8f3848639 Older compilers won't like the inline virtual destructor in the header file
so we put the destructor in Pass.cpp and make it non-inline.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21520 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-25 01:01:35 +00:00
Misha Brukman
fd93908ae8 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 23:48:37 +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
bba61c07dd '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.

Also, fix some undefined behavior, expecting | on booleans to evaluate
left-to-right.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16435 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:47:19 +00:00
Reid Spencer
551ccae044 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/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +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
Misha Brukman
cf617ddd98 There is no error message to print out, end sentence with `!'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14678 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 21:22:05 +00:00
Reid Spencer
e294753128 Fix for bug 391.
Improve exeception handling around bcreader invocations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14674 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 21:01:38 +00:00
Reid Spencer
e2fac77ad3 - #include <iostream> since its not in Value.h any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14617 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:55:37 +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
f822ee999f Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11966 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 21:55:18 +00:00
Chris Lattner
e21f68d1e8 Two problems with these lines of code:
1. The "work" was not in the assert, so it was punishing the optimized release
 2. getNamedFunction is _very_ expensive in large programs.  It is not designed
    to be used like this, and was taking 7% of the execution time of the code
    generator on perlbmk.

Since the assert "can never fail", I'm just killing it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11214 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 00:59:07 +00:00
Chris Lattner
31f8499e83 Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10131 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 20:23:48 +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
b576c94c15 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 19:43:21 +00:00
Misha Brukman
69c856aa6d Enabling incremental bytecode loading in the JIT:
* FunctionPassManager ctor now takes in a ModuleProvider
* run() materializes function before running passes on it


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9126 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:38:42 +00:00
Chris Lattner
3e58d9bb32 * Remove extraneous #includes
* Fix a nasty initializer ordering bug.  Any only-CFG passes which registered
  themselves before the CFGOnlyAnalysis vector initialized got forgotten and
  thus got invalidated and recomputed.

In particular, in my compiled version of gccas, the Loop information pass was
being recomputed unnecessarily.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9074 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 05:33:01 +00:00
Chris Lattner
5b62cdcf4a Rename method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9055 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-12 18:52:12 +00:00
Brian Gaeke
e24b616faa Don't include Config/stdio.h or <stdio.h>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9031 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 18:46:29 +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
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
Brian Gaeke
8ab1ef265a Add FunctionPassManager - it's like a PassManager, but it only deals in
FunctionPasses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7778 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 17:22:39 +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
ed4775a3c1 Remove usage of sys/unistd.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6788 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 18:42:09 +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
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
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
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
f90a0e4bd7 Another portability fix provided via Casey Carter:
ISSUE: getTimeRecord in lib/VMCore/Pass.cpp uses timeval and
gettimeofday() without including sys/time.h.

ACTION: Include sys/time.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3699 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-13 14:47:12 +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
1c28b42310 - PassManager prints analysis sets nicer
- Use Pass::AnalysisImpls instead of findAnalysisGroupMemeber


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