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:
@@ -116,6 +116,7 @@ impl SubTest for TestBinEmit {
|
||||
// Give an encoding to any instruction that doesn't already have one.
|
||||
let mut divert = RegDiversions::new();
|
||||
for ebb in func.layout.ebbs() {
|
||||
divert.clear();
|
||||
for inst in func.layout.ebb_insts(ebb) {
|
||||
if !func.encodings[inst].is_legal() {
|
||||
let mut legal_encodings = isa.legal_encodings(
|
||||
@@ -180,7 +181,6 @@ impl SubTest for TestBinEmit {
|
||||
}
|
||||
|
||||
// Now emit all instructions.
|
||||
divert.clear();
|
||||
let mut sink = TextSink::new(isa);
|
||||
for ebb in func.layout.ebbs() {
|
||||
divert.clear();
|
||||
|
||||
Reference in New Issue
Block a user