diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-16 03:44:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-16 03:44:03 +0000 |
commit | 212be2e56980bd778e0013d01ce82dcb5ed5d58d (patch) | |
tree | c91bb8ddf9ea529803723909d1d3bc73b68d246e /lib/Analysis/DataStructure/FunctionRepBuilder.cpp | |
parent | da022cd143a3694e7f8c2cdad827c4caf90d3b5f (diff) |
* 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/FunctionRepBuilder.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/FunctionRepBuilder.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/Analysis/DataStructure/FunctionRepBuilder.cpp b/lib/Analysis/DataStructure/FunctionRepBuilder.cpp index eda16bc694..2afede5dfa 100644 --- a/lib/Analysis/DataStructure/FunctionRepBuilder.cpp +++ b/lib/Analysis/DataStructure/FunctionRepBuilder.cpp @@ -147,19 +147,13 @@ void FunctionRepBuilder::initializeWorkList(Function *Func) { Value *Arg = (Value*)(*I); // Only process arguments that are of pointer type... if (PointerType *PT = dyn_cast<PointerType>(Arg->getType())) { - ArgDSNode *ArgNode = new ArgDSNode(*I); - ArgNodes.push_back(ArgNode); - - // Add a critical shadow value for it to represent what it is pointing - // to and add this to the value map... + // Add a shadow value for it to represent what it is pointing to and add + // this to the value map... ShadowDSNode *Shad = new ShadowDSNode(PT->getElementType(), Func->getParent(), true); ShadowNodes.push_back(Shad); ValueMap[Arg].add(PointerVal(Shad), Arg); - // The value of the argument is the shadow value... - ArgNode->getLink(0).add(Shad); - // Make sure that all users of the argument are processed... addAllUsesToWorkList(Arg); } @@ -332,7 +326,6 @@ void FunctionRepBuilder::visitPHINode(PHINode *PN) { // FunctionDSGraph::FunctionDSGraph(Function *F) : Func(F) { FunctionRepBuilder Builder(this); - ArgNodes = Builder.getArgNodes(); AllocNodes = Builder.getAllocNodes(); ShadowNodes = Builder.getShadowNodes(); GlobalNodes = Builder.getGlobalNodes(); @@ -351,4 +344,3 @@ FunctionDSGraph::FunctionDSGraph(Function *F) : Func(F) { Changed |= RemoveUnreachableNodes(); } } - |