Remove instructions necessary for the old regalloc

This commit is contained in:
bjorn3
2021-10-12 14:37:36 +02:00
parent 1fd491dadd
commit a05bf2bf42
12 changed files with 3 additions and 332 deletions

View File

@@ -1798,156 +1798,6 @@ pub(crate) fn define(
.operands_out(vec![a]),
);
ig.push(
Inst::new(
"spill",
r#"
Spill a register value to a stack slot.
This instruction behaves exactly like `copy`, but the result
value is assigned to a spill slot.
"#,
&formats.unary,
)
.operands_in(vec![x])
.operands_out(vec![a])
.can_store(true),
);
ig.push(
Inst::new(
"fill",
r#"
Load a register value from a stack slot.
This instruction behaves exactly like `copy`, but creates a new
SSA value for the spilled input value.
"#,
&formats.unary,
)
.operands_in(vec![x])
.operands_out(vec![a])
.can_load(true),
);
ig.push(
Inst::new(
"fill_nop",
r#"
This is identical to `fill`, except it has no encoding, since it is a no-op.
This instruction is created only during late-stage redundant-reload removal, after all
registers and stack slots have been assigned. It is used to replace `fill`s that have
been identified as redundant.
"#,
&formats.unary,
)
.operands_in(vec![x])
.operands_out(vec![a])
.can_load(true),
);
ig.push(
Inst::new(
"copy_nop",
r#"
Stack-slot-to-the-same-stack-slot copy, which is guaranteed to turn
into a no-op. This instruction is for use only within Cranelift itself.
This instruction copies its input, preserving the value type.
"#,
&formats.unary,
)
.operands_in(vec![x])
.operands_out(vec![a]),
);
let delta = &Operand::new("delta", Int);
ig.push(
Inst::new(
"adjust_sp_down",
r#"
Subtracts ``delta`` offset value from the stack pointer register.
This instruction is used to adjust the stack pointer by a dynamic amount.
"#,
&formats.unary,
)
.operands_in(vec![delta])
.other_side_effects(true),
);
let Offset = &Operand::new("Offset", &imm.imm64).with_doc("Offset from current stack pointer");
ig.push(
Inst::new(
"adjust_sp_up_imm",
r#"
Adds ``Offset`` immediate offset value to the stack pointer register.
This instruction is used to adjust the stack pointer, primarily in function
prologues and epilogues. ``Offset`` is constrained to the size of a signed
32-bit integer.
"#,
&formats.unary_imm,
)
.operands_in(vec![Offset])
.other_side_effects(true),
);
let Offset = &Operand::new("Offset", &imm.imm64).with_doc("Offset from current stack pointer");
ig.push(
Inst::new(
"adjust_sp_down_imm",
r#"
Subtracts ``Offset`` immediate offset value from the stack pointer
register.
This instruction is used to adjust the stack pointer, primarily in function
prologues and epilogues. ``Offset`` is constrained to the size of a signed
32-bit integer.
"#,
&formats.unary_imm,
)
.operands_in(vec![Offset])
.other_side_effects(true),
);
let f = &Operand::new("f", iflags);
ig.push(
Inst::new(
"ifcmp_sp",
r#"
Compare ``addr`` with the stack pointer and set the CPU flags.
This is like `ifcmp` where ``addr`` is the LHS operand and the stack
pointer is the RHS.
"#,
&formats.unary,
)
.operands_in(vec![addr])
.operands_out(vec![f]),
);
let N =
&Operand::new("args", &entities.varargs).with_doc("Variable number of args for StackMap");
ig.push(
Inst::new(
"safepoint",
r#"
This instruction will provide live reference values at a point in
the function. It can only be used by the compiler.
"#,
&formats.multiary,
)
.operands_in(vec![N])
.other_side_effects(true),
);
let x = &Operand::new("x", TxN).with_doc("Vector to split");
let lo = &Operand::new("lo", &TxN.half_vector()).with_doc("Low-numbered lanes of `x`");
let hi = &Operand::new("hi", &TxN.half_vector()).with_doc("High-numbered lanes of `x`");