This is an archive of the discontinued LLVM Phabricator instance.

[LiveInterval] Add RemoveDeadValNo argument to removeSegment(iterator)
ClosedPublic

Authored by foad on Sep 27 2021, 8:28 AM.

Details

Summary

Add an optional bool RemoveDeadValNo argument to the
removeSegment(iterator) overload, for consistency with the other
overloads. This gives clients a way to remove dead valnos while also
getting an updated iterator returned (in the manner of vector::erase).

Use this to clean up some inefficient code in
LiveIntervals::repairOldRegInRange. NFC.

Diff Detail

Event Timeline

foad created this revision.Sep 27 2021, 8:28 AM
foad requested review of this revision.Sep 27 2021, 8:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 27 2021, 8:28 AM
foad updated this revision to Diff 375571.Sep 28 2021, 7:28 AM

Switch to using llvm::none_of.

foad added a comment.Oct 26 2021, 2:49 AM

Ping! This is NFC, just cleaning up the "FIXME: This could be more efficient" comment in LiveIntervals by doing what it suggests.

qcolombet accepted this revision.Oct 26 2021, 1:44 PM
This revision is now accepted and ready to land.Oct 26 2021, 1:44 PM
This revision was landed with ongoing or failed builds.Oct 27 2021, 1:43 AM
This revision was automatically updated to reflect the committed changes.