From 7fbfd5919b0a70f16ae77b4a222b738e1c9a8ad5 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Mon, 24 Oct 2016 18:56:09 +0000 Subject: [PATCH] CodeGen: Do not add a global's address space to the folding set profile. It is already part of the type (which is part of the global, which is already being added), so there's no need to do it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285002 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index efb357a07c0..aaced6cab6b 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -403,7 +403,6 @@ static void AddNodeIDCustom(FoldingSetNodeID &ID, const SDNode *N) { ID.AddPointer(GA->getGlobal()); ID.AddInteger(GA->getOffset()); ID.AddInteger(GA->getTargetFlags()); - ID.AddInteger(GA->getAddressSpace()); break; } case ISD::BasicBlock: @@ -1262,7 +1261,6 @@ SDValue SelectionDAG::getGlobalAddress(const GlobalValue *GV, const SDLoc &DL, ID.AddPointer(GV); ID.AddInteger(Offset); ID.AddInteger(TargetFlags); - ID.AddInteger(GV->getType()->getAddressSpace()); void *IP = nullptr; if (SDNode *E = FindNodeOrInsertPos(ID, DL, IP)) return SDValue(E, 0); -- 2.50.0