This is an archive of the discontinued LLVM Phabricator instance.

[LiveIntervals] Update subranges in processTiedPairs
ClosedPublic

Authored by foad on Sep 24 2021, 6:06 AM.

Details

Summary

In TwoAddressInstructionPass::processTiedPairs when updating live
intervals after moving the last use of RegB back to the newly inserted
copy, update any affected subranges as well as the main range.

Diff Detail

Event Timeline

foad created this revision.Sep 24 2021, 6:06 AM
foad requested review of this revision.Sep 24 2021, 6:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2021, 6:06 AM
foad added inline comments.
llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
1638–1641

I did wonder if there should be a helper function in LiveIntervals for modifying a range and all relevant subranges, but it's not clear to me exactly what the API would be for that.

foad updated this revision to Diff 375568.Sep 28 2021, 7:23 AM

Only shrink the main range if all live subranges also shrink.

foad updated this revision to Diff 384143.Nov 2 2021, 9:47 AM

More subreg awareness: replace "bool ReplacedAllUntiedUses" with
"LaneBitmask RemainingUses". Fixes some RISCV test cases.

foad added a comment.Nov 3 2021, 2:39 AM

Ping! This is a prerequisite for D112556 and for the goal of enabling -early-live-intervals by default.

arsenm accepted this revision.Nov 10 2021, 5:27 PM
This revision is now accepted and ready to land.Nov 10 2021, 5:27 PM
This revision was automatically updated to reflect the committed changes.