diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp index 69112f3cee2..469930ca6a1 100644 --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -834,7 +834,7 @@ static bool handleEndBlock(BasicBlock &BB, AliasAnalysis *AA, continue; } - if (auto CS = CallSite(&*BBI)) { + if (auto *Call = dyn_cast<CallBase>(&*BBI)) { // Remove allocation function calls from the list of dead stack objects; // there can't be any references before the definition. if (isAllocLikeFn(&*BBI, TLI)) @@ -842,15 +842,15 @@ static bool handleEndBlock(BasicBlock &BB, AliasAnalysis *AA, // If this call does not access memory, it can't be loading any of our // pointers. - if (AA->doesNotAccessMemory(CS)) + if (AA->doesNotAccessMemory(Call)) continue; // If the call might load from any of our allocas, then any store above // the call is live. DeadStackObjects.remove_if([&](Value *I) { // See if the call site touches the value. - return isRefSet(AA->getModRefInfo(CS, I, getPointerSize(I, DL, *TLI, - BB.getParent()))); + return isRefSet(AA->getModRefInfo( + Call, I, getPointerSize(I, DL, *TLI, BB.getParent()))); }); // If all of the allocas were clobbered by the call then we're not going |