[llvm] r341043 - [NFC] Rename map to make the naming consistent
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 30 02:24:33 PDT 2018
Author: mkazantsev
Date: Thu Aug 30 02:24:33 2018
New Revision: 341043
URL: http://llvm.org/viewvc/llvm-project?rev=341043&view=rev
Log:
[NFC] Rename map to make the naming consistent
Modified:
llvm/trunk/include/llvm/Analysis/InstructionPrecedenceTracking.h
llvm/trunk/lib/Analysis/InstructionPrecedenceTracking.cpp
Modified: llvm/trunk/include/llvm/Analysis/InstructionPrecedenceTracking.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/InstructionPrecedenceTracking.h?rev=341043&r1=341042&r2=341043&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/InstructionPrecedenceTracking.h (original)
+++ llvm/trunk/include/llvm/Analysis/InstructionPrecedenceTracking.h Thu Aug 30 02:24:33 2018
@@ -28,8 +28,7 @@ namespace llvm {
class InstructionPrecedenceTracking {
// Maps a block to the topmost special instruction in it.
- DenseMap<const BasicBlock *, const Instruction *>
- FirstImplicitControlFlowInsts;
+ DenseMap<const BasicBlock *, const Instruction *> FirstSpecialInsts;
// Allows to answer queries about precedence of instructions within one block.
OrderedInstructions OI;
// Blocks for which we have the up-to-date cached information.
Modified: llvm/trunk/lib/Analysis/InstructionPrecedenceTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionPrecedenceTracking.cpp?rev=341043&r1=341042&r2=341043&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionPrecedenceTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionPrecedenceTracking.cpp Thu Aug 30 02:24:33 2018
@@ -27,7 +27,7 @@ const Instruction *InstructionPrecedence
const BasicBlock *BB) {
if (!KnownBlocks.count(BB))
fill(BB);
- auto *FirstICF = FirstImplicitControlFlowInsts.lookup(BB);
+ auto *FirstICF = FirstSpecialInsts.lookup(BB);
assert((!FirstICF || FirstICF->getParent() == BB) && "Inconsistent cache!");
return FirstICF;
}
@@ -45,10 +45,10 @@ bool InstructionPrecedenceTracking::isPr
}
void InstructionPrecedenceTracking::fill(const BasicBlock *BB) {
- FirstImplicitControlFlowInsts.erase(BB);
+ FirstSpecialInsts.erase(BB);
for (auto &I : *BB)
if (isSpecialInstruction(&I)) {
- FirstImplicitControlFlowInsts[BB] = &I;
+ FirstSpecialInsts[BB] = &I;
break;
}
@@ -58,14 +58,14 @@ void InstructionPrecedenceTracking::fill
void InstructionPrecedenceTracking::invalidateBlock(const BasicBlock *BB) {
OI.invalidateBlock(BB);
- FirstImplicitControlFlowInsts.erase(BB);
+ FirstSpecialInsts.erase(BB);
KnownBlocks.erase(BB);
}
void InstructionPrecedenceTracking::clear() {
- for (auto It : FirstImplicitControlFlowInsts)
+ for (auto It : FirstSpecialInsts)
OI.invalidateBlock(It.first);
- FirstImplicitControlFlowInsts.clear();
+ FirstSpecialInsts.clear();
KnownBlocks.clear();
}
More information about the llvm-commits
mailing list