[llvm] aa6dc8e - [ScalarEvolution] Fix unused variable warnings. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 25 13:28:17 PST 2023
Author: Simon Pilgrim
Date: 2023-02-25T21:27:57Z
New Revision: aa6dc8ec4775874fc1e86fca9c971fd544e52639
URL: https://github.com/llvm/llvm-project/commit/aa6dc8ec4775874fc1e86fca9c971fd544e52639
DIFF: https://github.com/llvm/llvm-project/commit/aa6dc8ec4775874fc1e86fca9c971fd544e52639.diff
LOG: [ScalarEvolution] Fix unused variable warnings. NFC.
Replace dyn_cast<> with isa<> as we don't actually need the variable
Added:
Modified:
llvm/lib/Analysis/ScalarEvolution.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 93c9349b06b82..96cc518e6039b 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -7428,9 +7428,9 @@ ScalarEvolution::getOperandsToCreate(Value *V, SmallVectorImpl<Value *> &Ops) {
return getUnknown(PoisonValue::get(V->getType()));
} else if (ConstantInt *CI = dyn_cast<ConstantInt>(V))
return getConstant(CI);
- else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) {
+ else if (isa<GlobalAlias>(V))
return getUnknown(V);
- } else if (!isa<ConstantExpr>(V))
+ else if (!isa<ConstantExpr>(V))
return getUnknown(V);
Operator *U = cast<Operator>(V);
@@ -7614,7 +7614,7 @@ const SCEV *ScalarEvolution::createSCEV(Value *V) {
return getUnknown(PoisonValue::get(V->getType()));
} else if (ConstantInt *CI = dyn_cast<ConstantInt>(V))
return getConstant(CI);
- else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V))
+ else if (isa<GlobalAlias>(V))
return getUnknown(V);
else if (!isa<ConstantExpr>(V))
return getUnknown(V);
More information about the llvm-commits
mailing list