[LiveInterval] Add RemoveDeadValNo argument to removeSegment(iterator)
authorJay Foad <jay.foad@amd.com>
Mon, 27 Sep 2021 15:05:54 +0000 (16:05 +0100)
committerJay Foad <jay.foad@amd.com>
Wed, 27 Oct 2021 08:43:32 +0000 (09:43 +0100)
commitb9e3af124b760a2ed15cb951a315f20cea687307
tree0fca8c2693d1cefbb64ce4f3abb1c6c9800f0d17
parentda1d1a08694bbfe0ea7a23ea094612436e8a2dd0
[LiveInterval] Add RemoveDeadValNo argument to removeSegment(iterator)

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.

Differential Revision: https://reviews.llvm.org/D110560
llvm/include/llvm/CodeGen/LiveInterval.h
llvm/lib/CodeGen/LiveInterval.cpp
llvm/lib/CodeGen/LiveIntervals.cpp