This is an archive of the discontinued LLVM Phabricator instance.

[LiveIntervals] Fix verification of early-clobbered segments
ClosedPublic

Authored by foad on Oct 4 2021, 8:36 AM.

Details

Summary

Enable verification of live intervals immediately after computing them
(when -early-live-intervals is used) and fix a problem that that
provokes: currently the verifier insists that a segment that ends at an
early-clobber slot must be followed by another segment starting at the
same slot. But before TwoAddressInstruction runs, the equivalent
condition is: a segment that ends at an early-clobber slot must have its
last use tied to an early-clobber def. That condition is harder to check
here, so for now just disable this check until tied operands have been
rewritten.

Diff Detail

Event Timeline

foad created this revision.Oct 4 2021, 8:36 AM
foad requested review of this revision.Oct 4 2021, 8:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2021, 8:36 AM

I assume it is correct, that we want to tweak the rules enforced by the verifier before and after tied ops are rewritten? The alternative is that we actually modify the end points of the live segments, so that they only end at an early-clobber slot after tied ops have been rewritten, but that seems needlessly invasive.

MatzeB accepted this revision.Oct 4 2021, 9:35 AM

Yes, before the TwoAddressInstructionass the code is in SSA form which means the def must use a different register than the use of the tied op. This makes sense to me.

This revision is now accepted and ready to land.Oct 4 2021, 9:35 AM
This revision was automatically updated to reflect the committed changes.