Legalization pattern emission WIP.
Begin emitting legalization patterns in the form of two functions, 'expand' and 'narrow' that are included in legalizer.rs. The generated code compiles, but it is not fully working yet. We need to deal with the special cases of instructions producing multiple results.
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
//! The legalizer does not deal with register allocation constraints. These constraints are derived
|
||||
//! from the encoding recipes, and solved later by the register allocator.
|
||||
|
||||
use ir::Function;
|
||||
use ir::{Function, Cursor, DataFlowGraph, InstructionData, Opcode, Inst, InstBuilder};
|
||||
use ir::condcodes::IntCC;
|
||||
use isa::TargetIsa;
|
||||
|
||||
/// Legalize `func` for `isa`.
|
||||
@@ -52,3 +53,9 @@ pub fn legalize_function(func: &mut Function, isa: &TargetIsa) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Include legalization patterns that were generated by gen_legalizer.py from the XForms in
|
||||
// meta/cretonne/legalize.py.
|
||||
//
|
||||
// Concretely, this defines private functions `narrow()`, and `expand()`.
|
||||
include!(concat!(env!("OUT_DIR"), "/legalizer.rs"));
|
||||
|
||||
Reference in New Issue
Block a user