This is an archive of the discontinued LLVM Phabricator instance.

[LiveIntervals] Remove unused subreg ranges in repairIntervalsInRange
ClosedPublic

Authored by foad on Sep 27 2021, 5:51 AM.

Details

Summary

If the old instructions mentioned a subreg that the new instructions do
not, remove the subrange for that subreg.

For example, in TwoAddressInstructionPass::eliminateRegSequence, if a
use operand in the REG_SEQUENCE has the undef flag then we don't
generate a copy for it so after the elimination there should be no live
interval at all for the corresponding subreg of the def.

This is a small step towards switching TwoAddressInstructionPass over
from LiveVariables to LiveIntervals. Currently this path is only tested
if you explicitly enable -early-live-intervals.

Diff Detail

Event Timeline

foad created this revision.Sep 27 2021, 5:51 AM
foad requested review of this revision.Sep 27 2021, 5:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 27 2021, 5:51 AM
foad updated this revision to Diff 375259.Sep 27 2021, 7:46 AM

Do all the work inside repairIntervalsInRange instead of adding more
LiveIntervals-specific code to TwoAddressInstructionPass.

foad retitled this revision from [LiveIntervals] Remove unused subreg ranges in eliminateRegSequence to [LiveIntervals] Remove unused subreg ranges in repairIntervalsInRange.Sep 27 2021, 7:48 AM
foad edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Sep 29 2021, 11:40 AM
This revision was landed with ongoing or failed builds.Sep 30 2021, 1:15 AM
This revision was automatically updated to reflect the committed changes.