Misha Brukman
c9c721edf0
Fix spelling of `propagate'.
...
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner
d6e5d73aa8
Eliminate uses of MachineBasicBlock::get
...
llvm-svn: 4340
2002-10-28 18:01:21 +00:00
Chris Lattner
b8c6acfbc0
Rename MachineCodeForBasicBlock to MachineBasicBlock
...
llvm-svn: 4318
2002-10-28 01:41:47 +00:00
Chris Lattner
296c58a00c
- Make sure to only keep track of mappings that the TD pass may need in the
...
future. This prevents having spurious map entries to nodes that we really
don't care about. This allows us to reenable the DeadNodeElim, which was
disabled.
llvm-svn: 4260
2002-10-22 16:01:03 +00:00
Chris Lattner
61b32b3ab0
The callee is not correct, and confuses the TD pass. Null it out.
...
llvm-svn: 4259
2002-10-22 15:58:46 +00:00
Chris Lattner
1157e5dafb
Delete unused arguments to DSGraph::cloneInto method
...
llvm-svn: 4253
2002-10-21 19:50:29 +00:00
Chris Lattner
4410178282
- Add "ResolvingCaller" to the CallSite record. This keeps track of which
...
function was finally able to resolve the function call. Adding this allows
the TD pass to actually work right!
- Temporarily disable dead node pruning. This will be reenabled soon.
llvm-svn: 4252
2002-10-21 19:47:18 +00:00
Chris Lattner
7588e35aa8
Add another copy ctor form
...
llvm-svn: 4251
2002-10-21 15:32:34 +00:00
Chris Lattner
1276c50e7b
As it turns out, we don't need a fully generic mapping copy ctor, we just need
...
something that maps through a std::map. Since this simplified the client and
implementation code, do so now.
llvm-svn: 4250
2002-10-21 15:04:18 +00:00
Chris Lattner
8929f75913
Don't create a new node for every reference to a global. This caused a huge
...
node explosion that doesn't help anything at all. In previous versions of
the representation this DID help, but not anymore.
llvm-svn: 4249
2002-10-21 13:51:30 +00:00
Chris Lattner
9f6ddf9bdd
Fix a confusing bug that caused return value and callee pointers to not
...
be printed!
llvm-svn: 4248
2002-10-21 13:47:57 +00:00
Chris Lattner
01fc78de5f
Remove some unneccesary 'using' directives
...
llvm-svn: 4246
2002-10-21 13:31:48 +00:00
Chris Lattner
1953a9de17
Fix bug with prior checkin
...
llvm-svn: 4242
2002-10-21 02:18:55 +00:00
Chris Lattner
2914391ab6
- Make DSCallSite not inherit from std::vector. Renamed methods slightly.
...
Make copy ctor have two versions to avoid dealing with conditional template
argument. DSCallSite ctor now takes all arguments instead of taking one
and being populated later.
llvm-svn: 4240
2002-10-21 02:08:03 +00:00
Chris Lattner
189b9b5397
Avoid extra copy
...
llvm-svn: 4239
2002-10-20 22:12:06 +00:00
Chris Lattner
9d0418d007
Simplify code a bit, add comment flyer
...
llvm-svn: 4238
2002-10-20 22:11:44 +00:00
Chris Lattner
4eec37a762
Split some long lines
...
llvm-svn: 4237
2002-10-20 22:11:17 +00:00
Vikram S. Adve
85a358583f
Remove spurious caller pointer in DSCallSite.
...
Also add functions to access pointer argument nodes cleanly.
llvm-svn: 4235
2002-10-20 21:41:02 +00:00
Chris Lattner
ff8176c481
This function can be static
...
llvm-svn: 4234
2002-10-20 20:39:31 +00:00
Chris Lattner
cf6f36ae27
Fix previous checkin :(
...
llvm-svn: 4233
2002-10-20 20:39:17 +00:00
Chris Lattner
2f778ae5aa
Avoid extra callSite copy
...
llvm-svn: 4232
2002-10-20 20:32:13 +00:00
Chris Lattner
3af7377974
Print the array flag
...
llvm-svn: 4231
2002-10-20 20:29:10 +00:00
Vikram S. Adve
c02c96c3de
Added a first-class representation for each call site that can be
...
used in the DS graphs. Essentially, what was vector<DSNodeHandle>
before is now a DSCallSite with the same vector, plus pointers to the
CallInst and the caller Function. The special-purpose class
BUDataStructure::CallSite is no longer needed.
llvm-svn: 4228
2002-10-20 18:07:37 +00:00
Chris Lattner
efc251af3d
Convert typerec to be a structure instead of a pair
...
llvm-svn: 4226
2002-10-18 18:22:46 +00:00
Chris Lattner
bd5e932aeb
Print Mod/ref info
...
llvm-svn: 4224
2002-10-17 22:13:28 +00:00
Chris Lattner
51b2abb899
Calculate mod/ref info
...
llvm-svn: 4223
2002-10-17 22:13:19 +00:00
Chris Lattner
4e44ccce8a
Remove more obsolete code
...
llvm-svn: 4221
2002-10-17 20:53:12 +00:00
Chris Lattner
2ffe6a8e0b
* Make the DSGraph cloner automatically merge global nodes
...
* BUClosure doesn't have to worry about global nodes
* TDClosure now works with global nodes
* Reenable DNE on TD pass, now that globals work right
llvm-svn: 4220
2002-10-17 20:09:52 +00:00
Chris Lattner
920190f83a
Remove obsolete code
...
llvm-svn: 4218
2002-10-17 04:58:10 +00:00
Chris Lattner
90ccd73585
Enable incompleteness marking
...
llvm-svn: 4217
2002-10-17 04:57:28 +00:00
Chris Lattner
5028142e9a
* First try at implementing TD pass this does not merge global nodes yet,
...
among other things.
* Significant rewrite of TD pass to avoid potentially N^2 algorithms if
possible. It is still not complete, but at least it's checked in now.
llvm-svn: 4215
2002-10-17 04:26:54 +00:00
Chris Lattner
b61fe19f98
Reenable printing of TD analysis
...
llvm-svn: 4214
2002-10-17 04:24:30 +00:00
Chris Lattner
0c48561a9e
* Add data structures and code to track the call sites for each function
...
llvm-svn: 4213
2002-10-17 04:24:08 +00:00
Chris Lattner
516c8391c7
Cleanup data structure graph printer, eliminate hard coded printing in
...
favor of generic printer.
llvm-svn: 4209
2002-10-17 01:02:46 +00:00
Chris Lattner
1e46327844
Make sure to print out the call nodes as well
...
llvm-svn: 4203
2002-10-16 20:16:16 +00:00
Chris Lattner
278e5a3fe6
* Print the "return" node in the graphs
...
llvm-svn: 4199
2002-10-16 02:04:36 +00:00
Chris Lattner
3702063ff3
The second element of the iterator is really an offset, not a link
...
llvm-svn: 4196
2002-10-16 01:43:11 +00:00
Chris Lattner
9ed6bfa052
Specify the graph name
...
llvm-svn: 4195
2002-10-16 01:34:28 +00:00
Chris Lattner
afeca1f7f6
- DSGraph Printing Improvements:
...
* Print edge source labels again
* Override node shape to be Mrecord again, instead of just record.
llvm-svn: 4193
2002-10-16 01:18:27 +00:00
Chris Lattner
ee64370eb5
Halfway conversion from custom printing to GraphWriter printing
...
llvm-svn: 4146
2002-10-13 19:31:57 +00:00
Vikram S. Adve
5b3555bdd3
Use PARALLEL_DIRS.
...
llvm-svn: 4114
2002-10-11 16:08:17 +00:00
Misha Brukman
b4940744de
Added capability to get execution count of a loop if it is a predictable
...
number of iterations.
llvm-svn: 4113
2002-10-11 05:34:32 +00:00
Misha Brukman
d55cfa6b94
Added helper functions in LoopInfo: isLoopExit and numBackEdges.
...
llvm-svn: 4112
2002-10-11 05:31:10 +00:00
Chris Lattner
a923b0f49f
Handle post dominance correctly in the case where blocks do not have a path to
...
the exit node.
llvm-svn: 4038
2002-10-04 14:50:20 +00:00
Chris Lattner
eeecc3e1b3
Prune function nodes that are no longer referenced due to inlining
...
llvm-svn: 4036
2002-10-03 21:55:28 +00:00
Chris Lattner
8f603615d8
sgefa uses truely huge data structures nodes. Only print part of them if they
...
are so big
llvm-svn: 4035
2002-10-03 21:55:13 +00:00
Chris Lattner
31d4a68166
Handle bug exposed by power benchmark
...
llvm-svn: 4033
2002-10-03 21:06:38 +00:00
Chris Lattner
fcdb95cd42
Reimplement/port the Bottom Up Closure pass
...
llvm-svn: 4031
2002-10-03 20:38:41 +00:00
Chris Lattner
e52f808665
DataStructure.h doesn't include DSGraph.h
...
llvm-svn: 4029
2002-10-02 22:14:38 +00:00
Chris Lattner
62ca2aa593
* Implement fully general merging of array subscripts on demand! This
...
does not handle the initial pointer index case yet though.
llvm-svn: 4012
2002-10-02 06:24:36 +00:00
Chris Lattner
5f38d9c112
When printing DS nodes, print the mergemap index as well to allow easier
...
debugging of merging process.
llvm-svn: 4010
2002-10-02 05:17:55 +00:00
Chris Lattner
8c25c1a641
* 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.
llvm-svn: 4008
2002-10-02 04:57:39 +00:00
Chris Lattner
9fc451723d
Initial checkin of Steensgaards context insensitive flow insensitive
...
alias analysis
llvm-svn: 3997
2002-10-01 22:34:12 +00:00
Chris Lattner
c1b7de86d5
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.
llvm-svn: 3996
2002-10-01 22:33:50 +00:00
Chris Lattner
53be50fb2f
Minor tweak
...
llvm-svn: 3985
2002-09-29 22:59:29 +00:00
Chris Lattner
45c83d6451
Fix printing of loop information
...
llvm-svn: 3977
2002-09-29 21:43:04 +00:00
Chris Lattner
a9bc408104
First try at implementing the AliasSetTracker class. I'm sure it will need
...
revision as I start to use it though.
llvm-svn: 3954
2002-09-26 21:49:07 +00:00
Chris Lattner
8b97a81265
Fix printing of loop information
...
llvm-svn: 3941
2002-09-26 16:15:54 +00:00
Chris Lattner
bfa0786c7e
- Add new methods to LoopInfo: getLoopPreheader, addBasicBlockToLoop.
...
These allow extra information to be easily gathered, and loopinfo to be
updated.
llvm-svn: 3936
2002-09-26 05:32:50 +00:00
Chris Lattner
04af33fe09
Convert BasicVN to be an ImmutablePass
...
llvm-svn: 3924
2002-09-25 22:27:25 +00:00
Chris Lattner
34d9c4ec10
Make users of FindUsedTypes not have problems with linkage. This fixes
...
Cwriter.
llvm-svn: 3900
2002-09-24 00:07:21 +00:00
Chris Lattner
9275e21d28
Clean up indvar printing
...
llvm-svn: 3650
2002-09-10 15:35:39 +00:00
Chris Lattner
fb6bb789a1
* 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.
llvm-svn: 3616
2002-09-08 18:45:18 +00:00
Chris Lattner
e4bba98678
- Renamed Type::isIntegral() to Type::isInteger()
...
- Added new method Type::isIntegral() that is the same as isInteger, but
also accepts bool.
SCVS: ----------------------------------------------------------------------
llvm-svn: 3572
2002-09-03 01:05:48 +00:00
Chris Lattner
838248b35a
- Eliminate the last traces of the 'analysis' namespace
...
llvm-svn: 3550
2002-08-30 22:53:53 +00:00
Chris Lattner
c94462fbe9
Minor cleanups so I can remove BasicValueNumbering.h
...
llvm-svn: 3544
2002-08-30 22:30:36 +00:00
Chris Lattner
8b13415389
initial implementation of ValueNumbering interface.
...
llvm-svn: 3541
2002-08-30 20:29:02 +00:00
Chris Lattner
9c31585ee4
Initial implementation of value numbering for load instructions
...
llvm-svn: 3540
2002-08-30 20:28:10 +00:00
Chris Lattner
c43d102d67
Remove unneeded #include
...
llvm-svn: 3524
2002-08-29 20:08:55 +00:00
Anand Shukla
1e105cdb7c
Changed so it gets linked properly
...
llvm-svn: 3508
2002-08-26 16:45:19 +00:00
Chris Lattner
9f18db8156
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3488
2002-08-22 23:37:24 +00:00
Chris Lattner
969c616d51
Load & StoreInst no longer derive from MemAccessInst, so we don't have
...
to handle indexing anymore
llvm-svn: 3485
2002-08-22 22:49:05 +00:00
Chris Lattner
4335ee9dc4
doxygenize comments
...
llvm-svn: 3481
2002-08-22 22:46:39 +00:00
Chris Lattner
a318e4f15d
Add missing #include
...
llvm-svn: 3467
2002-08-22 18:57:09 +00:00
Chris Lattner
db03d21066
Check-in new alias analysis infrastructure
...
llvm-svn: 3465
2002-08-22 18:25:32 +00:00
Chris Lattner
c4bd846e84
- Split Dominators.h into Dominators.h & PostDominators.h
...
llvm-svn: 3432
2002-08-21 23:43:50 +00:00
Chris Lattner
6c83ee57c1
- Do not expose ::ID from any of the analyses anymore.
...
llvm-svn: 3417
2002-08-21 17:09:49 +00:00
Chris Lattner
b90f78e2b3
- Do not expose ::ID from any of the analyses anymore.
...
llvm-svn: 3416
2002-08-21 17:09:45 +00:00
Chris Lattner
c159d739a5
*** empty log message ***
...
llvm-svn: 3282
2002-08-09 22:52:08 +00:00
Chris Lattner
91d4742562
- Cleaned up the interface to AnalysisUsage to take analysis class names
...
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
llvm-svn: 3264
2002-08-08 19:01:28 +00:00
Chris Lattner
75f1e2a970
Minor changes to DEBUG()'s
...
llvm-svn: 3261
2002-08-07 21:41:11 +00:00
Chris Lattner
d9530f6734
Reorder #includes to be right
...
llvm-svn: 3260
2002-08-07 21:41:03 +00:00
Chris Lattner
829a3f1c3a
Split dominance calculation and post dominance calculation stuff
...
Dominance calculation goes to VMCore library to be used by Verifier.
llvm-svn: 3210
2002-08-02 16:43:03 +00:00
Chris Lattner
303fa649e3
Changes to be GCC3.1 friendly
...
llvm-svn: 3186
2002-07-31 19:32:12 +00:00
Chris Lattner
24f5355b1f
*** empty log message ***
...
llvm-svn: 3185
2002-07-31 19:32:01 +00:00
Chris Lattner
d376feeb74
Add new -only-print-main-ds option that causes mains ds graph to be
...
printed, but no others.
llvm-svn: 3178
2002-07-31 17:15:40 +00:00
Vikram S. Adve
6162134b47
Add GlobalDSGraph -- a common graph that holds externally visible nodes.
...
llvm-svn: 3173
2002-07-30 22:08:08 +00:00
Vikram S. Adve
abafb80e33
Print globals graph after either the BU or the TD pass.
...
llvm-svn: 3172
2002-07-30 22:07:26 +00:00
Vikram S. Adve
6152aa7f73
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.
llvm-svn: 3171
2002-07-30 22:06:40 +00:00
Vikram S. Adve
b9c05cf65b
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.
llvm-svn: 3170
2002-07-30 22:05:22 +00:00
Chris Lattner
57c110ce62
Declare that these passes only depend on the CFG of the function
...
llvm-svn: 3157
2002-07-30 16:27:52 +00:00
Chris Lattner
b202b77aab
* Eliminate the Provided set. All Passes now finally just automatically
...
provide themselves.
llvm-svn: 3124
2002-07-29 21:03:33 +00:00
Chris Lattner
ec2780457d
* 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.
llvm-svn: 3116
2002-07-27 01:12:17 +00:00
Chris Lattner
3f47f1065b
* 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.
llvm-svn: 3115
2002-07-27 01:12:15 +00:00
Chris Lattner
7a9eb848cd
* 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
b934722f1b
* 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: 3112
2002-07-26 21:12:44 +00:00
Chris Lattner
ec1a192b16
*** empty log message ***
...
llvm-svn: 3105
2002-07-26 18:40:14 +00:00
Chris Lattner
d84989b112
*** empty log message ***
...
llvm-svn: 3097
2002-07-25 19:59:41 +00:00
Chris Lattner
2d2b8b4aee
GCC 3.1 changes
...
llvm-svn: 3071
2002-07-24 22:40:36 +00:00
Chris Lattner
57095bb78c
*** empty log message ***
...
llvm-svn: 3069
2002-07-24 22:33:53 +00:00
Chris Lattner
f155fe7c7b
Changes for GCC 3.1
...
llvm-svn: 3068
2002-07-24 22:33:50 +00:00
Chris Lattner
24bcbdd155
*** empty log message ***
...
llvm-svn: 3002
2002-07-23 17:52:38 +00:00
Chris Lattner
6dfc54dacc
Convert over to new style makefile where libraries by default build .o files
...
unless they specify BUILD_ARCHIVE to also build a .a file.
llvm-svn: 3001
2002-07-23 17:52:24 +00:00
Chris Lattner
748999282f
Always create a shadow node for a store instruction, even if it's storing
...
a scalar value. Likewise for load instructions.
llvm-svn: 2990
2002-07-22 16:35:53 +00:00
Chris Lattner
99ad379582
*** empty log message ***
...
llvm-svn: 2985
2002-07-22 02:10:13 +00:00
Chris Lattner
0a387c1fc3
Convert Command Line option handling code to use the CommandLine 2.0 interface
...
llvm-svn: 2983
2002-07-22 02:08:59 +00:00
Chris Lattner
b646346214
Print the contents, not the pointer...
...
llvm-svn: 2981
2002-07-22 02:06:50 +00:00
Chris Lattner
01d2b4702f
Ignore some common varargs functions.
...
llvm-svn: 2973
2002-07-19 18:11:43 +00:00
Chris Lattner
5bda0e50a5
* Inline CopyFunctionCallsList
...
* Don't clone OrigCallList
* Rename removeDeadNodes -> removeTriviallyDeadNodes
* Implement new removeDeadNodes method
llvm-svn: 2970
2002-07-18 18:22:40 +00:00
Chris Lattner
556ab513cc
Rename removeDeadNodes to removeTriviallyDeadNodes
...
llvm-svn: 2969
2002-07-18 18:19:09 +00:00
Vikram S. Adve
9841c396cf
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.
llvm-svn: 2966
2002-07-18 16:13:52 +00:00
Vikram S. Adve
a6647796e3
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.
llvm-svn: 2965
2002-07-18 16:12:08 +00:00
Chris Lattner
da58a2a5ed
Implement cast nodes correctly.
...
llvm-svn: 2964
2002-07-18 15:54:42 +00:00
Chris Lattner
c6bae5e19e
* s/method/function
...
llvm-svn: 2958
2002-07-18 04:43:16 +00:00
Chris Lattner
1cdccbde31
The graph is more accurate when I don't completely ignore the return value.
...
llvm-svn: 2952
2002-07-18 01:58:24 +00:00
Chris Lattner
9c49e62315
Lots of bug fixes, add BottomUpClosure, which has bugs, but is a start.
...
llvm-svn: 2945
2002-07-18 00:12:30 +00:00
Anand Shukla
1c8b99ff5a
added std:: to string
...
llvm-svn: 2915
2002-07-16 00:03:10 +00:00
Chris Lattner
f528333ecf
* 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
llvm-svn: 2880
2002-07-11 20:33:32 +00:00
Chris Lattner
61d394e66f
* Nodes now keep track of any global variables in them
...
llvm-svn: 2879
2002-07-11 20:32:22 +00:00
Chris Lattner
809bd75ead
* 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.
llvm-svn: 2878
2002-07-11 20:32:02 +00:00
Chris Lattner
5d62e136c5
New implementation of data structure analysis. Only local analysis has been
...
implemented so far.
llvm-svn: 2871
2002-07-10 22:38:08 +00:00
Chris Lattner
d00a93318e
Reimplement data structure analysis
...
llvm-svn: 2868
2002-07-10 22:36:26 +00:00
Vikram S. Adve
daf9b38ed9
A single MachineInstr operand may now be both a def and a use.
...
llvm-svn: 2825
2002-07-08 22:56:34 +00:00
Chris Lattner
c645efd64c
Fix anand's last checkin
...
llvm-svn: 2804
2002-06-30 16:01:15 +00:00
Anand Shukla
3ab9ffd5b1
changes to make it compatible with 64bit gcc
...
llvm-svn: 2795
2002-06-25 21:18:19 +00:00
Anand Shukla
af8556bf5b
changes to make it compatible with 64bit gcc
...
llvm-svn: 2789
2002-06-25 20:35:19 +00:00
Anand Shukla
819239b667
minor change in removing endl
...
llvm-svn: 2788
2002-06-25 20:34:54 +00:00
Chris Lattner
dfd421a7df
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
cee706572b
*** empty log message ***
...
llvm-svn: 2777
2002-06-25 16:12:52 +00:00
Chris Lattner
27a93b1e90
*** empty log message ***
...
llvm-svn: 2755
2002-06-03 22:10:52 +00:00
Chris Lattner
7d0544f0cc
Move debug options out of header files so that the header does not have
...
to #include CommandLine.h.
llvm-svn: 2712
2002-05-22 17:08:27 +00:00
Chris Lattner
5907666379
Move the DEBUG_LV option out of the public header file into a private header.
...
llvm-svn: 2711
2002-05-22 17:07:26 +00:00
Chris Lattner
1752fa9899
Hide debugging options
...
llvm-svn: 2676
2002-05-20 21:39:10 +00:00
Chris Lattner
2735171cf5
Add method to check to see if two _Instructions_ dominate each other
...
llvm-svn: 2616
2002-05-13 22:03:16 +00:00
Chris Lattner
a39fc03021
Print out post dominance data structures more nicely
...
llvm-svn: 2562
2002-05-08 23:11:08 +00:00
Chris Lattner
f7806b0212
Move UnifyFunctionExitNodes to Utils library: final resting place this time
...
llvm-svn: 2531
2002-05-07 19:18:48 +00:00
Chris Lattner
9e1c79995e
Updates to move some header files out of include/llvm/Transforms into
...
the Scalar and Utils subdirectories
llvm-svn: 2523
2002-05-07 18:36:35 +00:00
Chris Lattner
44c4a3f18f
Mark analyses that only depend on the CFG of a function
...
llvm-svn: 2507
2002-05-06 19:32:07 +00:00
Chris Lattner
47fb300c56
Add #include removed from ConstantHandling.h
...
llvm-svn: 2496
2002-05-06 17:53:10 +00:00
Chris Lattner
fd8d5b852c
Replace all usages of Type::isPointerType with isa<PointerType>
...
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner
96e0c48175
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
321a8cf4ba
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
e20c7411d3
Simplify and update code a bit
...
llvm-svn: 2376
2002-04-28 19:20:10 +00:00
Chris Lattner
07fe96ca98
Eliminate the cfg namespace, moving LoopInfo, Dominators, Interval* classes
...
to the global namespace
llvm-svn: 2370
2002-04-28 16:21:30 +00:00
Chris Lattner
d7e179b25f
Module's are no longer Value subclasses
...
llvm-svn: 2351
2002-04-28 04:50:00 +00:00
Chris Lattner
e6d056f520
Fix signed/unsigned comparison warning
...
llvm-svn: 2350
2002-04-28 04:49:43 +00:00
Chris Lattner
741453dd60
Change the Dominator info and LoopInfo classes to keep track of BasicBlock's, not
...
const BasicBlocks
llvm-svn: 2337
2002-04-28 00:15:57 +00:00
Chris Lattner
2f0ee1833d
s/Method/Function
...
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
536cf1b13f
* 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
3f7a62a960
Add support for tracking array allocations
...
llvm-svn: 2328
2002-04-27 02:28:41 +00:00
Chris Lattner
4e52f71340
Allow the inline limit to be modified on the commandline for debugging
...
llvm-svn: 2327
2002-04-27 02:27:48 +00:00
Chris Lattner
078d292f4c
Change Constant::getNullConstant to Constant::getNullValue
...
llvm-svn: 2323
2002-04-27 02:25:14 +00:00
Chris Lattner
e935ad94d0
Just use << isntead of forcing getStrValue
...
llvm-svn: 2294
2002-04-18 18:14:40 +00:00
Chris Lattner
bde9202648
Print argument scalars as ellipses instead of boxes
...
llvm-svn: 2293
2002-04-18 18:14:19 +00:00
Chris Lattner
a4add093c6
Inline indirect function calls that are only capable of calling one function
...
llvm-svn: 2275
2002-04-17 03:42:51 +00:00
Chris Lattner
59927296e4
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
llvm-svn: 2274
2002-04-17 03:24:59 +00:00
Chris Lattner
0cda7182ba
* 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
llvm-svn: 2266
2002-04-16 20:39:59 +00:00
Chris Lattner
11f9ff83ec
* 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.
llvm-svn: 2257
2002-04-16 03:44:03 +00:00
Chris Lattner
866bf47eff
Print out what the root of the call graph is.
...
llvm-svn: 2223
2002-04-10 20:31:44 +00:00
Chris Lattner
5e12c7caf5
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
b2038512b2
Add explicit #includes of Function.h to make up for the removed #include
...
in iOther.h
llvm-svn: 2209
2002-04-09 19:08:28 +00:00
Chris Lattner
7ae20d642d
Add #includes to make up for #includes pruned out of header files.
...
llvm-svn: 2207
2002-04-09 18:37:46 +00:00
Chris Lattner
0a8a112014
Don't leak all of the Loop objects created...
...
llvm-svn: 2196
2002-04-09 05:43:19 +00:00
Chris Lattner
5f86cf1a1c
* General cleanups
...
* In calcLiveVarSetsForBB, do not leak a ValueSet every time the function
is called!
llvm-svn: 2189
2002-04-09 05:14:14 +00:00
Chris Lattner
c8166cec07
s/Method/Function
...
llvm-svn: 2180
2002-04-08 22:03:57 +00:00
Chris Lattner
56e96eb88f
isLabelType is obsolete
...
llvm-svn: 2175
2002-04-08 21:59:08 +00:00
Chris Lattner
0962b63d7c
Play around with #includes
...
llvm-svn: 2174
2002-04-08 21:58:53 +00:00
Chris Lattner
49808e463c
Add #includes that were pruned from already #included files
...
llvm-svn: 2173
2002-04-08 21:56:50 +00:00
Chris Lattner
44f14449c4
ConstantHandling moved into VMCore library
...
llvm-svn: 2165
2002-04-08 20:18:09 +00:00
Chris Lattner
bc15ae64dd
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.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
5cbfde5744
Call nodes are never equivalent
...
Shadow nodes are never critical.
llvm-svn: 2102
2002-04-04 19:21:51 +00:00
Chris Lattner
d4c7ce8d78
Add hack to get timing of analysis
...
llvm-svn: 2101
2002-04-04 19:21:27 +00:00
Chris Lattner
3b604e846a
* Eliminate commented out code
...
* Do not demand a shadow node when resolving
* Raise arbitrary inline limit
llvm-svn: 2100
2002-04-04 19:21:06 +00:00
Chris Lattner
19689af3bb
Support resolving function arguments/return values to pointers that index
...
into other objects.
llvm-svn: 2094
2002-04-01 22:20:48 +00:00
Chris Lattner
62756e4208
Avoid incorrectly adding null values to the scalar map!
...
llvm-svn: 2085
2002-04-01 00:45:09 +00:00
Chris Lattner
e66e651b68
Critical shadow nodes no do not know their parent explictly.
...
llvm-svn: 2084
2002-04-01 00:15:30 +00:00
Chris Lattner
61f6065cef
Minor cleanups (use dyn_cast instead of testing manually)
...
Shadow nodes now don't explicitly know their parent.
llvm-svn: 2083
2002-04-01 00:14:41 +00:00
Chris Lattner
a68c92a3d4
Allow merging of identical call nodes. Make the shadow node pointed to
...
by the call node noncritical before the call is destroyed.
llvm-svn: 2082
2002-04-01 00:13:56 +00:00
Chris Lattner
f9097b54be
Increase limit for perimeter
...
llvm-svn: 2081
2002-04-01 00:12:58 +00:00
Chris Lattner
42145d8a25
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.
llvm-svn: 2079
2002-03-31 19:57:44 +00:00
Chris Lattner
8528806b33
* Move the isEquivalentTo implementations here. They can probably be put
...
someplace nicer in the file though.
* Add new dump method for debugging
llvm-svn: 2064
2002-03-31 07:16:08 +00:00
Chris Lattner
d2c39a02f7
Print out the instruction instead of just the address!
...
llvm-svn: 2063
2002-03-31 07:15:20 +00:00
Chris Lattner
aba1ef6fc9
* 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
llvm-svn: 2062
2002-03-31 07:14:52 +00:00
Chris Lattner
f1a2a9c168
* 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!
llvm-svn: 2061
2002-03-31 07:13:27 +00:00
Chris Lattner
5df9c977e1
s/Method/Function
...
llvm-svn: 2043
2002-03-29 17:08:29 +00:00
Chris Lattner
cab0ce8244
Implement getEscapingAllocations & getNonEscapingAllocations
...
llvm-svn: 2021
2002-03-28 19:33:00 +00:00
Chris Lattner
513ecd7256
* Rename UnlinkUndistinguishableShadowNodes & RemoveUnreachableShadowNodes
...
to reflect that they can eliminate arbitrary nodes.
* Rename the ShadowNodeEliminate.cpp file to EliminateNodes.cpp for the
same reason
llvm-svn: 2020
2002-03-28 19:16:48 +00:00
Chris Lattner
fa67ad938c
Ooops, I did such a great job pruning nodes, that I accidentally deleted
...
ALL allocation nodes... hrm... bad.
llvm-svn: 2018
2002-03-28 18:38:38 +00:00
Chris Lattner
55186e7abf
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
llvm-svn: 2010
2002-03-28 17:56:03 +00:00
Chris Lattner
d771725ed1
* 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.
llvm-svn: 2004
2002-03-27 19:48:03 +00:00
Chris Lattner
4c6e9cda3f
* Implement DSNode::removeAllIncomingEdges
...
* Implement Critical Shadow node handling
* Implement routines to determine whether an allocation node is a malloc
or alloca
llvm-svn: 2003
2002-03-27 19:46:05 +00:00
Chris Lattner
a16c85b43d
* Add critical node support
...
* Optimize graph after building it. This should be unneccesary in the future
llvm-svn: 2002
2002-03-27 19:45:12 +00:00
Chris Lattner
9aff5a8047
* Destroy alloca nodes when a graph gets inlined
...
* Add links to all subtrees when a shadow node gets resolved
* Add critical node handling
llvm-svn: 2001
2002-03-27 19:44:33 +00:00
Chris Lattner
2a3d6c83ff
* Optimizers return true on change
...
* Implement indistinguishable shadow node elimination
llvm-svn: 1999
2002-03-27 00:55:13 +00:00
Chris Lattner
ae0192e2f6
Fix long line
...
llvm-svn: 1998
2002-03-27 00:54:31 +00:00
Chris Lattner
8a44f81684
* Because of optimization, the shadow nodes between arguments might get
...
removed. Check to see if they are there.
* Repeat optimizations while changing
llvm-svn: 1997
2002-03-27 00:53:57 +00:00
Chris Lattner
d5b115e687
Initial checkin of Datastructure analysis.
...
Has bugs, but shouldn't crash in theory.
llvm-svn: 1994
2002-03-26 22:39:06 +00:00
Chris Lattner
57efd6ffd1
change refs to Method to Function
...
Change references to MEthodArgument to FunctionArgument
llvm-svn: 1989
2002-03-26 17:55:33 +00:00
Chris Lattner
c481e92886
Rename Method to Function
...
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Vikram S. Adve
92fb8b1f9c
Fixed several problems with handling arguments to Phis.
...
llvm-svn: 1910
2002-03-18 03:47:26 +00:00