[llvm] r358334 - [Mem2Reg] Delete unused AllocaPointerVal
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 13 08:41:42 PDT 2019
Author: maskray
Date: Sat Apr 13 08:41:42 2019
New Revision: 358334
URL: http://llvm.org/viewvc/llvm-project?rev=358334&view=rev
Log:
[Mem2Reg] Delete unused AllocaPointerVal
It is no longer used after the AliasSetTracker updating logic was removed.
Modified:
llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Modified: llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp?rev=358334&r1=358333&r2=358334&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Sat Apr 13 08:41:42 2019
@@ -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) {
More information about the llvm-commits
mailing list