Remove is_ghost

This commit is contained in:
bjorn3
2021-10-12 14:53:33 +02:00
parent 783bb1f759
commit e8b18b58a1
3 changed files with 4 additions and 26 deletions

View File

@@ -76,8 +76,6 @@ pub(crate) struct InstructionContent {
pub is_call: bool, pub is_call: bool,
/// Is this a return instruction? /// Is this a return instruction?
pub is_return: bool, pub is_return: bool,
/// Is this a ghost instruction?
pub is_ghost: bool,
/// Can this instruction read from memory? /// Can this instruction read from memory?
pub can_load: bool, pub can_load: bool,
/// Can this instruction write to memory? /// Can this instruction write to memory?
@@ -148,7 +146,6 @@ pub(crate) struct InstructionBuilder {
is_indirect_branch: bool, is_indirect_branch: bool,
is_call: bool, is_call: bool,
is_return: bool, is_return: bool,
is_ghost: bool,
can_load: bool, can_load: bool,
can_store: bool, can_store: bool,
can_trap: bool, can_trap: bool,
@@ -171,7 +168,6 @@ impl InstructionBuilder {
is_indirect_branch: false, is_indirect_branch: false,
is_call: false, is_call: false,
is_return: false, is_return: false,
is_ghost: false,
can_load: false, can_load: false,
can_store: false, can_store: false,
can_trap: false, can_trap: false,
@@ -228,12 +224,6 @@ impl InstructionBuilder {
self self
} }
#[allow(clippy::wrong_self_convention)]
pub fn is_ghost(mut self, val: bool) -> Self {
self.is_ghost = val;
self
}
pub fn can_load(mut self, val: bool) -> Self { pub fn can_load(mut self, val: bool) -> Self {
self.can_load = val; self.can_load = val;
self self
@@ -303,7 +293,6 @@ impl InstructionBuilder {
is_indirect_branch: self.is_indirect_branch, is_indirect_branch: self.is_indirect_branch,
is_call: self.is_call, is_call: self.is_call,
is_return: self.is_return, is_return: self.is_return,
is_ghost: self.is_ghost,
can_load: self.can_load, can_load: self.can_load,
can_store: self.can_store, can_store: self.can_store,
can_trap: self.can_trap, can_trap: self.can_trap,

View File

@@ -489,13 +489,6 @@ fn gen_opcodes(all_inst: &AllInstructions, fmt: &mut Formatter) {
"Is this a return instruction?", "Is this a return instruction?",
fmt, fmt,
); );
gen_bool_accessor(
all_inst,
|inst| inst.is_ghost,
"is_ghost",
"Is this a ghost instruction?",
fmt,
);
gen_bool_accessor( gen_bool_accessor(
all_inst, all_inst,
|inst| inst.can_load, |inst| inst.can_load,

View File

@@ -2047,8 +2047,7 @@ pub(crate) fn define(
&formats.unary, &formats.unary,
) )
.operands_in(vec![x]) .operands_in(vec![x])
.operands_out(vec![lo, hi]) .operands_out(vec![lo, hi]),
.is_ghost(true),
); );
let Any128 = &TypeVar::new( let Any128 = &TypeVar::new(
@@ -2083,8 +2082,7 @@ pub(crate) fn define(
&formats.binary, &formats.binary,
) )
.operands_in(vec![x, y]) .operands_in(vec![x, y])
.operands_out(vec![a]) .operands_out(vec![a]),
.is_ghost(true),
); );
let c = &Operand::new("c", &TxN.as_bool()).with_doc("Controlling vector"); let c = &Operand::new("c", &TxN.as_bool()).with_doc("Controlling vector");
@@ -4386,8 +4384,7 @@ pub(crate) fn define(
&formats.unary, &formats.unary,
) )
.operands_in(vec![x]) .operands_in(vec![x])
.operands_out(vec![lo, hi]) .operands_out(vec![lo, hi]),
.is_ghost(true),
); );
let NarrowInt = &TypeVar::new( let NarrowInt = &TypeVar::new(
@@ -4417,8 +4414,7 @@ pub(crate) fn define(
&formats.binary, &formats.binary,
) )
.operands_in(vec![lo, hi]) .operands_in(vec![lo, hi])
.operands_out(vec![a]) .operands_out(vec![a]),
.is_ghost(true),
); );
// Instructions relating to atomic memory accesses and fences // Instructions relating to atomic memory accesses and fences