Commit Graph

466 Commits

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