llvm-project
57b673b3 - [CodeGen] Untangle RegisterCoalescer from LRE's ScannedRemattable flag [nfc[ (#159839)

Commit
19 days ago
[CodeGen] Untangle RegisterCoalescer from LRE's ScannedRemattable flag [nfc[ (#159839) LiveRangeEdit's rematerialization checking logic is used in two quite different ways. For SplitKit and InlineSpiller, we're analyzing all defs associated with a live interval, doing that analysis up front, and then using the result a bit later. The RegisterCoalescer, we're analysing exactly one ValNo at a time, and using the legality result immediately. LRE had a checkRematerializable which existed basically to adapt the later into the former usage model. Instead, this change bypasses the ScannedRemat and Remattable structures, and directly queries the underlying routines. This is easy to read, and makes it more clear as to which uses actually need the deferred analysis. (A following change may try to unwind that too, but it's not strictly NFC.)
Author
Parents
Loading