mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Rename isEarlierInSameTrace to isUsefulDominator.
In very rare cases caused by irreducible control flow, the dominating block can have the same trace head without actually being part of the trace. As long as such a dominator still has valid instruction depths, it is OK to use it for computing instruction depths. Rename the function to avoid lying, and add a check that instruction depths are computed for the dominator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176668 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -677,7 +677,7 @@ computeCrossBlockCriticalPath(const TraceBlockInfo &TBI) {
|
||||
const MachineInstr *DefMI = MTM.MRI->getVRegDef(LIR.Reg);
|
||||
// Ignore dependencies outside the current trace.
|
||||
const TraceBlockInfo &DefTBI = BlockInfo[DefMI->getParent()->getNumber()];
|
||||
if (!DefTBI.isEarlierInSameTrace(TBI))
|
||||
if (!DefTBI.isUsefulDominator(TBI))
|
||||
continue;
|
||||
unsigned Len = LIR.Height + Cycles[DefMI].Depth;
|
||||
MaxLen = std::max(MaxLen, Len);
|
||||
@@ -740,7 +740,7 @@ computeInstrDepths(const MachineBasicBlock *MBB) {
|
||||
const TraceBlockInfo&DepTBI =
|
||||
BlockInfo[Dep.DefMI->getParent()->getNumber()];
|
||||
// Ignore dependencies from outside the current trace.
|
||||
if (!DepTBI.isEarlierInSameTrace(TBI))
|
||||
if (!DepTBI.isUsefulDominator(TBI))
|
||||
continue;
|
||||
assert(DepTBI.HasValidInstrDepths && "Inconsistent dependency");
|
||||
unsigned DepCycle = Cycles.lookup(Dep.DefMI).Depth;
|
||||
|
||||
Reference in New Issue
Block a user