Commit Graph

135 Commits

Author SHA1 Message Date
Chris Lattner
f1ac9f6a7f Allow comparison against null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3009 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 17:59:02 +00:00
Chris Lattner
2dfbe3a751 Rename removeDeadNodes to removeTriviallyDeadNodes
Add new removeDeadNodes method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2968 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 18:18:40 +00:00
Chris Lattner
a990291462 Simplify saveOrigFunctionCalls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2967 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 16:23:02 +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
b195911eab * s/method/function
* BIG CHANGE: The root of the call "graph" is considered to be the external
  node, not the "Root".  This means that users using graph iterators like
  df_begin() will start from the external node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 04:42:35 +00:00
Chris Lattner
84428e1892 First cut at implementing bottom up analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2944 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 00:11:28 +00:00
Chris Lattner
1dc15b7997 * Nodes now keep track of any global variables contained within them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2877 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-11 20:30:18 +00:00
Chris Lattner
cd0b36fb07 New implementation of data structure analysis
This diff is completely meaningless because this is a replacement
implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2872 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 22:42:17 +00:00
Anand Shukla
4a9f933751 changes to make it compatible with 64bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2786 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 20:22:25 +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
a51b767df4 Allow const bb's to be checked for containment in a loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2754 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-03 22:10:48 +00:00
Chris Lattner
e87adaac31 Avoid #including CommandLine.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2710 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:06:56 +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
a7980c0a08 Fix misspelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2548 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 22:12:36 +00:00
Chris Lattner
f3e3247429 Remove analysis namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2399 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 18:12:52 +00:00
Chris Lattner
96c466b06a Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2395 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 14:57:45 +00:00
Chris Lattner
8fc2f2072d Remove all contents of the cfg namespace to the global namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2369 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 16:19:42 +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
12be9749d6 Support array allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2326 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 02:27:11 +00:00
Chris Lattner
a146183c21 Make data structure acurately get ALL edges, even loads of null fields of
nodes that are not shadow nodes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2273 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-17 03:24:47 +00:00
Chris Lattner
28c238636e Remove the concept of a critical shadow node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2265 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 20:39:23 +00:00
Chris Lattner
da022cd143 * Eliminate ArgDSNode's completely, rely now on Scalar map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2256 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-16 03:41:22 +00:00
Chris Lattner
dd4144a587 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2246 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-14 06:14:15 +00:00
Chris Lattner
e06e9146ee 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@2217 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 19:59:31 +00:00
Chris Lattner
184b2fa1b9 Use opaque decl instead of #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2203 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 18:35:38 +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
8d3b30ab3c Trim #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2169 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:52:32 +00:00
Chris Lattner
b579400cd7 * Move include/llvm/Analysis/SlotCalculator.h to include/llvm/SlotCalculator.h
because the slot calculator is already part of the VMCore library.
* Rename incorporateMethod and purgeMethod to *Function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2154 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 22:49:37 +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
1e10c7c278 Add method to get # nodes in the graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2098 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:20:00 +00:00
Chris Lattner
aedcb72805 Shadow nodes don't need to know their explicit parent, they just need to
know what type to be.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2080 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-01 00:12:36 +00:00
Chris Lattner
41deedf32f * Allow access to DSNode iterator as DSNode::iterator/begin/end
* Add debugging "dump" method to DSNode
* Fix bugs in DSNode iterator


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2060 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-31 07:11:20 +00:00
Chris Lattner
f9957c2960 Initial checkin of file:
Define an iterator to operate over data structure outgoing links and
graph implementation so generic graph functions can be used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2057 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-30 09:13:23 +00:00
Chris Lattner
9a691dbc82 Add accessors and a method to get all the outgoing links for ALL nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2055 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-30 09:07:51 +00:00
Chris Lattner
5cddb2f0f8 Add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2054 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-30 04:02:41 +00:00
Chris Lattner
8aaa6e0f86 Add a hook to allow the datastructure to keep naturally up to date, even
though it's not entirely fleshed out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2051 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 21:23:29 +00:00
Chris Lattner
49a4b220eb Expose more information to clients
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2027 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 03:35:30 +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
d38cadb13d * Remove RemoveUnreachableShadowNodes & UnlinkUndistinguishableShadowNodes
to reflect the fact that they actually operate on arbitrary nodes
* Clean up public interface of FunctionDSGraph
* add getEscapingAllocations & getNonEscapingAllocations


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2019 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 19:15:38 +00:00
Chris Lattner
1d8ec6194a * Define some operators on PointerVal and PVS's
* Nodes can determine whether they are foldable with another node
* Rename NewDSNode to AllocDSNode
* The Function graph breaks up all of the node types into individual
  vectors to alloc fast access when you are looking for a particular type
  of node.  Simplifies much code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2009 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 17:48:41 +00:00
Chris Lattner
b3ebdadb2c * Add a nice utility method to DSNode
* Export interface to tell whether an alloc node represent a malloc or alloca
* Add the concept of a "critical" shadow node


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2000 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 19:41:45 +00:00
Chris Lattner
26f8a40b51 Allow isa<DSNode>(..)
Simplification routines return true on change


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1996 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-27 00:52:57 +00:00
Chris Lattner
d9ddf05014 New header file for datastructure analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1993 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 22:38:45 +00:00
Chris Lattner
0fc0c1d3e1 Change uses of Method to Function
Change uses of methodArgument to FunctionArgument


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1988 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 17:49:55 +00:00
Chris Lattner
b277d1d0e0 Remove unneccesary forward declarations for classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1987 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 17:49:00 +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
06fa17c1c2 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@1917 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-19 00:59:08 +00:00