diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-21 13:51:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-21 13:51:30 +0000 |
commit | 32438d8c84233c82c7467f01b4b90c1cc641cf7e (patch) | |
tree | 5fea75f630dec4df73b846d554d73a6cdde5914c | |
parent | 800b7e33df5a82a1f350bf9942253e11369c35fa (diff) | |
download | bcm5719-llvm-32438d8c84233c82c7467f01b4b90c1cc641cf7e.tar.gz bcm5719-llvm-32438d8c84233c82c7467f01b4b90c1cc641cf7e.zip |
Don't create a new node for every reference to a global. This caused a huge
node explosion that doesn't help anything at all. In previous versions of
the representation this DID help, but not anymore.
llvm-svn: 4249
-rw-r--r-- | llvm/lib/Analysis/DataStructure/Local.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index 0e17d7232fd..210bbec023d 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/lib/Analysis/DataStructure/Local.cpp @@ -186,12 +186,9 @@ DSNodeHandle &GraphBuilder::getGlobalNode(GlobalValue &V) { // DSNodeHandle GraphBuilder::getValueNode(Value &V) { assert(isPointerType(V.getType()) && "Should only use pointer scalars!"); - // Do not share the pointer value to globals... this would cause way too much - // false merging. - // + DSNodeHandle &NH = ValueMap[&V]; - if (!isa<GlobalValue>(V) && NH.getNode()) - return NH; // Already have a node? Just return it... + if (NH.getNode()) return NH; // Already have a node? Just return it... // Otherwise we need to create a new scalar node... DSNode *N = createNode(DSNode::ScalarNode, V.getType()); |