Emit runtime type checks in legalizer.rs (#112)

* Emit runtime type checks in legalizer.rs
This commit is contained in:
d1m0
2017-07-10 15:28:32 -07:00
committed by Jakob Stoklund Olesen
parent 528e6ff3f5
commit fc11ae7b72
9 changed files with 494 additions and 69 deletions

View File

@@ -506,10 +506,14 @@ type BitSet16 = BitSet<u16>;
/// A value type set describes the permitted set of types for a type variable.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct ValueTypeSet {
lanes: BitSet16,
ints: BitSet8,
floats: BitSet8,
bools: BitSet8,
/// Allowed lane sizes
pub lanes: BitSet16,
/// Allowed int widths
pub ints: BitSet8,
/// Allowed float widths
pub floats: BitSet8,
/// Allowed bool widths
pub bools: BitSet8,
}
impl ValueTypeSet {

View File

@@ -18,6 +18,8 @@ use flowgraph::ControlFlowGraph;
use ir::{Function, Cursor, DataFlowGraph, InstructionData, Opcode, InstBuilder};
use ir::condcodes::IntCC;
use isa::{TargetIsa, Legalize};
use bitset::BitSet;
use ir::instructions::ValueTypeSet;
mod boundary;
mod split;