Commit Graph

374 Commits

Author SHA1 Message Date
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
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