Use associated types instead of type parameters inside the BuilderMethods trait
This commit is contained in:
parent
9c41e1aa10
commit
89825f2ef5
4 changed files with 355 additions and 361 deletions
|
@ -76,7 +76,6 @@ use rustc_data_structures::sync::Lrc;
|
||||||
use rustc_data_structures::indexed_vec::Idx;
|
use rustc_data_structures::indexed_vec::Idx;
|
||||||
|
|
||||||
use traits::{IntPredicate, RealPredicate, BuilderMethods};
|
use traits::{IntPredicate, RealPredicate, BuilderMethods};
|
||||||
use llvm::BasicBlock;
|
|
||||||
|
|
||||||
use std::any::Any;
|
use std::any::Any;
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
|
@ -390,9 +389,8 @@ pub fn call_assume(bx: &Builder<'_, 'll, '_>, val: &'ll Value) {
|
||||||
bx.call(assume_intrinsic, &[val], None);
|
bx.call(assume_intrinsic, &[val], None);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn from_immediate<'a, 'll: 'a, 'tcx: 'll,
|
pub fn from_immediate<'a, 'll: 'a, 'tcx: 'll>(
|
||||||
Builder: BuilderMethods<'a, 'll, 'tcx, Value, BasicBlock>>(
|
bx: &Builder<'_ ,'ll, '_, &'ll Value>,
|
||||||
bx: &Builder,
|
|
||||||
val: &'ll Value
|
val: &'ll Value
|
||||||
) -> &'ll Value {
|
) -> &'ll Value {
|
||||||
if val_ty(val) == Type::i1(bx.cx()) {
|
if val_ty(val) == Type::i1(bx.cx()) {
|
||||||
|
@ -424,9 +422,8 @@ pub fn to_immediate_scalar(
|
||||||
val
|
val
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn call_memcpy<'a, 'll: 'a, 'tcx: 'll,
|
pub fn call_memcpy<'a, 'll: 'a, 'tcx: 'll>(
|
||||||
Builder: BuilderMethods<'a, 'll, 'tcx, Value, BasicBlock>>(
|
bx: &Builder<'_ ,'ll, '_, &'ll Value>,
|
||||||
bx: &Builder,
|
|
||||||
dst: &'ll Value,
|
dst: &'ll Value,
|
||||||
dst_align: Align,
|
dst_align: Align,
|
||||||
src: &'ll Value,
|
src: &'ll Value,
|
||||||
|
@ -449,9 +446,8 @@ pub fn call_memcpy<'a, 'll: 'a, 'tcx: 'll,
|
||||||
bx.memcpy(dst_ptr, dst_align.abi(), src_ptr, src_align.abi(), size, volatile);
|
bx.memcpy(dst_ptr, dst_align.abi(), src_ptr, src_align.abi(), size, volatile);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn memcpy_ty<'a, 'll: 'a, 'tcx: 'll,
|
pub fn memcpy_ty<'a, 'll: 'a, 'tcx: 'll>(
|
||||||
Builder: BuilderMethods<'a, 'll, 'tcx, Value, BasicBlock>>(
|
bx: &Builder<'_ ,'ll, '_, &'ll Value>,
|
||||||
bx: &Builder,
|
|
||||||
dst: &'ll Value,
|
dst: &'ll Value,
|
||||||
dst_align: Align,
|
dst_align: Align,
|
||||||
src: &'ll Value,
|
src: &'ll Value,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -22,7 +22,6 @@ use type_::Type;
|
||||||
use glue;
|
use glue;
|
||||||
|
|
||||||
use traits::BuilderMethods;
|
use traits::BuilderMethods;
|
||||||
use llvm::BasicBlock;
|
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
|
@ -280,9 +279,7 @@ impl OperandValue<&'ll Value> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'll: 'a, 'tcx: 'll> OperandValue<&'ll Value> where
|
impl<'a, 'll: 'a, 'tcx: 'll> OperandValue<&'ll Value> {
|
||||||
Builder<'a, 'll, 'tcx>: BuilderMethods<'a, 'll, 'tcx, Value, BasicBlock>
|
|
||||||
{
|
|
||||||
pub fn nontemporal_store(
|
pub fn nontemporal_store(
|
||||||
self,
|
self,
|
||||||
bx: &Builder<'a, 'll, 'tcx>,
|
bx: &Builder<'a, 'll, 'tcx>,
|
||||||
|
@ -291,9 +288,9 @@ impl<'a, 'll: 'a, 'tcx: 'll> OperandValue<&'ll Value> where
|
||||||
self.store_with_flags(bx, dest, MemFlags::NONTEMPORAL);
|
self.store_with_flags(bx, dest, MemFlags::NONTEMPORAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn store_with_flags<Builder: BuilderMethods<'a, 'll, 'tcx, Value, BasicBlock>>(
|
fn store_with_flags(
|
||||||
self,
|
self,
|
||||||
bx: &Builder,
|
bx: &Builder<'a, 'll, 'tcx, &'ll Value>,
|
||||||
dest: PlaceRef<'tcx, &'ll Value>,
|
dest: PlaceRef<'tcx, &'ll Value>,
|
||||||
flags: MemFlags,
|
flags: MemFlags,
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use common::*;
|
use common::*;
|
||||||
use type_::Type;
|
|
||||||
use libc::c_char;
|
use libc::c_char;
|
||||||
use rustc::ty::TyCtxt;
|
use rustc::ty::TyCtxt;
|
||||||
use rustc::ty::layout::{Align, Size};
|
use rustc::ty::layout::{Align, Size};
|
||||||
|
@ -103,265 +102,265 @@ pub enum SynchronizationScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub trait BuilderMethods<'a, 'll :'a, 'tcx: 'll,
|
pub trait BuilderMethods<'a, 'll :'a, 'tcx: 'll> {
|
||||||
Value : ?Sized,
|
type Value;
|
||||||
BasicBlock: ?Sized
|
type BasicBlock;
|
||||||
> {
|
type Type;
|
||||||
|
|
||||||
fn new_block<'b>(
|
fn new_block<'b>(
|
||||||
cx: &'a CodegenCx<'ll, 'tcx>,
|
cx: &'a CodegenCx<'ll, 'tcx, Self::Value>,
|
||||||
llfn: &'ll Value,
|
llfn: Self::Value,
|
||||||
name: &'b str
|
name: &'b str
|
||||||
) -> Self;
|
) -> Self;
|
||||||
fn with_cx(cx: &'a CodegenCx<'ll, 'tcx>) -> Self;
|
fn with_cx(cx: &'a CodegenCx<'ll, 'tcx, Self::Value>) -> Self;
|
||||||
fn build_sibling_block<'b>(&self, name: &'b str) -> Self;
|
fn build_sibling_block<'b>(&self, name: &'b str) -> Self;
|
||||||
fn sess(&self) -> &Session;
|
fn sess(&self) -> &Session;
|
||||||
fn cx(&self) -> &'a CodegenCx<'ll, 'tcx>;
|
fn cx(&self) -> &'a CodegenCx<'ll, 'tcx, Self::Value>;
|
||||||
fn tcx(&self) -> TyCtxt<'a, 'tcx, 'tcx>;
|
fn tcx(&self) -> TyCtxt<'a, 'tcx, 'tcx>;
|
||||||
fn llfn(&self) -> &'ll Value;
|
fn llfn(&self) -> Self::Value;
|
||||||
fn llbb(&self) -> &'ll BasicBlock;
|
fn llbb(&self) -> Self::BasicBlock;
|
||||||
fn count_insn(&self, category: &str);
|
fn count_insn(&self, category: &str);
|
||||||
|
|
||||||
fn set_value_name(&self, value: &'ll Value, name: &str);
|
fn set_value_name(&self, value: Self::Value, name: &str);
|
||||||
fn position_at_end(&self, llbb: &'ll BasicBlock);
|
fn position_at_end(&self, llbb: Self::BasicBlock);
|
||||||
fn position_at_start(&self, llbb: &'ll BasicBlock);
|
fn position_at_start(&self, llbb: Self::BasicBlock);
|
||||||
fn ret_void(&self);
|
fn ret_void(&self);
|
||||||
fn ret(&self, v: &'ll Value);
|
fn ret(&self, v: Self::Value);
|
||||||
fn br(&self, dest: &'ll BasicBlock);
|
fn br(&self, dest: Self::BasicBlock);
|
||||||
fn cond_br(
|
fn cond_br(
|
||||||
&self,
|
&self,
|
||||||
cond: &'ll Value,
|
cond: Self::Value,
|
||||||
then_llbb: &'ll BasicBlock,
|
then_llbb: Self::BasicBlock,
|
||||||
else_llbb: &'ll BasicBlock,
|
else_llbb: Self::BasicBlock,
|
||||||
);
|
);
|
||||||
fn switch(
|
fn switch(
|
||||||
&self,
|
&self,
|
||||||
v: &'ll Value,
|
v: Self::Value,
|
||||||
else_llbb: &'ll BasicBlock,
|
else_llbb: Self::BasicBlock,
|
||||||
num_cases: usize,
|
num_cases: usize,
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn invoke(
|
fn invoke(
|
||||||
&self,
|
&self,
|
||||||
llfn: &'ll Value,
|
llfn: Self::Value,
|
||||||
args: &[&'ll Value],
|
args: &[Self::Value],
|
||||||
then: &'ll BasicBlock,
|
then: Self::BasicBlock,
|
||||||
catch: &'ll BasicBlock,
|
catch: Self::BasicBlock,
|
||||||
bundle: Option<&OperandBundleDef<'ll, &'ll Value>>
|
bundle: Option<&OperandBundleDef<'ll, Self::Value>>
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn unreachable(&self);
|
fn unreachable(&self);
|
||||||
fn add(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn add(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn fadd(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn fadd(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn fadd_fast(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn fadd_fast(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn sub(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn sub(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn fsub(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn fsub(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn fsub_fast(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn fsub_fast(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn mul(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn mul(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn fmul(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn fmul(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn fmul_fast(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn fmul_fast(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn udiv(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn udiv(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn exactudiv(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn exactudiv(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn sdiv(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn sdiv(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn exactsdiv(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn exactsdiv(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn fdiv(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn fdiv(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn fdiv_fast(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn fdiv_fast(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn urem(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn urem(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn srem(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn srem(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn frem(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn frem(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn frem_fast(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn frem_fast(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn shl(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn shl(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn lshr(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn lshr(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn ashr(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn ashr(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn and(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn and(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn or(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn or(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn xor(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn xor(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn neg(&self, v: &'ll Value) -> &'ll Value;
|
fn neg(&self, v: Self::Value) -> Self::Value;
|
||||||
fn fneg(&self, v: &'ll Value) -> &'ll Value;
|
fn fneg(&self, v: Self::Value) -> Self::Value;
|
||||||
fn not(&self, v: &'ll Value) -> &'ll Value;
|
fn not(&self, v: Self::Value) -> Self::Value;
|
||||||
|
|
||||||
fn alloca(&self, ty: &'ll Type, name: &str, align: Align) -> &'ll Value;
|
fn alloca(&self, ty: Self::Type, name: &str, align: Align) -> Self::Value;
|
||||||
fn dynamic_alloca(&self, ty: &'ll Type, name: &str, align: Align) -> &'ll Value;
|
fn dynamic_alloca(&self, ty: Self::Type, name: &str, align: Align) -> Self::Value;
|
||||||
fn array_alloca(
|
fn array_alloca(
|
||||||
&self,
|
&self,
|
||||||
ty: &'ll Type,
|
ty: Self::Type,
|
||||||
len: &'ll Value,
|
len: Self::Value,
|
||||||
name: &str,
|
name: &str,
|
||||||
align: Align
|
align: Align
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
|
|
||||||
fn load(&self, ptr: &'ll Value, align: Align) -> &'ll Value;
|
fn load(&self, ptr: Self::Value, align: Align) -> Self::Value;
|
||||||
fn volatile_load(&self, ptr: &'ll Value) -> &'ll Value;
|
fn volatile_load(&self, ptr: Self::Value) -> Self::Value;
|
||||||
fn atomic_load(&self, ptr: &'ll Value, order: AtomicOrdering, size: Size) -> &'ll Value;
|
fn atomic_load(&self, ptr: Self::Value, order: AtomicOrdering, size: Size) -> Self::Value;
|
||||||
|
|
||||||
fn range_metadata(&self, load: &'ll Value, range: Range<u128>);
|
fn range_metadata(&self, load: Self::Value, range: Range<u128>);
|
||||||
fn nonnull_metadata(&self, load: &'ll Value);
|
fn nonnull_metadata(&self, load: Self::Value);
|
||||||
|
|
||||||
fn store(&self, val: &'ll Value, ptr: &'ll Value, align: Align) -> &'ll Value;
|
fn store(&self, val: Self::Value, ptr: Self::Value, align: Align) -> Self::Value;
|
||||||
fn store_with_flags(
|
fn store_with_flags(
|
||||||
&self,
|
&self,
|
||||||
val: &'ll Value,
|
val: Self::Value,
|
||||||
ptr: &'ll Value,
|
ptr: Self::Value,
|
||||||
align: Align,
|
align: Align,
|
||||||
flags: MemFlags,
|
flags: MemFlags,
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn atomic_store(
|
fn atomic_store(
|
||||||
&self,
|
&self,
|
||||||
val: &'ll Value,
|
val: Self::Value,
|
||||||
ptr: &'ll Value,
|
ptr: Self::Value,
|
||||||
order: AtomicOrdering,
|
order: AtomicOrdering,
|
||||||
size: Size
|
size: Size
|
||||||
);
|
);
|
||||||
|
|
||||||
fn gep(&self, ptr: &'ll Value, indices: &[&'ll Value]) -> &'ll Value;
|
fn gep(&self, ptr: Self::Value, indices: &[Self::Value]) -> Self::Value;
|
||||||
fn inbounds_gep(&self, ptr: &'ll Value, indices: &[&'ll Value]) -> &'ll Value;
|
fn inbounds_gep(&self, ptr: Self::Value, indices: &[Self::Value]) -> Self::Value;
|
||||||
fn struct_gep(&self, ptr: &'ll Value, idx: u64) -> &'ll Value;
|
fn struct_gep(&self, ptr: Self::Value, idx: u64) -> Self::Value;
|
||||||
|
|
||||||
fn trunc(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn trunc(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
fn sext(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn sext(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
fn fptoui(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn fptoui(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
fn fptosi(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn fptosi(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
fn uitofp(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn uitofp(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
fn sitofp(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn sitofp(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
fn fptrunc(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn fptrunc(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
fn fpext(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn fpext(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
fn ptrtoint(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn ptrtoint(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
fn inttoptr(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn inttoptr(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
fn bitcast(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn bitcast(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
fn intcast(&self, val: &'ll Value, dest_ty: &'ll Type, is_signed: bool) -> &'ll Value;
|
fn intcast(&self, val: Self::Value, dest_ty: Self::Type, is_signed: bool) -> Self::Value;
|
||||||
fn pointercast(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn pointercast(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
|
|
||||||
fn icmp(&self, op: IntPredicate, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn icmp(&self, op: IntPredicate, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn fcmp(&self, op: RealPredicate, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn fcmp(&self, op: RealPredicate, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
|
|
||||||
fn empty_phi(&self, ty: &'ll Type) -> &'ll Value;
|
fn empty_phi(&self, ty: Self::Type) -> Self::Value;
|
||||||
fn phi(&self, ty: &'ll Type, vals: &[&'ll Value], bbs: &[&'ll BasicBlock]) -> &'ll Value;
|
fn phi(&self, ty: Self::Type, vals: &[Self::Value], bbs: &[Self::BasicBlock]) -> Self::Value;
|
||||||
fn inline_asm_call(
|
fn inline_asm_call(
|
||||||
&self,
|
&self,
|
||||||
asm: *const c_char,
|
asm: *const c_char,
|
||||||
cons: *const c_char,
|
cons: *const c_char,
|
||||||
inputs: &[&'ll Value],
|
inputs: &[Self::Value],
|
||||||
output: &'ll Type,
|
output: Self::Type,
|
||||||
volatile: bool,
|
volatile: bool,
|
||||||
alignstack: bool,
|
alignstack: bool,
|
||||||
dia: AsmDialect
|
dia: AsmDialect
|
||||||
) -> Option<&'ll Value>;
|
) -> Option<Self::Value>;
|
||||||
|
|
||||||
|
|
||||||
fn memcpy(&self, dst: &'ll Value, dst_align: u64,
|
fn memcpy(&self, dst: Self::Value, dst_align: u64,
|
||||||
src: &'ll Value, src_align: u64,
|
src: Self::Value, src_align: u64,
|
||||||
size: &'ll Value, is_volatile: bool) -> &'ll Value;
|
size: Self::Value, is_volatile: bool) -> Self::Value;
|
||||||
fn memmove(&self, dst: &'ll Value, dst_align: u64,
|
fn memmove(&self, dst: Self::Value, dst_align: u64,
|
||||||
src: &'ll Value, src_align: u64,
|
src: Self::Value, src_align: u64,
|
||||||
size: &'ll Value, is_volatile: bool) -> &'ll Value;
|
size: Self::Value, is_volatile: bool) -> Self::Value;
|
||||||
|
|
||||||
fn minnum(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn minnum(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn maxnum(&self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value;
|
fn maxnum(&self, lhs: Self::Value, rhs: Self::Value) -> Self::Value;
|
||||||
fn select(
|
fn select(
|
||||||
&self, cond: &'ll Value,
|
&self, cond: Self::Value,
|
||||||
then_val: &'ll Value,
|
then_val: Self::Value,
|
||||||
else_val: &'ll Value,
|
else_val: Self::Value,
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
|
|
||||||
fn va_arg(&self, list: &'ll Value, ty: &'ll Type) -> &'ll Value;
|
fn va_arg(&self, list: Self::Value, ty: Self::Type) -> Self::Value;
|
||||||
fn extract_element(&self, vec: &'ll Value, idx: &'ll Value) -> &'ll Value;
|
fn extract_element(&self, vec: Self::Value, idx: Self::Value) -> Self::Value;
|
||||||
fn insert_element(
|
fn insert_element(
|
||||||
&self, vec: &'ll Value,
|
&self, vec: Self::Value,
|
||||||
elt: &'ll Value,
|
elt: Self::Value,
|
||||||
idx: &'ll Value,
|
idx: Self::Value,
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn shuffle_vector(&self, v1: &'ll Value, v2: &'ll Value, mask: &'ll Value) -> &'ll Value;
|
fn shuffle_vector(&self, v1: Self::Value, v2: Self::Value, mask: Self::Value) -> Self::Value;
|
||||||
fn vector_splat(&self, num_elts: usize, elt: &'ll Value) -> &'ll Value;
|
fn vector_splat(&self, num_elts: usize, elt: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_fadd_fast(&self, acc: &'ll Value, src: &'ll Value) -> &'ll Value;
|
fn vector_reduce_fadd_fast(&self, acc: Self::Value, src: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_fmul_fast(&self, acc: &'ll Value, src: &'ll Value) -> &'ll Value;
|
fn vector_reduce_fmul_fast(&self, acc: Self::Value, src: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_add(&self, src: &'ll Value) -> &'ll Value;
|
fn vector_reduce_add(&self, src: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_mul(&self, src: &'ll Value) -> &'ll Value;
|
fn vector_reduce_mul(&self, src: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_and(&self, src: &'ll Value) -> &'ll Value;
|
fn vector_reduce_and(&self, src: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_or(&self, src: &'ll Value) -> &'ll Value;
|
fn vector_reduce_or(&self, src: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_xor(&self, src: &'ll Value) -> &'ll Value;
|
fn vector_reduce_xor(&self, src: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_fmin(&self, src: &'ll Value) -> &'ll Value;
|
fn vector_reduce_fmin(&self, src: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_fmax(&self, src: &'ll Value) -> &'ll Value;
|
fn vector_reduce_fmax(&self, src: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_fmin_fast(&self, src: &'ll Value) -> &'ll Value;
|
fn vector_reduce_fmin_fast(&self, src: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_fmax_fast(&self, src: &'ll Value) -> &'ll Value;
|
fn vector_reduce_fmax_fast(&self, src: Self::Value) -> Self::Value;
|
||||||
fn vector_reduce_min(&self, src: &'ll Value, is_signed: bool) -> &'ll Value;
|
fn vector_reduce_min(&self, src: Self::Value, is_signed: bool) -> Self::Value;
|
||||||
fn vector_reduce_max(&self, src: &'ll Value, is_signed: bool) -> &'ll Value;
|
fn vector_reduce_max(&self, src: Self::Value, is_signed: bool) -> Self::Value;
|
||||||
fn extract_value(&self, agg_val: &'ll Value, idx: u64) -> &'ll Value;
|
fn extract_value(&self, agg_val: Self::Value, idx: u64) -> Self::Value;
|
||||||
fn insert_value(
|
fn insert_value(
|
||||||
&self,
|
&self,
|
||||||
agg_val: &'ll Value,
|
agg_val: Self::Value,
|
||||||
elt: &'ll Value,
|
elt: Self::Value,
|
||||||
idx: u64
|
idx: u64
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
|
|
||||||
fn landing_pad(
|
fn landing_pad(
|
||||||
&self,
|
&self,
|
||||||
ty: &'ll Type,
|
ty: Self::Type,
|
||||||
pers_fn: &'ll Value,
|
pers_fn: Self::Value,
|
||||||
num_clauses: usize
|
num_clauses: usize
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn add_clause(&self, landing_pad: &'ll Value, clause: &'ll Value);
|
fn add_clause(&self, landing_pad: Self::Value, clause: Self::Value);
|
||||||
fn set_cleanup(&self, landing_pad: &'ll Value);
|
fn set_cleanup(&self, landing_pad: Self::Value);
|
||||||
fn resume(&self, exn: &'ll Value) -> &'ll Value;
|
fn resume(&self, exn: Self::Value) -> Self::Value;
|
||||||
fn cleanup_pad(
|
fn cleanup_pad(
|
||||||
&self,
|
&self,
|
||||||
parent: Option<&'ll Value>,
|
parent: Option<Self::Value>,
|
||||||
args: &[&'ll Value]
|
args: &[Self::Value]
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn cleanup_ret(
|
fn cleanup_ret(
|
||||||
&self, cleanup: &'ll Value,
|
&self, cleanup: Self::Value,
|
||||||
unwind: Option<&'ll BasicBlock>,
|
unwind: Option<Self::BasicBlock>,
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn catch_pad(
|
fn catch_pad(
|
||||||
&self,
|
&self,
|
||||||
parent: &'ll Value,
|
parent: Self::Value,
|
||||||
args: &[&'ll Value]
|
args: &[Self::Value]
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn catch_ret(&self, pad: &'ll Value, unwind: &'ll BasicBlock) -> &'ll Value;
|
fn catch_ret(&self, pad: Self::Value, unwind: Self::BasicBlock) -> Self::Value;
|
||||||
fn catch_switch(
|
fn catch_switch(
|
||||||
&self,
|
&self,
|
||||||
parent: Option<&'ll Value>,
|
parent: Option<Self::Value>,
|
||||||
unwind: Option<&'ll BasicBlock>,
|
unwind: Option<Self::BasicBlock>,
|
||||||
num_handlers: usize,
|
num_handlers: usize,
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn add_handler(&self, catch_switch: &'ll Value, handler: &'ll BasicBlock);
|
fn add_handler(&self, catch_switch: Self::Value, handler: Self::BasicBlock);
|
||||||
fn set_personality_fn(&self, personality: &'ll Value);
|
fn set_personality_fn(&self, personality: Self::Value);
|
||||||
|
|
||||||
fn atomic_cmpxchg(
|
fn atomic_cmpxchg(
|
||||||
&self,
|
&self,
|
||||||
dst: &'ll Value,
|
dst: Self::Value,
|
||||||
cmp: &'ll Value,
|
cmp: Self::Value,
|
||||||
src: &'ll Value,
|
src: Self::Value,
|
||||||
order: AtomicOrdering,
|
order: AtomicOrdering,
|
||||||
failure_order: AtomicOrdering,
|
failure_order: AtomicOrdering,
|
||||||
weak: bool,
|
weak: bool,
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn atomic_rmw(
|
fn atomic_rmw(
|
||||||
&self,
|
&self,
|
||||||
op: AtomicRmwBinOp,
|
op: AtomicRmwBinOp,
|
||||||
dst: &'ll Value,
|
dst: Self::Value,
|
||||||
src: &'ll Value,
|
src: Self::Value,
|
||||||
order: AtomicOrdering,
|
order: AtomicOrdering,
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn atomic_fence(&self, order: AtomicOrdering, scope: SynchronizationScope);
|
fn atomic_fence(&self, order: AtomicOrdering, scope: SynchronizationScope);
|
||||||
fn add_case(&self, s: &'ll Value, on_val: &'ll Value, dest: &'ll BasicBlock);
|
fn add_case(&self, s: Self::Value, on_val: Self::Value, dest: Self::BasicBlock);
|
||||||
fn add_incoming_to_phi(&self, phi: &'ll Value, val: &'ll Value, bb: &'ll BasicBlock);
|
fn add_incoming_to_phi(&self, phi: Self::Value, val: Self::Value, bb: Self::BasicBlock);
|
||||||
fn set_invariant_load(&self, load: &'ll Value);
|
fn set_invariant_load(&self, load: Self::Value);
|
||||||
|
|
||||||
fn check_store(
|
fn check_store(
|
||||||
&self,
|
&self,
|
||||||
val: &'ll Value,
|
val: Self::Value,
|
||||||
ptr: &'ll Value
|
ptr: Self::Value
|
||||||
) -> &'ll Value;
|
) -> Self::Value;
|
||||||
fn check_call<'b>(
|
fn check_call<'b>(
|
||||||
&self,
|
&self,
|
||||||
typ: &str,
|
typ: &str,
|
||||||
llfn: &'ll Value,
|
llfn: Self::Value,
|
||||||
args: &'b [&'ll Value]
|
args: &'b [Self::Value]
|
||||||
) -> Cow<'b, [&'ll Value]>;
|
) -> Cow<'b, [Self::Value]> where [Self::Value] : ToOwned;
|
||||||
fn lifetime_start(&self, ptr: &'ll Value, size: Size);
|
fn lifetime_start(&self, ptr: Self::Value, size: Size);
|
||||||
fn lifetime_end(&self, ptr: &'ll Value, size: Size);
|
fn lifetime_end(&self, ptr: Self::Value, size: Size);
|
||||||
|
|
||||||
fn call_lifetime_intrinsic(&self, intrinsic: &str, ptr: &'ll Value, size: Size);
|
fn call_lifetime_intrinsic(&self, intrinsic: &str, ptr: Self::Value, size: Size);
|
||||||
|
|
||||||
fn call(&self, llfn: &'ll Value, args: &[&'ll Value],
|
fn call(&self, llfn: Self::Value, args: &[Self::Value],
|
||||||
bundle: Option<&OperandBundleDef<'ll, &'ll Value>>) -> &'ll Value;
|
bundle: Option<&OperandBundleDef<'ll, Self::Value>>) -> Self::Value;
|
||||||
fn zext(&self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value;
|
fn zext(&self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue