mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[NFC] Rename map to make the naming consistent
llvm-svn: 341043
This commit is contained in:
parent
38e0dbcb65
commit
b83b70f6e9
@ -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.
|
||||
|
@ -27,7 +27,7 @@ const Instruction *InstructionPrecedenceTracking::getFirstSpecialInstruction(
|
||||
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::isPreceededBySpecialInstruction(
|
||||
}
|
||||
|
||||
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(const BasicBlock *BB) {
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user