[llvm] r285002 - CodeGen: Do not add a global's address space to the folding set profile.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 11:56:10 PDT 2016


Author: pcc
Date: Mon Oct 24 13:56:09 2016
New Revision: 285002

URL: http://llvm.org/viewvc/llvm-project?rev=285002&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=285002&r1=285001&r2=285002&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Oct 24 13:56:09 2016
@@ -403,7 +403,6 @@ static void AddNodeIDCustom(FoldingSetNo
     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(c
   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);




More information about the llvm-commits mailing list