From 5ddf7856a5d96bccea45ccc9b85c2fb27a2c853b Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 13 Apr 2019 15:41:42 +0000 Subject: [PATCH] [Mem2Reg] Delete unused AllocaPointerVal 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 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index b0fb427c40e..74019c5d302 100644 --- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -113,7 +113,6 @@ struct AllocaInfo { BasicBlock *OnlyBlock; bool OnlyUsedInOneBlock; - Value *AllocaPointerVal; TinyPtrVector 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(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(User); // Otherwise it must be a load instruction, keep track of variable // reads. UsingBlocks.push_back(LI->getParent()); - AllocaPointerVal = LI; } if (OnlyUsedInOneBlock) { -- 2.50.1