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 | 46b08cdc7cd54d04281f58ee5b6b32082d778b20 (patch) | |
tree | 31993d54109973991bf146d21503c2ba4aa7d623 /llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp | |
parent | 8f008c82b7884e35325e72878e869fb522944985 (diff) | |
download | bcm5719-llvm-46b08cdc7cd54d04281f58ee5b6b32082d778b20.tar.gz bcm5719-llvm-46b08cdc7cd54d04281f58ee5b6b32082d778b20.zip |
* 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
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp b/llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp index eda16bc6949..2afede5dfa0 100644 --- a/llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp +++ b/llvm/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(); } } - |