[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 21 08:52:01 PDT 2002
Changes in directory llvm/lib/Analysis/DataStructure:
Local.cpp updated: 1.20 -> 1.21
---
Log message:
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.
---
Diffs of the changes:
Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.20 llvm/lib/Analysis/DataStructure/Local.cpp:1.21
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.20 Sun Oct 20 21:08:03 2002
+++ llvm/lib/Analysis/DataStructure/Local.cpp Mon Oct 21 08:51:30 2002
@@ -186,12 +186,9 @@
//
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());
More information about the llvm-commits
mailing list