From 448f4949dc686d22feb81281560f1c43bca15639 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 21 Oct 2002 13:51:30 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4249 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/Local.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 0e17d7232fd..210bbec023d 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/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(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());