From: Philip Reames Date: Fri, 6 May 2016 01:13:58 +0000 (+0000) Subject: [EarlyCSE] Rename a variable for clarity [NFC] X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2a9448a0b8c80097af430dc7c27b035e4a220bf;p=llvm [EarlyCSE] Rename a variable for clarity [NFC] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268701 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/EarlyCSE.cpp b/lib/Transforms/Scalar/EarlyCSE.cpp index 2e00d676f15..1df99d9ab38 100644 --- a/lib/Transforms/Scalar/EarlyCSE.cpp +++ b/lib/Transforms/Scalar/EarlyCSE.cpp @@ -279,15 +279,15 @@ public: /// present the table; it is the responsibility of the consumer to inspect /// the atomicity/volatility if needed. struct LoadValue { - Instruction *Inst; + Instruction *DefInst; unsigned Generation; int MatchingId; bool IsAtomic; LoadValue() - : Inst(nullptr), Generation(0), MatchingId(-1), IsAtomic(false) {} + : DefInst(nullptr), Generation(0), MatchingId(-1), IsAtomic(false) {} LoadValue(Instruction *Inst, unsigned Generation, unsigned MatchingId, bool IsAtomic) - : Inst(Inst), Generation(Generation), MatchingId(MatchingId), + : DefInst(Inst), Generation(Generation), MatchingId(MatchingId), IsAtomic(IsAtomic) {} }; typedef RecyclingAllocator= MemInst.isAtomic()) { - Value *Op = getOrCreateResult(InVal.Inst, Inst->getType()); + Value *Op = getOrCreateResult(InVal.DefInst, Inst->getType()); if (Op != nullptr) { DEBUG(dbgs() << "EarlyCSE CSE LOAD: " << *Inst - << " to: " << *InVal.Inst << '\n'); + << " to: " << *InVal.DefInst << '\n'); if (!Inst->use_empty()) Inst->replaceAllUsesWith(Op); Inst->eraseFromParent(); @@ -690,8 +690,8 @@ bool EarlyCSE::processNode(DomTreeNode *Node) { // the store originally was. if (MemInst.isValid() && MemInst.isStore()) { LoadValue InVal = AvailableLoads.lookup(MemInst.getPointerOperand()); - if (InVal.Inst && - InVal.Inst == getOrCreateResult(Inst, InVal.Inst->getType()) && + if (InVal.DefInst && + InVal.DefInst == getOrCreateResult(Inst, InVal.DefInst->getType()) && InVal.Generation == CurrentGeneration && InVal.MatchingId == MemInst.getMatchingId() && // We don't yet handle removing stores with ordering of any kind.