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:
@@ -138,11 +138,11 @@ pub trait TargetIsa {
|
||||
fn register_info(&self) -> RegInfo;
|
||||
|
||||
/// Returns an iterartor over legal encodings for the instruction.
|
||||
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>;
|
||||
|
||||
/// Encode an instruction after determining it is legal.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user