[llvm-commits] [llvm] r161074 - in /llvm/trunk/lib/CodeGen: MachineTraceMetrics.cpp MachineTraceMetrics.h
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Jul 31 17:46:30 PDT 2012
On Jul 31, 2012, at 5:19 PM, Andrew Trick <atrick at apple.com> wrote:
>
> On Jul 31, 2012, at 5:05 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>>> The SSA assumption should be explicit. Can we change getVRegDef to return MachineOperand?
>>
>> No, it's used all over the place, and MachineOperand doesn't know its own number anyway.
[MachineOperand doesn't currently have a getOperandNo() method, probably because MO.getParent() can be null.]
>> It this something you need over in MISched? Otherwise I won't add it to MRI.
>
> No, I'm fine with assertions, or comments to the effect that an assertion elsewhere covers it.
I think I'll add a DataDep constructor with all the assertions.
> I forgot to mention that you're not recursing on phi nodes for instruction depth, so you might end up asking for the latency of a phi node.
Nope, PHIs are transient:
if (!Dep.DefMI->isTransient())
DepCycle += MTM.TII->computeOperandLatency(MTM.ItinData,
Dep.DefMI, Dep.DefOp,
UseMI, Dep.UseOp,
/* FindMin = */ false);
But I do compute the depth of PHIs, so they do appear as UseMI above. Same thing for copies.
I guess you could resolve both PHIs and copies completely so computeOperandLatency() would get an exact UseMI.
/jakob
More information about the llvm-commits
mailing list