2018-09-20 13:47:22 +00:00
|
|
|
use super::abi::AbiBuilderMethods;
|
|
|
|
use super::asm::AsmBuilderMethods;
|
|
|
|
use super::debuginfo::DebugInfoBuilderMethods;
|
|
|
|
use super::intrinsic::IntrinsicCallMethods;
|
|
|
|
use super::type_::ArgTypeMethods;
|
2018-11-26 17:36:58 +00:00
|
|
|
use super::{HasCodegen, StaticBuilderMethods};
|
2018-10-03 11:49:57 +00:00
|
|
|
use common::{AtomicOrdering, AtomicRmwBinOp, IntPredicate, RealPredicate, SynchronizationScope};
|
2018-09-14 15:48:57 +00:00
|
|
|
use mir::operand::OperandRef;
|
|
|
|
use mir::place::PlaceRef;
|
2018-11-24 15:44:17 +00:00
|
|
|
use rustc::ty::Ty;
|
2018-09-08 22:16:45 +00:00
|
|
|
use rustc::ty::layout::{Align, Size};
|
2018-09-08 19:14:55 +00:00
|
|
|
use std::ffi::CStr;
|
2018-10-03 11:49:57 +00:00
|
|
|
use MemFlags;
|
2018-08-07 15:14:40 +00:00
|
|
|
|
|
|
|
use std::borrow::Cow;
|
|
|
|
use std::ops::Range;
|
2018-08-21 16:22:29 +00:00
|
|
|
use syntax::ast::AsmDialect;
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-11-24 15:44:17 +00:00
|
|
|
#[derive(Copy, Clone)]
|
|
|
|
pub enum OverflowOp {
|
|
|
|
Add,
|
|
|
|
Sub,
|
|
|
|
Mul,
|
|
|
|
}
|
|
|
|
|
2018-09-20 13:47:22 +00:00
|
|
|
pub trait BuilderMethods<'a, 'tcx: 'a>:
|
|
|
|
HasCodegen<'tcx>
|
|
|
|
+ DebugInfoBuilderMethods<'tcx>
|
|
|
|
+ ArgTypeMethods<'tcx>
|
|
|
|
+ AbiBuilderMethods<'tcx>
|
|
|
|
+ IntrinsicCallMethods<'tcx>
|
|
|
|
+ AsmBuilderMethods<'tcx>
|
2018-11-26 17:36:58 +00:00
|
|
|
+ StaticBuilderMethods<'tcx>
|
2018-09-20 13:47:22 +00:00
|
|
|
{
|
2018-09-13 12:58:19 +00:00
|
|
|
fn new_block<'b>(cx: &'a Self::CodegenCx, llfn: Self::Value, name: &'b str) -> Self;
|
2018-09-07 01:31:42 +00:00
|
|
|
fn with_cx(cx: &'a Self::CodegenCx) -> Self;
|
2018-08-07 15:14:40 +00:00
|
|
|
fn build_sibling_block<'b>(&self, name: &'b str) -> Self;
|
2018-09-20 13:47:22 +00:00
|
|
|
fn cx(&self) -> &Self::CodegenCx;
|
2018-08-22 16:57:31 +00:00
|
|
|
fn llfn(&self) -> Self::Value;
|
|
|
|
fn llbb(&self) -> Self::BasicBlock;
|
2018-08-07 15:14:40 +00:00
|
|
|
fn count_insn(&self, category: &str);
|
|
|
|
|
2018-10-04 13:23:10 +00:00
|
|
|
fn set_value_name(&mut self, value: Self::Value, name: &str);
|
|
|
|
fn position_at_end(&mut self, llbb: Self::BasicBlock);
|
|
|
|
fn position_at_start(&mut self, llbb: Self::BasicBlock);
|
|
|
|
fn ret_void(&mut self);
|
|
|
|
fn ret(&mut self, v: Self::Value);
|
|
|
|
fn br(&mut self, dest: Self::BasicBlock);
|
|
|
|
fn cond_br(
|
|
|
|
&mut self,
|
|
|
|
cond: Self::Value,
|
|
|
|
then_llbb: Self::BasicBlock,
|
|
|
|
else_llbb: Self::BasicBlock,
|
|
|
|
);
|
2018-10-05 13:08:49 +00:00
|
|
|
fn switch(
|
|
|
|
&mut self,
|
|
|
|
v: Self::Value,
|
|
|
|
else_llbb: Self::BasicBlock,
|
|
|
|
num_cases: usize,
|
|
|
|
) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
fn invoke(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-08-22 16:57:31 +00:00
|
|
|
llfn: Self::Value,
|
|
|
|
args: &[Self::Value],
|
|
|
|
then: Self::BasicBlock,
|
|
|
|
catch: Self::BasicBlock,
|
2018-11-13 10:51:42 +00:00
|
|
|
funclet: Option<&Self::Funclet>,
|
2018-08-22 16:57:31 +00:00
|
|
|
) -> Self::Value;
|
2018-10-05 13:08:49 +00:00
|
|
|
fn unreachable(&mut self);
|
|
|
|
fn add(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn fadd(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn fadd_fast(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn sub(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn fsub(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn fsub_fast(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn mul(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn fmul(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn fmul_fast(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn udiv(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn exactudiv(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn sdiv(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn exactsdiv(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn fdiv(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn fdiv_fast(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn urem(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn srem(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn frem(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn frem_fast(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn shl(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn lshr(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn ashr(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn and(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn or(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn xor(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn neg(&mut self, v: Self::Value) -> Self::Value;
|
|
|
|
fn fneg(&mut self, v: Self::Value) -> Self::Value;
|
|
|
|
fn not(&mut self, v: Self::Value) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-11-24 15:44:17 +00:00
|
|
|
fn checked_binop(
|
|
|
|
&mut self,
|
|
|
|
oop: OverflowOp,
|
|
|
|
ty: Ty,
|
|
|
|
lhs: Self::Value,
|
|
|
|
rhs: Self::Value,
|
|
|
|
) -> (Self::Value, Self::Value);
|
|
|
|
|
2018-09-08 22:16:45 +00:00
|
|
|
fn alloca(&mut self, ty: Self::Type, name: &str, align: Align) -> Self::Value;
|
|
|
|
fn dynamic_alloca(&mut self, ty: Self::Type, name: &str, align: Align) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
fn array_alloca(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-08-22 16:57:31 +00:00
|
|
|
ty: Self::Type,
|
|
|
|
len: Self::Value,
|
2018-08-07 15:14:40 +00:00
|
|
|
name: &str,
|
2018-09-08 22:16:45 +00:00
|
|
|
align: Align,
|
2018-08-22 16:57:31 +00:00
|
|
|
) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-09-08 22:16:45 +00:00
|
|
|
fn load(&mut self, ptr: Self::Value, align: Align) -> Self::Value;
|
2018-10-05 13:08:49 +00:00
|
|
|
fn volatile_load(&mut self, ptr: Self::Value) -> Self::Value;
|
|
|
|
fn atomic_load(&mut self, ptr: Self::Value, order: AtomicOrdering, size: Size) -> Self::Value;
|
|
|
|
fn load_operand(&mut self, place: PlaceRef<'tcx, Self::Value>)
|
|
|
|
-> OperandRef<'tcx, Self::Value>;
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-10-05 13:08:49 +00:00
|
|
|
fn range_metadata(&mut self, load: Self::Value, range: Range<u128>);
|
|
|
|
fn nonnull_metadata(&mut self, load: Self::Value);
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-09-08 22:16:45 +00:00
|
|
|
fn store(&mut self, val: Self::Value, ptr: Self::Value, align: Align) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
fn store_with_flags(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-08-22 16:57:31 +00:00
|
|
|
val: Self::Value,
|
|
|
|
ptr: Self::Value,
|
2018-09-08 22:16:45 +00:00
|
|
|
align: Align,
|
2018-08-07 15:14:40 +00:00
|
|
|
flags: MemFlags,
|
2018-08-22 16:57:31 +00:00
|
|
|
) -> Self::Value;
|
2018-10-05 13:08:49 +00:00
|
|
|
fn atomic_store(
|
|
|
|
&mut self,
|
|
|
|
val: Self::Value,
|
|
|
|
ptr: Self::Value,
|
|
|
|
order: AtomicOrdering,
|
|
|
|
size: Size,
|
|
|
|
);
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-10-05 13:08:49 +00:00
|
|
|
fn gep(&mut self, ptr: Self::Value, indices: &[Self::Value]) -> Self::Value;
|
|
|
|
fn inbounds_gep(&mut self, ptr: Self::Value, indices: &[Self::Value]) -> Self::Value;
|
|
|
|
fn struct_gep(&mut self, ptr: Self::Value, idx: u64) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-10-05 13:08:49 +00:00
|
|
|
fn trunc(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
|
|
|
fn sext(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
|
|
|
fn fptoui(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
|
|
|
fn fptosi(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
|
|
|
fn uitofp(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
|
|
|
fn sitofp(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
|
|
|
fn fptrunc(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
|
|
|
fn fpext(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
|
|
|
fn ptrtoint(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
|
|
|
fn inttoptr(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
|
|
|
fn bitcast(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
|
|
|
fn intcast(&mut self, val: Self::Value, dest_ty: Self::Type, is_signed: bool) -> Self::Value;
|
|
|
|
fn pointercast(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-10-05 13:08:49 +00:00
|
|
|
fn icmp(&mut self, op: IntPredicate, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn fcmp(&mut self, op: RealPredicate, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-10-05 13:08:49 +00:00
|
|
|
fn empty_phi(&mut self, ty: Self::Type) -> Self::Value;
|
|
|
|
fn phi(
|
|
|
|
&mut self,
|
|
|
|
ty: Self::Type,
|
|
|
|
vals: &[Self::Value],
|
|
|
|
bbs: &[Self::BasicBlock],
|
|
|
|
) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
fn inline_asm_call(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-11-16 11:33:28 +00:00
|
|
|
asm: &CStr,
|
|
|
|
cons: &CStr,
|
2018-08-22 16:57:31 +00:00
|
|
|
inputs: &[Self::Value],
|
|
|
|
output: Self::Type,
|
2018-08-07 15:14:40 +00:00
|
|
|
volatile: bool,
|
|
|
|
alignstack: bool,
|
2018-09-13 12:58:19 +00:00
|
|
|
dia: AsmDialect,
|
2018-08-22 16:57:31 +00:00
|
|
|
) -> Option<Self::Value>;
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-09-13 12:58:19 +00:00
|
|
|
fn memcpy(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-09-13 12:58:19 +00:00
|
|
|
dst: Self::Value,
|
2018-09-08 22:16:45 +00:00
|
|
|
dst_align: Align,
|
2018-09-13 12:58:19 +00:00
|
|
|
src: Self::Value,
|
2018-09-08 22:16:45 +00:00
|
|
|
src_align: Align,
|
2018-09-13 12:58:19 +00:00
|
|
|
size: Self::Value,
|
|
|
|
flags: MemFlags,
|
|
|
|
);
|
|
|
|
fn memmove(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-09-13 12:58:19 +00:00
|
|
|
dst: Self::Value,
|
2018-09-08 22:16:45 +00:00
|
|
|
dst_align: Align,
|
2018-09-13 12:58:19 +00:00
|
|
|
src: Self::Value,
|
2018-09-08 22:16:45 +00:00
|
|
|
src_align: Align,
|
2018-09-13 12:58:19 +00:00
|
|
|
size: Self::Value,
|
|
|
|
flags: MemFlags,
|
|
|
|
);
|
2018-09-10 15:59:20 +00:00
|
|
|
fn memset(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-09-10 15:59:20 +00:00
|
|
|
ptr: Self::Value,
|
|
|
|
fill_byte: Self::Value,
|
|
|
|
size: Self::Value,
|
2018-09-08 22:16:45 +00:00
|
|
|
align: Align,
|
2018-09-10 15:59:20 +00:00
|
|
|
flags: MemFlags,
|
|
|
|
);
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-10-05 13:08:49 +00:00
|
|
|
fn minnum(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
|
|
|
fn maxnum(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
fn select(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-09-13 12:58:19 +00:00
|
|
|
cond: Self::Value,
|
2018-08-22 16:57:31 +00:00
|
|
|
then_val: Self::Value,
|
|
|
|
else_val: Self::Value,
|
|
|
|
) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-10-05 13:08:49 +00:00
|
|
|
fn va_arg(&mut self, list: Self::Value, ty: Self::Type) -> Self::Value;
|
|
|
|
fn extract_element(&mut self, vec: Self::Value, idx: Self::Value) -> Self::Value;
|
|
|
|
fn insert_element(
|
|
|
|
&mut self,
|
|
|
|
vec: Self::Value,
|
|
|
|
elt: Self::Value,
|
|
|
|
idx: Self::Value,
|
|
|
|
) -> Self::Value;
|
|
|
|
fn shuffle_vector(
|
|
|
|
&mut self,
|
|
|
|
v1: Self::Value,
|
|
|
|
v2: Self::Value,
|
|
|
|
mask: Self::Value,
|
|
|
|
) -> Self::Value;
|
|
|
|
fn vector_splat(&mut self, num_elts: usize, elt: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_fadd_fast(&mut self, acc: Self::Value, src: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_fmul_fast(&mut self, acc: Self::Value, src: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_add(&mut self, src: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_mul(&mut self, src: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_and(&mut self, src: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_or(&mut self, src: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_xor(&mut self, src: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_fmin(&mut self, src: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_fmax(&mut self, src: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_fmin_fast(&mut self, src: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_fmax_fast(&mut self, src: Self::Value) -> Self::Value;
|
|
|
|
fn vector_reduce_min(&mut self, src: Self::Value, is_signed: bool) -> Self::Value;
|
|
|
|
fn vector_reduce_max(&mut self, src: Self::Value, is_signed: bool) -> Self::Value;
|
|
|
|
fn extract_value(&mut self, agg_val: Self::Value, idx: u64) -> Self::Value;
|
|
|
|
fn insert_value(&mut self, agg_val: Self::Value, elt: Self::Value, idx: u64) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-10-05 13:08:49 +00:00
|
|
|
fn landing_pad(
|
|
|
|
&mut self,
|
|
|
|
ty: Self::Type,
|
|
|
|
pers_fn: Self::Value,
|
|
|
|
num_clauses: usize,
|
|
|
|
) -> Self::Value;
|
|
|
|
fn add_clause(&mut self, landing_pad: Self::Value, clause: Self::Value);
|
|
|
|
fn set_cleanup(&mut self, landing_pad: Self::Value);
|
|
|
|
fn resume(&mut self, exn: Self::Value) -> Self::Value;
|
|
|
|
fn cleanup_pad(&mut self, parent: Option<Self::Value>, args: &[Self::Value]) -> Self::Funclet;
|
|
|
|
fn cleanup_ret(
|
|
|
|
&mut self,
|
|
|
|
funclet: &Self::Funclet,
|
|
|
|
unwind: Option<Self::BasicBlock>,
|
|
|
|
) -> Self::Value;
|
|
|
|
fn catch_pad(&mut self, parent: Self::Value, args: &[Self::Value]) -> Self::Funclet;
|
|
|
|
fn catch_ret(&mut self, funclet: &Self::Funclet, unwind: Self::BasicBlock) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
fn catch_switch(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-08-22 16:57:31 +00:00
|
|
|
parent: Option<Self::Value>,
|
|
|
|
unwind: Option<Self::BasicBlock>,
|
2018-08-07 15:14:40 +00:00
|
|
|
num_handlers: usize,
|
2018-08-22 16:57:31 +00:00
|
|
|
) -> Self::Value;
|
2018-10-05 13:08:49 +00:00
|
|
|
fn add_handler(&mut self, catch_switch: Self::Value, handler: Self::BasicBlock);
|
|
|
|
fn set_personality_fn(&mut self, personality: Self::Value);
|
2018-08-07 15:14:40 +00:00
|
|
|
|
|
|
|
fn atomic_cmpxchg(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-08-22 16:57:31 +00:00
|
|
|
dst: Self::Value,
|
|
|
|
cmp: Self::Value,
|
|
|
|
src: Self::Value,
|
2018-08-07 15:14:40 +00:00
|
|
|
order: AtomicOrdering,
|
|
|
|
failure_order: AtomicOrdering,
|
2018-08-20 16:16:51 +00:00
|
|
|
weak: bool,
|
2018-08-22 16:57:31 +00:00
|
|
|
) -> Self::Value;
|
2018-08-07 15:14:40 +00:00
|
|
|
fn atomic_rmw(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-08-07 15:14:40 +00:00
|
|
|
op: AtomicRmwBinOp,
|
2018-08-22 16:57:31 +00:00
|
|
|
dst: Self::Value,
|
|
|
|
src: Self::Value,
|
2018-08-07 15:14:40 +00:00
|
|
|
order: AtomicOrdering,
|
2018-08-22 16:57:31 +00:00
|
|
|
) -> Self::Value;
|
2018-10-05 13:08:49 +00:00
|
|
|
fn atomic_fence(&mut self, order: AtomicOrdering, scope: SynchronizationScope);
|
|
|
|
fn add_case(&mut self, s: Self::Value, on_val: Self::Value, dest: Self::BasicBlock);
|
|
|
|
fn add_incoming_to_phi(&mut self, phi: Self::Value, val: Self::Value, bb: Self::BasicBlock);
|
|
|
|
fn set_invariant_load(&mut self, load: Self::Value);
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-09-24 15:35:39 +00:00
|
|
|
/// Returns the ptr value that should be used for storing `val`.
|
2018-10-05 13:08:49 +00:00
|
|
|
fn check_store(&mut self, val: Self::Value, ptr: Self::Value) -> Self::Value;
|
2018-09-24 15:35:39 +00:00
|
|
|
|
|
|
|
/// Returns the args that should be used for a call to `llfn`.
|
2018-08-07 15:14:40 +00:00
|
|
|
fn check_call<'b>(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-08-07 15:14:40 +00:00
|
|
|
typ: &str,
|
2018-08-22 16:57:31 +00:00
|
|
|
llfn: Self::Value,
|
2018-09-13 12:58:19 +00:00
|
|
|
args: &'b [Self::Value],
|
|
|
|
) -> Cow<'b, [Self::Value]>
|
|
|
|
where
|
|
|
|
[Self::Value]: ToOwned;
|
2018-11-24 15:36:41 +00:00
|
|
|
|
|
|
|
/// Called for `StorageLive`
|
2018-10-05 13:08:49 +00:00
|
|
|
fn lifetime_start(&mut self, ptr: Self::Value, size: Size);
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-11-24 15:36:41 +00:00
|
|
|
/// Called for `StorageDead`
|
|
|
|
fn lifetime_end(&mut self, ptr: Self::Value, size: Size);
|
2018-08-07 15:14:40 +00:00
|
|
|
|
2018-09-13 12:58:19 +00:00
|
|
|
fn call(
|
2018-10-05 13:08:49 +00:00
|
|
|
&mut self,
|
2018-09-13 12:58:19 +00:00
|
|
|
llfn: Self::Value,
|
|
|
|
args: &[Self::Value],
|
2018-11-13 10:51:42 +00:00
|
|
|
funclet: Option<&Self::Funclet>,
|
2018-09-13 12:58:19 +00:00
|
|
|
) -> Self::Value;
|
2018-10-05 13:08:49 +00:00
|
|
|
fn zext(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
2018-09-20 13:47:22 +00:00
|
|
|
|
2018-11-16 11:33:28 +00:00
|
|
|
unsafe fn delete_basic_block(&mut self, bb: Self::BasicBlock);
|
2018-10-05 13:08:49 +00:00
|
|
|
fn do_not_inline(&mut self, llret: Self::Value);
|
2018-08-07 15:14:40 +00:00
|
|
|
}
|