Use u32 in Type API (#4280)
Move from passing and returning u8 and u16 values to u32 in many of the functions. This removes a number of type conversions and gives a small compilation time speedup, around ~0.7% on my aarch64 machine. Copyright (c) 2022, Arm Limited.
This commit is contained in:
@@ -535,7 +535,9 @@ fn souper_type_of(dfg: &ir::DataFlowGraph, val: ir::Value) -> Option<ast::Type>
|
||||
let ty = dfg.value_type(val);
|
||||
assert!(ty.is_int() || ty.is_bool());
|
||||
assert_eq!(ty.lane_count(), 1);
|
||||
Some(ast::Type { width: ty.bits() })
|
||||
Some(ast::Type {
|
||||
width: ty.bits().try_into().unwrap(),
|
||||
})
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in New Issue
Block a user