Different CodeBlocks don't overlap. The same MCInst cannot appear in more than
one code block because all blocks are instantiated before the simulation is run.
We should always clear the content of map VariantDescriptors before every
simulation, since VariantDescriptors cannot possibly store useful information
for the next blocks. It is also "safer" to clear its content because `MCInst*`
is used as the key type for map VariantDescriptors.
llvm-svn: 336142
return ProcResourceMasks;
}
+ void clear() { VariantDescriptors.shrink_and_clear(); }
+
std::unique_ptr<Instruction> createInstruction(const llvm::MCInst &MCI);
};
} // namespace mca
P->run();
Printer.printReport(TOF->os());
+
+ // Clear the InstrBuilder internal state in preparation for another round.
+ IB.clear();
}
TOF->keep();