[llvm] r357479 - [Transforms] Redundant getValueOperand (NFC)
Brian Gesiak via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 2 07:57:56 PDT 2019
Author: modocache
Date: Tue Apr 2 07:57:56 2019
New Revision: 357479
URL: http://llvm.org/viewvc/llvm-project?rev=357479&view=rev
Log:
[Transforms] Redundant getValueOperand (NFC)
`StoreInst::getValueOperand` is identical to `getOperand(0)`, so the call to
`getOperand(0)` can be replaced. Further, `SI->getValueOperand` is redundantly
called just a few lines down, despite its return value being stored in variable
`DV`. No functional change.
Modified:
llvm/trunk/lib/Transforms/Utils/Local.cpp
Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/Local.cpp?rev=357479&r1=357478&r2=357479&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/Local.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/Local.cpp Tue Apr 2 07:57:56 2019
@@ -1292,9 +1292,9 @@ void llvm::ConvertDebugDeclareToDebugVal
auto *DIVar = DII->getVariable();
assert(DIVar && "Missing variable");
auto *DIExpr = DII->getExpression();
- Value *DV = SI->getOperand(0);
+ Value *DV = SI->getValueOperand();
- if (!valueCoversEntireFragment(SI->getValueOperand()->getType(), DII)) {
+ if (!valueCoversEntireFragment(DV->getType(), DII)) {
// FIXME: If storing to a part of the variable described by the dbg.declare,
// then we want to insert a dbg.value for the corresponding fragment.
LLVM_DEBUG(dbgs() << "Failed to convert dbg.declare to dbg.value: "
More information about the llvm-commits
mailing list