REG_SEQUENCE node requires special treatment during the
unscheduling because the node is untyped and neither its
class, nor cost could be retrieved the same way as for
typed nodes.
Related issue: https://github.com/llvm/llvm-project/issues/58911
Differential D138837
[ScheduleDAG] Support REQ_SEQUENCE unscheduling fzhinkin on Nov 28 2022, 11:02 AM. Authored by
Details REG_SEQUENCE node requires special treatment during the Related issue: https://github.com/llvm/llvm-project/issues/58911
Diff Detail
Event TimelineComment Actions LGTM. It's not really clear to me why unscheduling isn't using GetCostForDef(), but I don't really want to make more complex changes to this code; it tends to be fragile. Comment Actions Just a note. Comment Actions @barannikov88 even if getRepRegClassFor will return some non-null value, getRepRegClassCostFor may return value that differs from 1 returned by GetCostForDef for REG_SEQUENCE, so it wouldn't be sufficient to only override getRepRegClassFor. I looked at how it works for SystemZ target and getRepRegClassFor returns SystemZ::ADDR128BitRegClass for MVT::Untyped, but corresponding cost returned by getRepRegClassCostFor is 0. It also seems like the only targets handling MVT::Untyped in getRepRegClassFor are MIPS and SystemZ, so a change should be made not only in the ARM target, but in all other targets too. |