Support mod (modify) operands, for better efficiency with regalloc.rs/Cranelift shim.

This commit is contained in:
Chris Fallin
2021-05-07 19:48:34 -07:00
parent d2cc4f1ac2
commit a6e3128821
4 changed files with 87 additions and 56 deletions

View File

@@ -297,10 +297,8 @@ impl CheckerState {
// the requirements of the OperandPolicy.
for (op, alloc) in operands.iter().zip(allocs.iter()) {
let is_here = match (op.pos(), pos) {
(OperandPos::Before, InstPosition::Before)
| (OperandPos::Both, InstPosition::Before) => true,
(OperandPos::After, InstPosition::After)
| (OperandPos::Both, InstPosition::After) => true,
(OperandPos::Before, InstPosition::Before) => true,
(OperandPos::After, InstPosition::After) => true,
_ => false,
};
if !is_here {