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 {
|
class InstructionPrecedenceTracking {
|
||||||
// Maps a block to the topmost special instruction in it.
|
// Maps a block to the topmost special instruction in it.
|
||||||
DenseMap<const BasicBlock *, const Instruction *>
|
DenseMap<const BasicBlock *, const Instruction *> FirstSpecialInsts;
|
||||||
FirstImplicitControlFlowInsts;
|
|
||||||
// Allows to answer queries about precedence of instructions within one block.
|
// Allows to answer queries about precedence of instructions within one block.
|
||||||
OrderedInstructions OI;
|
OrderedInstructions OI;
|
||||||
// Blocks for which we have the up-to-date cached information.
|
// Blocks for which we have the up-to-date cached information.
|
||||||
|
@ -27,7 +27,7 @@ const Instruction *InstructionPrecedenceTracking::getFirstSpecialInstruction(
|
|||||||
const BasicBlock *BB) {
|
const BasicBlock *BB) {
|
||||||
if (!KnownBlocks.count(BB))
|
if (!KnownBlocks.count(BB))
|
||||||
fill(BB);
|
fill(BB);
|
||||||
auto *FirstICF = FirstImplicitControlFlowInsts.lookup(BB);
|
auto *FirstICF = FirstSpecialInsts.lookup(BB);
|
||||||
assert((!FirstICF || FirstICF->getParent() == BB) && "Inconsistent cache!");
|
assert((!FirstICF || FirstICF->getParent() == BB) && "Inconsistent cache!");
|
||||||
return FirstICF;
|
return FirstICF;
|
||||||
}
|
}
|
||||||
@ -45,10 +45,10 @@ bool InstructionPrecedenceTracking::isPreceededBySpecialInstruction(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void InstructionPrecedenceTracking::fill(const BasicBlock *BB) {
|
void InstructionPrecedenceTracking::fill(const BasicBlock *BB) {
|
||||||
FirstImplicitControlFlowInsts.erase(BB);
|
FirstSpecialInsts.erase(BB);
|
||||||
for (auto &I : *BB)
|
for (auto &I : *BB)
|
||||||
if (isSpecialInstruction(&I)) {
|
if (isSpecialInstruction(&I)) {
|
||||||
FirstImplicitControlFlowInsts[BB] = &I;
|
FirstSpecialInsts[BB] = &I;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,14 +58,14 @@ void InstructionPrecedenceTracking::fill(const BasicBlock *BB) {
|
|||||||
|
|
||||||
void InstructionPrecedenceTracking::invalidateBlock(const BasicBlock *BB) {
|
void InstructionPrecedenceTracking::invalidateBlock(const BasicBlock *BB) {
|
||||||
OI.invalidateBlock(BB);
|
OI.invalidateBlock(BB);
|
||||||
FirstImplicitControlFlowInsts.erase(BB);
|
FirstSpecialInsts.erase(BB);
|
||||||
KnownBlocks.erase(BB);
|
KnownBlocks.erase(BB);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstructionPrecedenceTracking::clear() {
|
void InstructionPrecedenceTracking::clear() {
|
||||||
for (auto It : FirstImplicitControlFlowInsts)
|
for (auto It : FirstSpecialInsts)
|
||||||
OI.invalidateBlock(It.first);
|
OI.invalidateBlock(It.first);
|
||||||
FirstImplicitControlFlowInsts.clear();
|
FirstSpecialInsts.clear();
|
||||||
KnownBlocks.clear();
|
KnownBlocks.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user