mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-29 06:53:53 +00:00
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
This commit is contained in:
parent
9f6ddf9bdd
commit
8929f75913
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user