Add a value location verifier.
This is a verification pass that can be run after register allocation. It verifies that value locations are consistent with constraints on their uses, and that the register diversions are consistent. Make it clear that register diversions are local to an EBB only. This affects what branch relaxation is allowed to do. The verify_locations() takes an optional Liveness parameter which is used to check that no diverted values are live across CFG edges.
This commit is contained in:
@@ -383,6 +383,13 @@ impl LiveRange {
|
||||
})
|
||||
}
|
||||
|
||||
/// Is this value live-in to `ebb`?
|
||||
///
|
||||
/// An EBB argument is not considered to be live in.
|
||||
pub fn is_livein<PO: ProgramOrder>(&self, ebb: Ebb, order: &PO) -> bool {
|
||||
self.livein_local_end(ebb, order).is_some()
|
||||
}
|
||||
|
||||
/// Get all the live-in intervals.
|
||||
pub fn liveins(&self) -> &[Interval] {
|
||||
&self.liveins
|
||||
|
||||
Reference in New Issue
Block a user