Commit Graph

429 Commits

Author SHA1 Message Date
Vikram S. Adve
6e0bb63264 Use PARALLEL_DIRS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4114 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 16:08:17 +00:00
Misha Brukman
a27229013f Added capability to get execution count of a loop if it is a predictable
number of iterations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4113 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 05:34:32 +00:00
Misha Brukman
6b290a5440 Added helper functions in LoopInfo: isLoopExit and numBackEdges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4112 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 05:31:10 +00:00
Chris Lattner
7d821db958 Handle post dominance correctly in the case where blocks do not have a path to
the exit node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4038 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 14:50:20 +00:00
Chris Lattner
a00397e1ee Prune function nodes that are no longer referenced due to inlining
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4036 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:55:28 +00:00
Chris Lattner
6727ec64e8 sgefa uses truely huge data structures nodes. Only print part of them if they
are so big


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4035 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:55:13 +00:00
Chris Lattner
62d928eac1 Handle bug exposed by power benchmark
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4033 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:06:38 +00:00
Chris Lattner
55c1058135 Reimplement/port the Bottom Up Closure pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4031 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 20:38:41 +00:00
Chris Lattner
c5f21de2bc DataStructure.h doesn't include DSGraph.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4029 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 22:14:38 +00:00
Chris Lattner
e03f32bcc2 * Implement fully general merging of array subscripts on demand! This
does not handle the initial pointer index case yet though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4012 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 06:24:36 +00:00
Chris Lattner
9cfb358fa4 When printing DS nodes, print the mergemap index as well to allow easier
debugging of merging process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4010 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 05:17:55 +00:00
Chris Lattner
7b7200c4ea * Significant rework of DSNode to support arbitrary aliasing due to merging
* Now all and any bytes of a DSNode can be merged together individually.  This
  is neccesary to support the full generality of C and support aliasing
  correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4008 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 04:57:39 +00:00
Chris Lattner
1c7ce2c7fe Initial checkin of Steensgaards context insensitive flow insensitive
alias analysis


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3997 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:34:12 +00:00
Chris Lattner
fccd06fcea Checkin some major reworks of data structure analysis. This is not done,
nor does it work very well, but I need to get it checked in before I break
the tree unintentionally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3996 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:33:50 +00:00
Chris Lattner
c8f25d91bd Minor tweak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3985 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:59:29 +00:00
Chris Lattner
b1f8aebc67 Fix printing of loop information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3977 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:43:04 +00:00
Chris Lattner
009cc3d2e8 First try at implementing the AliasSetTracker class. I'm sure it will need
revision as I start to use it though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3954 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 21:49:07 +00:00
Chris Lattner
fce46ef803 Fix printing of loop information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3941 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:15:54 +00:00
Chris Lattner
699b305c86 - Add new methods to LoopInfo: getLoopPreheader, addBasicBlockToLoop.
These allow extra information to be easily gathered, and loopinfo to be
    updated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3936 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 05:32:50 +00:00
Chris Lattner
c3a388143b Convert BasicVN to be an ImmutablePass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3924 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 22:27:25 +00:00
Chris Lattner
5057b00faf Make users of FindUsedTypes not have problems with linkage. This fixes
Cwriter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3900 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 00:07:21 +00:00
Chris Lattner
74493a4c6e Clean up indvar printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3650 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-10 15:35:39 +00:00
Chris Lattner
a6299345ee * Add capability to recognize alias properties of the following common cases:
- A[c1] cannot alias A[c2] where constants c1 != c2
  - A[i] cannot alias B[j] if A & B are provably different arrays

This should help out array based codes.  For example, from bzip2 from spec,
3 additional loads can be GCSE'd, and _21_ additional loads can be LICMd due
to this change.

In a test example from the Spec GAP benchmark (vecffe.c), this change allows
_52_ additional loads to be GCSE'd and _224_ additional LICM'd loads.

Not bad for such a simple change.  Other testcases show no change at all
because they just don't use arrays.  Not too suprising there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3616 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-08 18:45:18 +00:00
Chris Lattner
20d4129fef Minor bug fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3577 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-03 23:12:40 +00:00
Chris Lattner
ce8a14915d - Renamed Type::isIntegral() to Type::isInteger()
- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.
SCVS: ----------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3572 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-03 01:05:48 +00:00
Chris Lattner
d122f4b648 Fix bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3569 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-02 20:49:27 +00:00
Chris Lattner
96f9d7232c Add printing support to ConstantRange class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3565 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-02 00:18:22 +00:00
Chris Lattner
645e00d149 Initial implementation of ConstantRange support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3563 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-01 23:53:36 +00:00
Chris Lattner
c74cb8698f - Eliminate the last traces of the 'analysis' namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3550 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-30 22:53:53 +00:00
Chris Lattner
3e813b38f1 Minor cleanups so I can remove BasicValueNumbering.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3544 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-30 22:30:36 +00:00
Chris Lattner
74542b64b1 initial implementation of ValueNumbering interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3541 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-30 20:29:02 +00:00
Chris Lattner
71c7ec9b18 Initial implementation of value numbering for load instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3540 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-30 20:28:10 +00:00
Chris Lattner
04b9025450 Remove unneeded #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3524 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-29 20:08:55 +00:00
Anand Shukla
e0b6b78e09 Changed so it gets linked properly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3508 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-26 16:45:19 +00:00
Chris Lattner
3bb8ad27a8 Eliminated the MemAccessInst class, folding contents into GEP class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3488 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-22 23:37:24 +00:00
Chris Lattner
24ea74eb9a Load & StoreInst no longer derive from MemAccessInst, so we don't have
to handle indexing anymore


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3485 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-22 22:49:05 +00:00
Chris Lattner
f9355f636b doxygenize comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3481 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-22 22:46:39 +00:00
Chris Lattner
22d8cd6143 Add missing #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3467 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-22 18:57:09 +00:00
Chris Lattner
53ad0edd36 Check-in new alias analysis infrastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3465 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-22 18:25:32 +00:00
Chris Lattner
a69fd90358 - Split Dominators.h into Dominators.h & PostDominators.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3432 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-21 23:43:50 +00:00
Chris Lattner
546b027b3e - Do not expose ::ID from any of the analyses anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3417 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-21 17:09:49 +00:00
Chris Lattner
044f908791 - Do not expose ::ID from any of the analyses anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3416 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-21 17:09:45 +00:00
Chris Lattner
389694834a *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3282 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-09 22:52:08 +00:00
Chris Lattner
dd5b495129 - 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@3264 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-08 19:01:28 +00:00
Chris Lattner
221c97974c Minor changes to DEBUG()'s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3261 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-07 21:41:11 +00:00
Chris Lattner
13c476cbd1 Reorder #includes to be right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3260 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-07 21:41:03 +00:00
Chris Lattner
4c9df7c619 Split dominance calculation and post dominance calculation stuff
Dominance calculation goes to VMCore library to be used by Verifier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3210 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-02 16:43:03 +00:00
Chris Lattner
7541b89092 Changes to be GCC3.1 friendly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3186 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 19:32:12 +00:00
Chris Lattner
1b0a63fa64 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3185 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 19:32:01 +00:00
Chris Lattner
dadd49bdb8 Add new -only-print-main-ds option that causes mains ds graph to be
printed, but no others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3178 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 17:15:40 +00:00
Vikram S. Adve
358fc38d3b Add GlobalDSGraph -- a common graph that holds externally visible nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3173 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 22:08:08 +00:00
Vikram S. Adve
dfd2f32bf7 Print globals graph after either the BU or the TD pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3172 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 22:07:26 +00:00
Vikram S. Adve
aaeee75af8 This file implements the top-down propagation pass for data structure graphs.
Also, we now use a separate globals graph to hold externally visible nodes.
This changes both the bottom-up and top-down propagation so that
globals and other external objects do not have to appear in every
function, but only in functions in which they are referenced or
they can be used to access something else that is referenced.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3171 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 22:06:40 +00:00
Vikram S. Adve
355e2ca1f4 Use a separate globals graph to hold externally visible nodes.
This changes both the bottom-up and top-down propagation so that
globals and other external objects do not have to appear in every
function, but only in functions in which they are referenced or
they can be used to access something else that is referenced.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3170 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 22:05:22 +00:00
Chris Lattner
17689dfe24 Declare that these passes only depend on the CFG of the function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3157 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 16:27:52 +00:00
Chris Lattner
eb702350f7 * Eliminate the Provided set. All Passes now finally just automatically
provide themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3124 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:03:33 +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
97f51a3024 * 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@3115 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-27 01:12:15 +00:00
Chris Lattner
a6275ccdf5 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3113 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 21:12:46 +00:00
Chris Lattner
1e43516dcf * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3112 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 21:12:44 +00:00
Chris Lattner
ce6ef112c4 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3105 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 18:40:14 +00:00
Chris Lattner
cdcfcf65d9 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3097 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-25 19:59:41 +00:00
Chris Lattner
ceadf0514b GCC 3.1 changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3071 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 22:40:36 +00:00
Chris Lattner
d31d81c7ae *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3069 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 22:33:53 +00:00
Chris Lattner
1868227886 Changes for GCC 3.1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3068 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 22:33:50 +00:00
Chris Lattner
56d27019e6 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3002 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 17:52:38 +00:00
Chris Lattner
f78a824b3c Convert over to new style makefile where libraries by default build .o files
unless they specify BUILD_ARCHIVE to also build a .a file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3001 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 17:52:24 +00:00
Chris Lattner
eef796c767 Always create a shadow node for a store instruction, even if it's storing
a scalar value.  Likewise for load instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2990 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-22 16:35:53 +00:00
Chris Lattner
5ff62e90d0 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2985 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-22 02:10:13 +00:00
Chris Lattner
21735d739b Convert Command Line option handling code to use the CommandLine 2.0 interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2983 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-22 02:08:59 +00:00
Chris Lattner
173e4244db Print the contents, not the pointer...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2981 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-22 02:06:50 +00:00
Chris Lattner
9eee58d0ba Ignore some common varargs functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2973 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-19 18:11:43 +00:00
Chris Lattner
e221976b37 * Inline CopyFunctionCallsList
* Don't clone OrigCallList
* Rename removeDeadNodes -> removeTriviallyDeadNodes
* Implement new removeDeadNodes method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2970 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 18:22:40 +00:00
Chris Lattner
2a2c490154 Rename removeDeadNodes to removeTriviallyDeadNodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2969 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 18:19:09 +00:00
Vikram S. Adve
c44e9bfa5c Add support for a top-down propagation pass:
-- Save a copy of the original call nodes in DSGraph before inlining bottom-up.
-- Also, save a list of the callers of each function in DSGraph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2966 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 16:13:52 +00:00
Vikram S. Adve
6aa0d62cb9 Add support for a top-down propagation pass.
Each DSGraph now keeps a list of pending callers that have not
been inlined into the function represented by that graph.
It also keeps a copy of the original call nodes before the BU pass
eliminates some of them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2965 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 16:12:08 +00:00
Chris Lattner
055dc2c67e Implement cast nodes correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2964 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 15:54:42 +00:00
Chris Lattner
d99d4d7b70 * s/method/function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2958 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 04:43:16 +00:00
Chris Lattner
d124c38993 The graph is more accurate when I don't completely ignore the return value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2952 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 01:58:24 +00:00
Chris Lattner
0d9bab8bac Lots of bug fixes, add BottomUpClosure, which has bugs, but is a start.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2945 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 00:12:30 +00:00
Anand Shukla
6c5ed410b2 added std:: to string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2915 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-16 00:03:10 +00:00
Chris Lattner
76d5b489e3 * Pass the DSGraph around instead of the Function to printing fns
* Print the globals list in the node
* Print the scalars in the scalar node
* Eliminate Scalar "label" edges in the graph
* Print fake edges lighter instead of dotted


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2880 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-11 20:33:32 +00:00
Chris Lattner
f9ae4c5cb6 * Nodes now keep track of any global variables in them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2879 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-11 20:32:22 +00:00
Chris Lattner
c314ac49d7 * Nodes now keep track of any global variables in them
* Only dead-node-eliminate nodes with no flags
* Don't merge scalars, only merge what they point to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2878 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-11 20:32:02 +00:00
Chris Lattner
c68c31b2d3 New implementation of data structure analysis. Only local analysis has been
implemented so far.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2871 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 22:38:08 +00:00
Chris Lattner
2b0f739d57 Reimplement data structure analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2868 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 22:36:26 +00:00
Vikram S. Adve
9afa88c3a7 A single MachineInstr operand may now be both a def and a use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2825 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 22:56:34 +00:00
Chris Lattner
9fdaeb44b3 Fix anand's last checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2804 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-30 16:01:15 +00:00
Anand Shukla
3b5eabb24b changes to make it compatible with 64bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2795 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 21:18:19 +00:00
Anand Shukla
a928403ca4 changes to make it compatible with 64bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2789 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 20:35:19 +00:00
Anand Shukla
add9643e92 minor change in removing endl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2788 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 20:34:54 +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
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
0f99555ce4 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2755 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-03 22:10:52 +00:00
Chris Lattner
70e60cbd4d Move debug options out of header files so that the header does not have
to #include CommandLine.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2712 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:08:27 +00:00
Chris Lattner
59dcbf9c03 Move the DEBUG_LV option out of the public header file into a private header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2711 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:07:26 +00:00
Chris Lattner
ad86b74baf Hide debugging options
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2676 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 21:39:10 +00:00
Chris Lattner
ef704a23b4 Add method to check to see if two _Instructions_ dominate each other
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2616 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-13 22:03:16 +00:00
Chris Lattner
4874680b65 Print out post dominance data structures more nicely
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2562 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-08 23:11:08 +00:00
Chris Lattner
fc514f40a6 Move UnifyFunctionExitNodes to Utils library: final resting place this time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2531 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 19:18:48 +00:00
Chris Lattner
c8cc4cb03b Updates to move some header files out of include/llvm/Transforms into
the Scalar and Utils subdirectories


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2523 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 18:36:35 +00:00
Chris Lattner
07a228d1f7 Mark analyses that only depend on the CFG of a function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2507 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-06 19:32:07 +00:00
Chris Lattner
db93124d41 Add #include removed from ConstantHandling.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2496 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-06 17:53:10 +00:00
Chris Lattner
9b625030c8 Replace all usages of Type::isPointerType with isa<PointerType>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2486 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-06 16:15:30 +00:00
Chris Lattner
c6f3ae5c66 Eliminate duplicate or unneccesary #include's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2397 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 17:42:12 +00:00
Chris Lattner
31bcdb822f Split ConstantVals.h into Constant.h and Constants.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2378 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 19:55:58 +00:00
Chris Lattner
bfeec103e1 Simplify and update code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2376 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 19:20:10 +00:00
Chris Lattner
1b7f7dc4b4 Eliminate the cfg namespace, moving LoopInfo, Dominators, Interval* classes
to the global namespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2370 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 16:21:30 +00:00
Chris Lattner
96d0f3011a Module's are no longer Value subclasses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2351 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:50:00 +00:00
Chris Lattner
3bed5b46ba Fix signed/unsigned comparison warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2350 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:49:43 +00:00
Chris Lattner
a298d27808 Change the Dominator info and LoopInfo classes to keep track of BasicBlock's, not
const BasicBlocks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2337 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 00:15:57 +00:00
Chris Lattner
483e14ee04 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2336 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 07:27:19 +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
ee7eafa054 Add support for tracking array allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2328 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 02:28:41 +00:00
Chris Lattner
2aa51be083 Allow the inline limit to be modified on the commandline for debugging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2327 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 02:27:48 +00:00
Chris Lattner
1a18b7cf80 Change Constant::getNullConstant to Constant::getNullValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2323 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 02:25:14 +00:00
Chris Lattner
6228106e9f Just use << isntead of forcing getStrValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2294 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:14:40 +00:00
Chris Lattner
595d2f670a Print argument scalars as ellipses instead of boxes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2293 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:14:19 +00:00
Chris Lattner
ef35ff066c Inline indirect function calls that are only capable of calling one function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2275 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-17 03:42:51 +00:00
Chris Lattner
fe14568a81 Make data structure acurately get ALL edges, even loads of null fields of
nodes that are not shadow nodes

This fixes em3d to be _correct_ if not optimial


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2274 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-17 03:24:59 +00:00
Chris Lattner
7650b94c75 * Remove the concept of a critical shadow node
* Make the function pointer argument explicit for a call nodes
* Eliminate unreachable global values
* Merge call nodes that are identical


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2266 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 20:39:59 +00:00
Chris Lattner
212be2e569 * Eliminate ArgDSNode's completely, now rely on scalar map
* Fold call nodes that are indistinguishable for each other.  This is a big
  win for external functions like sqrt, which would multiply dramatically
  before.
* Global nodes with no edges to or from them are now eliminated from the graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2257 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 03:44:03 +00:00
Chris Lattner
5648b58a19 Print out what the root of the call graph is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2223 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-10 20:31:44 +00:00
Chris Lattner
73e214244f Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2216 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 19:48:49 +00:00
Chris Lattner
0ac5429ff0 Add explicit #includes of Function.h to make up for the removed #include
in iOther.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2209 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 19:08:28 +00:00
Chris Lattner
42a412711c Add #includes to make up for #includes pruned out of header files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2207 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 18:37:46 +00:00
Chris Lattner
918c4ecb0c Don't leak all of the Loop objects created...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2196 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:43:19 +00:00
Chris Lattner
fb005fe5c2 * General cleanups
* In calcLiveVarSetsForBB, do not leak a ValueSet every time the function
  is called!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2189 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 05:14:14 +00:00
Chris Lattner
b7653df085 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2180 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 22:03:57 +00:00
Chris Lattner
c8a79af27d isLabelType is obsolete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2175 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:59:08 +00:00
Chris Lattner
e6d4ec3d5a Play around with #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2174 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:58:53 +00:00
Chris Lattner
ab44871a5d Add #includes that were pruned from already #included files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2173 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:56:50 +00:00
Chris Lattner
968ddc921e ConstantHandling moved into VMCore library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2165 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 20:18:09 +00:00
Chris Lattner
2fbfdcffd3 Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2144 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 20:49:59 +00:00
Chris Lattner
0009dac2bf Call nodes are never equivalent
Shadow nodes are never critical.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2102 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:21:51 +00:00
Chris Lattner
1f1170c94a Add hack to get timing of analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2101 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:21:27 +00:00
Chris Lattner
cc0c1b2e18 * Eliminate commented out code
* Do not demand a shadow node when resolving
* Raise arbitrary inline limit


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2100 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:21:06 +00:00
Chris Lattner
a13d6ceed7 Support resolving function arguments/return values to pointers that index
into other objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2094 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-01 22:20:48 +00:00
Chris Lattner
e0d1d1acf6 Avoid incorrectly adding null values to the scalar map!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2085 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-01 00:45:09 +00:00
Chris Lattner
dba61f34e8 Critical shadow nodes no do not know their parent explictly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2084 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-01 00:15:30 +00:00
Chris Lattner
3feaf02c47 Minor cleanups (use dyn_cast instead of testing manually)
Shadow nodes now don't explicitly know their parent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2083 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-01 00:14:41 +00:00
Chris Lattner
f30185fdfb Allow merging of identical call nodes. Make the shadow node pointed to
by the call node noncritical before the call is destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2082 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-01 00:13:56 +00:00
Chris Lattner
bab4a90cb9 Increase limit for perimeter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2081 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-01 00:12:58 +00:00
Chris Lattner
0b7c85c06a Unify the destruction code used for node pairs vs normal nodes. This was
causing a problem before because global values with incoming edges didn't
copy the incoming edges to the node they were being merged from, causing
the poolalloc pass to die.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2079 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-31 19:57:44 +00:00
Chris Lattner
b28bf05483 * Move the isEquivalentTo implementations here. They can probably be put
someplace nicer in the file though.
* Add new dump method for debugging


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2064 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-31 07:16:08 +00:00
Chris Lattner
e6b552fd86 Print out the instruction instead of just the address!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2063 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-31 07:15:20 +00:00
Chris Lattner
44cf390784 * Move isEquivalentTo implementations to NodeImpl
* Implement a new form of node folding to catch cases missed in Addtree
* Add removeIndistinguishableNodePairs to merge calls (todo) and globals


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2062 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-31 07:14:52 +00:00
Chris Lattner
26cfa6664c * Convert CallMap to be a vector, because the keys can change, and the map
doesn't resort!
* Be more generous with the cached matches that we allow now.
* Recursive calls should all work now!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2061 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-31 07:13:27 +00:00
Chris Lattner
dc89f87d52 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2043 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 17:08:29 +00:00
Chris Lattner
4dc1f82e7e Implement getEscapingAllocations & getNonEscapingAllocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2021 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 19:33:00 +00:00
Chris Lattner
7d093d4231 * Rename UnlinkUndistinguishableShadowNodes & RemoveUnreachableShadowNodes
to reflect that they can eliminate arbitrary nodes.
* Rename the ShadowNodeEliminate.cpp file to EliminateNodes.cpp for the
  same reason


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2020 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 19:16:48 +00:00
Chris Lattner
cdae0b2591 Ooops, I did such a great job pruning nodes, that I accidentally deleted
ALL allocation nodes... hrm... bad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2018 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 18:38:38 +00:00
Chris Lattner
1120c8b34a Many changes
* Simplify a lot of the inlining stuff.  There are still problems, but not
  many
* Break up the Function representation to have a vector for every different
  node type so it is fast to find nodes of a particular flavor.
* Do more intelligent merging of call values
* Allow elimination of unreachable shadow and allocation nodes
* Generalize indistinguishability testing to allow merging of identical calls.
* Increase shadow node merging power


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2010 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 17:56:03 +00:00
Chris Lattner
2ba3a72c3a * Add #define to enabled debug messages
* Move removeEdgesTo to be a member of DSNode
* Implement (but #ifdef out) the new, spiffier, method of determining
  shadow node equivalence.  This cannot be enabled until more is
  implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2004 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 19:48:03 +00:00
Chris Lattner
6088c4f55e * Implement DSNode::removeAllIncomingEdges
* Implement Critical Shadow node handling
* Implement routines to determine whether an allocation node is a malloc
  or alloca


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2003 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 19:46:05 +00:00
Chris Lattner
f4066b3fe1 * Add critical node support
* Optimize graph after building it.  This should be unneccesary in the future


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2002 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 19:45:12 +00:00
Chris Lattner
ea4af65b72 * Destroy alloca nodes when a graph gets inlined
* Add links to all subtrees when a shadow node gets resolved
* Add critical node handling


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2001 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 19:44:33 +00:00
Chris Lattner
9d42a1d2f9 * Optimizers return true on change
* Implement indistinguishable shadow node elimination


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1999 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 00:55:13 +00:00
Chris Lattner
dd3fc184f5 Fix long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1998 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 00:54:31 +00:00
Chris Lattner
df8af1ca89 * Because of optimization, the shadow nodes between arguments might get
removed.  Check to see if they are there.
* Repeat optimizations while changing


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1997 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 00:53:57 +00:00
Chris Lattner
bb2a28fec5 Initial checkin of Datastructure analysis.
Has bugs, but shouldn't crash in theory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1994 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 22:39:06 +00:00
Chris Lattner
e590ff260e change refs to Method to Function
Change references to MEthodArgument to FunctionArgument


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1989 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 17:55:33 +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
Vikram S. Adve
4a12da7912 Fixed several problems with handling arguments to Phis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1910 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:47:26 +00:00
Vikram S. Adve
9cf85a75d2 Big bug fix: killed uses were being inserted instead of erased!
Also added a set of debug options.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1909 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:45:41 +00:00
Chris Lattner
9b534266f0 Fix test/Regression/Other/2002-03-14-ValueToLarge.ll. Note that this
fix could be better, but we don't have the infrastructure to find out what
size types are yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1876 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-14 22:35:50 +00:00
Chris Lattner
cb05e78cb7 Bugfix for test/Regression/Other/2002-03-11-ExprAssertion.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1856 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-11 20:50:24 +00:00
Chris Lattner
9c85fa660e Initial checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1831 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-07 20:16:38 +00:00
Chris Lattner
d4d427baa9 Clean up call graph, add comments, and fix test/Regression/Other/2002-01-31-CallGraph.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1828 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 20:19:35 +00:00
Chris Lattner
71e7bb4bc0 Pull interprocedural analyses out of Analysis library into their own lib
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1827 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 18:44:29 +00:00
Chris Lattner
8d5a16ca0b Move call graph printing support out of Writer.h into Callgraph.h
remove dead global function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1825 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 18:00:49 +00:00
Chris Lattner
4ce0f8aa9e Take CallGraph out of the CFG namespace. It has nothing to do with CFGs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1820 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-06 17:16:43 +00:00
Chris Lattner
1ddf664f74 Make it compile with GCC 3.0.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1786 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-24 23:01:21 +00:00
Chris Lattner
455889aa79 * Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
  InstrTypes.h anymore


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1750 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-12 22:39:50 +00:00
Chris Lattner
221d688a5e 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1746 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-12 21:07:25 +00:00
Chris Lattner
6357a3f42d Convert BBLiveVar to be a BasicBlock annotation, this removes the BB2BBLVMap from MethodLiveVarInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1721 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 06:52:25 +00:00
Chris Lattner
2f898d2074 Convert operand iterator over to work like an STL iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1720 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 06:02:59 +00:00
Chris Lattner
748697d242 Minor change: Methods that return ValueSet's that are guaranteed to be valid
return references instead of pointers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1719 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 04:20:12 +00:00
Chris Lattner
7471a7b019 Must include SetOperations to do set_*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1716 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 03:35:53 +00:00
Chris Lattner
eb5230c4f9 Remove generic routines to Support/SetOperations.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1715 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 03:35:31 +00:00
Chris Lattner
c980c50dc1 Remove empty files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1713 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 02:52:53 +00:00
Chris Lattner
5e5dfa307a * Eliminate the LiveVarSet class, making applyTranferFuncForMInst a static
function in the one .cpp file that uses it.  Use ValueSet's instead.
* Prepare to delete LiveVarSet.h & LiveVarSet.cpp
* Eliminate the ValueSet class, making all old member functions into global
  templates that will eventually be moved to Support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1711 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 02:51:01 +00:00
Chris Lattner
0665a5f1f5 * Code Cleanups
* Introduce RAV to allow stream I/O instead of using printValue


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1710 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 01:43:49 +00:00
Chris Lattner
f39f379f9e Changes neccesary due to the move of BBLiveVar.h to the lib/Analysis/LiveVar directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1709 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 00:43:37 +00:00
Chris Lattner
ab584111e7 * Give BBLiveVar.cpp a proper file header
* applyFlowFunc DOES NOT NEED TO COPY the huge BB->BBLiveVar Map every time it is invoked!
* Big cleanups.
* Make BBLiveVar.h effectively an internal header file
* Prepare LiveVarMap.h for deletion


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1706 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 00:34:50 +00:00
Chris Lattner
0174410fd0 * Big cleanups.
* Make BBLiveVar.h effectively an internal header file
* Prepare LiveVarMap.h for deletion


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1705 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 00:33:19 +00:00
Chris Lattner
a51c7a8ef5 Code cleanups, no functional change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1704 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 23:31:16 +00:00
Chris Lattner
bdfd328515 Clean up MethodLiveVarInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1703 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 20:49:04 +00:00
Chris Lattner
4fd2dbbf1d Turn live variable analysis into a real MethodPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1699 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 20:00:08 +00:00
Chris Lattner
bcbce17864 Remove Obsolete LoopDepthCalculator. All users should use LoopInfo directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1697 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 17:49:01 +00:00
Chris Lattner
f806c025bd REmove huge hack used by register allocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1694 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 17:39:02 +00:00
Chris Lattner
1164632c7e * Add #includes that were yanked out of header files
* Convert over to valueset interface that uses insert & erase insead of add and remove
* the -> operator really isn't that hard to use!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1687 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 16:35:12 +00:00
Chris Lattner
65b1ad9042 Cut down include pollution and number of frivolous consts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1683 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 16:31:03 +00:00
Chris Lattner
28a7aa0e64 Eliminate ModuleAnalyzer. It's old code that is not going to be used in the near future
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1679 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 06:47:17 +00:00
Chris Lattner
9e881eb60d Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1671 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 05:48:24 +00:00
Chris Lattner
56cf02d5a0 Lots of nonfunctional code cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1642 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:25:25 +00:00
Chris Lattner
65b9709071 Provide the right AnalysisID for postdominators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1616 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-31 18:29:24 +00:00
Chris Lattner
93193f8063 Convert analyses to new pass structure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1603 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-31 00:42:27 +00:00
Chris Lattner
0f0fc3253d Implement loop depth calculation in terms of dominators instead of intervals
No problems with irreducibility now


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1602 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-31 00:42:06 +00:00
Chris Lattner
59b6b8e0b3 Move stuff out of the Optimizations directories into the appropriate Transforms
directories.  Eliminate the opt namespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1520 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-21 23:17:48 +00:00