]> granicus.if.org Git - llvm/commitdiff
[Mem2Reg] Delete unused AllocaPointerVal
authorFangrui Song <maskray@google.com>
Sat, 13 Apr 2019 15:41:42 +0000 (15:41 +0000)
committerFangrui Song <maskray@google.com>
Sat, 13 Apr 2019 15:41:42 +0000 (15:41 +0000)
It is no longer used after the AliasSetTracker updating logic was removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358334 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/PromoteMemoryToRegister.cpp

index b0fb427c40e85e5b510ab956c70a112a368aad06..74019c5d302ad683c2c35d363326a23cf66dbe66 100644 (file)
@@ -113,7 +113,6 @@ struct AllocaInfo {
   BasicBlock *OnlyBlock;
   bool OnlyUsedInOneBlock;
 
-  Value *AllocaPointerVal;
   TinyPtrVector<DbgVariableIntrinsic *> DbgDeclares;
 
   void clear() {
@@ -122,7 +121,6 @@ struct AllocaInfo {
     OnlyStore = nullptr;
     OnlyBlock = nullptr;
     OnlyUsedInOneBlock = true;
-    AllocaPointerVal = nullptr;
     DbgDeclares.clear();
   }
 
@@ -140,14 +138,12 @@ struct AllocaInfo {
       if (StoreInst *SI = dyn_cast<StoreInst>(User)) {
         // Remember the basic blocks which define new values for the alloca
         DefiningBlocks.push_back(SI->getParent());
-        AllocaPointerVal = SI->getOperand(0);
         OnlyStore = SI;
       } else {
         LoadInst *LI = cast<LoadInst>(User);
         // Otherwise it must be a load instruction, keep track of variable
         // reads.
         UsingBlocks.push_back(LI->getParent());
-        AllocaPointerVal = LI;
       }
 
       if (OnlyUsedInOneBlock) {