mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
use valid bits to avoid unnecessary machine trace metric recomputations
Although this does cut the number of traces recomputed by ~10% for the test case mentioned in http://reviews.llvm.org/D10460, it doesn't make a dent in the overall performance. That example needs to be more selective when invalidating traces. llvm-svn: 241393
This commit is contained in:
parent
7c51289046
commit
c0d734a9ee
@ -1131,11 +1131,16 @@ computeInstrHeights(const MachineBasicBlock *MBB) {
|
||||
|
||||
MachineTraceMetrics::Trace
|
||||
MachineTraceMetrics::Ensemble::getTrace(const MachineBasicBlock *MBB) {
|
||||
// FIXME: Check cache tags, recompute as needed.
|
||||
TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()];
|
||||
|
||||
if (!TBI.hasValidDepth() || !TBI.hasValidHeight())
|
||||
computeTrace(MBB);
|
||||
if (!TBI.HasValidInstrDepths)
|
||||
computeInstrDepths(MBB);
|
||||
if (!TBI.HasValidInstrHeights)
|
||||
computeInstrHeights(MBB);
|
||||
return Trace(*this, BlockInfo[MBB->getNumber()]);
|
||||
|
||||
return Trace(*this, TBI);
|
||||
}
|
||||
|
||||
unsigned
|
||||
|
Loading…
Reference in New Issue
Block a user