Outline a bug! invocation
This reduces the amount of llvm ir lines for intrinsic related code from 23801 to 20478.
This commit is contained in:
parent
54eb0d992a
commit
d3099a40c7
@ -7,7 +7,7 @@ macro_rules! intrinsic_args {
|
||||
let ($($arg),*) = if let [$($arg),*] = $args {
|
||||
($(codegen_operand($fx, $arg)),*)
|
||||
} else {
|
||||
bug!("wrong number of args for intrinsic {}", $intrinsic);
|
||||
$crate::intrinsics::bug_on_incorrect_arg_count($intrinsic);
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -26,6 +26,10 @@ macro_rules! intrinsic_args {
|
||||
use crate::prelude::*;
|
||||
use cranelift_codegen::ir::AtomicRmwOp;
|
||||
|
||||
fn bug_on_incorrect_arg_count(intrinsic: impl std::fmt::Display) -> ! {
|
||||
bug!("wrong number of args for intrinsic {}", intrinsic);
|
||||
}
|
||||
|
||||
fn report_atomic_type_validation_error<'tcx>(
|
||||
fx: &mut FunctionCx<'_, '_, 'tcx>,
|
||||
intrinsic: Symbol,
|
||||
|
Loading…
Reference in New Issue
Block a user