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