diff options
| author | Philip Reames <listmail@philipreames.com> | 2016-05-06 01:13:58 +0000 |
|---|---|---|
| committer | Philip Reames <listmail@philipreames.com> | 2016-05-06 01:13:58 +0000 |
| commit | 32b55181fa05199afa543065b30fb54480098368 (patch) | |
| tree | 0f72af90942050524a26f8b96b7640d64d78247b /llvm/lib | |
| parent | 16547c4e315232b9b8b725652a28ce027777936b (diff) | |
| download | bcm5719-llvm-32b55181fa05199afa543065b30fb54480098368.tar.gz bcm5719-llvm-32b55181fa05199afa543065b30fb54480098368.zip | |
[EarlyCSE] Rename a variable for clarity [NFC]
llvm-svn: 268701
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/EarlyCSE.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp index 2e00d676f15..1df99d9ab38 100644 --- a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp +++ b/llvm/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<BumpPtrAllocator, @@ -613,16 +613,16 @@ bool EarlyCSE::processNode(DomTreeNode *Node) { // If we have an available version of this load, and if it is the right // generation, replace this instruction. LoadValue InVal = AvailableLoads.lookup(MemInst.getPointerOperand()); - if (InVal.Inst != nullptr && InVal.Generation == CurrentGeneration && + if (InVal.DefInst != nullptr && InVal.Generation == CurrentGeneration && InVal.MatchingId == MemInst.getMatchingId() && // We don't yet handle removing loads with ordering of any kind. !MemInst.isVolatile() && MemInst.isUnordered() && // We can't replace an atomic load with one which isn't also atomic. InVal.IsAtomic >= 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. |

