Add a PredicateView type to abstract the predicate bit vector a bit.
The encoding tables contain references to numbered ISA predicates. - Give the ISA Flags types a predicate_view() method which returns a PredicateView. - Delete the old predicate_bytes() method which returned a raw &[u8]. - Use a 'static lifetime for the encoding list slice in the Encodings iterator, and a single 'a lifetime for everything else.
This commit is contained in:
@@ -61,11 +61,11 @@ impl TargetIsa for Isa {
|
||||
enc_tables::INFO.clone()
|
||||
}
|
||||
|
||||
fn legal_encodings<'a, 'b>(&'a self,
|
||||
_dfg: &'b ir::DataFlowGraph,
|
||||
inst: &'b ir::InstructionData,
|
||||
ctrl_typevar: ir::Type)
|
||||
-> Result<Encodings<'a, 'b>, Legalize> {
|
||||
fn legal_encodings<'a>(&'a self,
|
||||
_dfg: &'a ir::DataFlowGraph,
|
||||
inst: &'a ir::InstructionData,
|
||||
ctrl_typevar: ir::Type)
|
||||
-> Result<Encodings<'a>, Legalize> {
|
||||
lookup_enclist(ctrl_typevar,
|
||||
inst.opcode(),
|
||||
self.cpumode,
|
||||
@@ -75,7 +75,7 @@ impl TargetIsa for Isa {
|
||||
&enc_tables::ENCLISTS[..],
|
||||
inst,
|
||||
enc_tables::check_instp,
|
||||
self.isa_flags.predicate_bytes()))
|
||||
self.isa_flags.predicate_view()))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user