[llvm] r311838 - [NewGVN] Use `auto` when the type is obvious NFCI.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 26 15:31:10 PDT 2017
Author: davide
Date: Sat Aug 26 15:31:10 2017
New Revision: 311838
URL: http://llvm.org/viewvc/llvm-project?rev=311838&view=rev
Log:
[NewGVN] Use `auto` when the type is obvious NFCI.
Modified:
llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp?rev=311838&r1=311837&r2=311838&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp Sat Aug 26 15:31:10 2017
@@ -1302,7 +1302,7 @@ NewGVN::performSymbolicLoadCoercion(Type
}
}
- } else if (LoadInst *DepLI = dyn_cast<LoadInst>(DepInst)) {
+ } else if (auto *DepLI = dyn_cast<LoadInst>(DepInst)) {
// Can't forward from non-atomic to atomic without violating memory model.
if (LI->isAtomic() > DepLI->isAtomic())
return nullptr;
@@ -1318,7 +1318,7 @@ NewGVN::performSymbolicLoadCoercion(Type
}
}
- } else if (MemIntrinsic *DepMI = dyn_cast<MemIntrinsic>(DepInst)) {
+ } else if (auto *DepMI = dyn_cast<MemIntrinsic>(DepInst)) {
int Offset = analyzeLoadFromClobberingMemInst(LoadType, LoadPtr, DepMI, DL);
if (Offset >= 0) {
if (auto *PossibleConstant =
More information about the llvm-commits
mailing list