pub(crate) type Builder<'a, 'll, 'tcx> = GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>;
Aliased Type§
struct Builder<'a, 'll, 'tcx> {
pub llbuilder: &'ll mut Builder<'ll>,
pub cx: &'a CodegenCx<'ll, 'tcx>,
}
Fields§
§llbuilder: &'ll mut Builder<'ll>
§cx: &'a CodegenCx<'ll, 'tcx>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
Implementations
Source§impl<'a, 'll, CX: Borrow<SimpleCx<'ll>>> GenericBuilder<'a, 'll, CX>
impl<'a, 'll, CX: Borrow<SimpleCx<'ll>>> GenericBuilder<'a, 'll, CX>
fn position_at_start(&mut self, llbb: &'ll BasicBlock)
Source§impl<'a, 'll, CX: Borrow<SimpleCx<'ll>>> GenericBuilder<'a, 'll, CX>
impl<'a, 'll, CX: Borrow<SimpleCx<'ll>>> GenericBuilder<'a, 'll, CX>
pub(crate) fn minnum(&mut self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value
pub(crate) fn maxnum(&mut self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value
pub(crate) fn insert_element( &mut self, vec: &'ll Value, elt: &'ll Value, idx: &'ll Value, ) -> &'ll Value
pub(crate) fn shuffle_vector( &mut self, v1: &'ll Value, v2: &'ll Value, mask: &'ll Value, ) -> &'ll Value
pub(crate) fn vector_reduce_fadd( &mut self, acc: &'ll Value, src: &'ll Value, ) -> &'ll Value
pub(crate) fn vector_reduce_fmul( &mut self, acc: &'ll Value, src: &'ll Value, ) -> &'ll Value
pub(crate) fn vector_reduce_fadd_reassoc( &mut self, acc: &'ll Value, src: &'ll Value, ) -> &'ll Value
pub(crate) fn vector_reduce_fmul_reassoc( &mut self, acc: &'ll Value, src: &'ll Value, ) -> &'ll Value
pub(crate) fn vector_reduce_add(&mut self, src: &'ll Value) -> &'ll Value
pub(crate) fn vector_reduce_mul(&mut self, src: &'ll Value) -> &'ll Value
pub(crate) fn vector_reduce_and(&mut self, src: &'ll Value) -> &'ll Value
pub(crate) fn vector_reduce_or(&mut self, src: &'ll Value) -> &'ll Value
pub(crate) fn vector_reduce_xor(&mut self, src: &'ll Value) -> &'ll Value
pub(crate) fn vector_reduce_fmin(&mut self, src: &'ll Value) -> &'ll Value
pub(crate) fn vector_reduce_fmax(&mut self, src: &'ll Value) -> &'ll Value
pub(crate) fn vector_reduce_min( &mut self, src: &'ll Value, is_signed: bool, ) -> &'ll Value
pub(crate) fn vector_reduce_max( &mut self, src: &'ll Value, is_signed: bool, ) -> &'ll Value
pub(crate) fn add_clause(&mut self, landing_pad: &'ll Value, clause: &'ll Value)
pub(crate) fn catch_ret( &mut self, funclet: &Funclet<'ll>, unwind: &'ll BasicBlock, ) -> &'ll Value
Source§impl<'a, 'll, CX: Borrow<SimpleCx<'ll>>> GenericBuilder<'a, 'll, CX>
impl<'a, 'll, CX: Borrow<SimpleCx<'ll>>> GenericBuilder<'a, 'll, CX>
Source§impl<'a, 'll, CX: Borrow<SimpleCx<'ll>>> GenericBuilder<'a, 'll, CX>
impl<'a, 'll, CX: Borrow<SimpleCx<'ll>>> GenericBuilder<'a, 'll, CX>
pub(crate) fn phi( &mut self, ty: &'ll Type, vals: &[&'ll Value], bbs: &[&'ll BasicBlock], ) -> &'ll Value
fn add_incoming_to_phi( &mut self, phi: &'ll Value, val: &'ll Value, bb: &'ll BasicBlock, )
Source§impl<'a, 'll, CX: Borrow<SimpleCx<'ll>>> GenericBuilder<'a, 'll, CX>
impl<'a, 'll, CX: Borrow<SimpleCx<'ll>>> GenericBuilder<'a, 'll, CX>
Source§impl<'a, 'll, 'tcx> GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
impl<'a, 'll, 'tcx> GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
Source§impl<'a, 'll, 'tcx> GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
impl<'a, 'll, 'tcx> GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
fn align_metadata(&mut self, load: &'ll Value, align: Align)
fn noundef_metadata(&mut self, load: &'ll Value)
pub(crate) fn set_unpredictable(&mut self, inst: &'ll Value)
Source§impl<'a, 'll, 'tcx> GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
impl<'a, 'll, 'tcx> GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
Source§impl<'a, 'll, 'tcx> GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
impl<'a, 'll, 'tcx> GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
pub(crate) fn call_intrinsic( &mut self, intrinsic: &str, args: &[&'ll Value], ) -> &'ll Value
fn call_lifetime_intrinsic( &mut self, intrinsic: &str, ptr: &'ll Value, size: Size, )
Source§impl<'a, 'll, 'tcx> GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
impl<'a, 'll, 'tcx> GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
fn fptoint_sat( &mut self, signed: bool, val: &'ll Value, dest_ty: &'ll Type, ) -> &'ll Value
pub(crate) fn landing_pad( &mut self, ty: &'ll Type, pers_fn: &'ll Value, num_clauses: usize, ) -> &'ll Value
pub(crate) fn callbr( &mut self, llty: &'ll Type, fn_attrs: Option<&CodegenFnAttrs>, fn_abi: Option<&FnAbi<'tcx, Ty<'tcx>>>, llfn: &'ll Value, args: &[&'ll Value], default_dest: &'ll BasicBlock, indirect_dest: &[&'ll BasicBlock], funclet: Option<&Funclet<'ll>>, instance: Option<Instance<'tcx>>, ) -> &'ll Value
fn cfi_type_test( &mut self, fn_attrs: Option<&CodegenFnAttrs>, fn_abi: Option<&FnAbi<'tcx, Ty<'tcx>>>, instance: Option<Instance<'tcx>>, llfn: &'ll Value, )
fn kcfi_operand_bundle( &mut self, fn_attrs: Option<&CodegenFnAttrs>, fn_abi: Option<&FnAbi<'tcx, Ty<'tcx>>>, instance: Option<Instance<'tcx>>, llfn: &'ll Value, ) -> Option<OperandBundleOwned<'ll>>
Sourcepub(crate) fn instrprof_increment(
&mut self,
fn_name: &'ll Value,
hash: &'ll Value,
num_counters: &'ll Value,
index: &'ll Value,
)
pub(crate) fn instrprof_increment( &mut self, fn_name: &'ll Value, hash: &'ll Value, num_counters: &'ll Value, index: &'ll Value, )
Emits a call to llvm.instrprof.increment
. Used by coverage instrumentation.
Sourcepub(crate) fn mcdc_parameters(
&mut self,
fn_name: &'ll Value,
hash: &'ll Value,
bitmap_bits: &'ll Value,
)
pub(crate) fn mcdc_parameters( &mut self, fn_name: &'ll Value, hash: &'ll Value, bitmap_bits: &'ll Value, )
Emits a call to llvm.instrprof.mcdc.parameters
.
This doesn’t produce any code directly, but is used as input by the LLVM pass that handles coverage instrumentation.
(See clang’s CodeGenPGO::emitMCDCParameters
for comparison.)
pub(crate) fn mcdc_tvbitmap_update( &mut self, fn_name: &'ll Value, hash: &'ll Value, bitmap_index: &'ll Value, mcdc_temp: &'ll Value, )
pub(crate) fn mcdc_condbitmap_reset(&mut self, mcdc_temp: &'ll Value)
pub(crate) fn mcdc_condbitmap_update( &mut self, cond_index: &'ll Value, mcdc_temp: &'ll Value, )
Trait Implementations
Source§impl<'tcx> AbiBuilderMethods<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
impl<'tcx> AbiBuilderMethods<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
Source§impl<'ll, 'tcx> ArgAbiBuilderMethods<'tcx> for GenericBuilder<'_, 'll, CodegenCx<'ll, 'tcx>>
impl<'ll, 'tcx> ArgAbiBuilderMethods<'tcx> for GenericBuilder<'_, 'll, CodegenCx<'ll, 'tcx>>
fn store_fn_arg( &mut self, arg_abi: &ArgAbi<'tcx, Ty<'tcx>>, idx: &mut usize, dst: PlaceRef<'tcx, Self::Value>, )
fn store_arg( &mut self, arg_abi: &ArgAbi<'tcx, Ty<'tcx>>, val: &'ll Value, dst: PlaceRef<'tcx, &'ll Value>, )
fn arg_memory_ty(&self, arg_abi: &ArgAbi<'tcx, Ty<'tcx>>) -> &'ll Type
Source§impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for GenericBuilder<'_, 'll, CodegenCx<'ll, 'tcx>>
impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for GenericBuilder<'_, 'll, CodegenCx<'ll, 'tcx>>
Source§fn codegen_inline_asm(
&mut self,
template: &[InlineAsmTemplatePiece],
operands: &[InlineAsmOperandRef<'tcx, Self>],
options: InlineAsmOptions,
line_spans: &[Span],
instance: Instance<'_>,
dest: Option<Self::BasicBlock>,
catch_funclet: Option<(Self::BasicBlock, Option<&Self::Funclet>)>,
)
fn codegen_inline_asm( &mut self, template: &[InlineAsmTemplatePiece], operands: &[InlineAsmOperandRef<'tcx, Self>], options: InlineAsmOptions, line_spans: &[Span], instance: Instance<'_>, dest: Option<Self::BasicBlock>, catch_funclet: Option<(Self::BasicBlock, Option<&Self::Funclet>)>, )
Take an inline assembly expression and splat it out via LLVM
Source§impl<'ll, 'tcx> BackendTypes for GenericBuilder<'_, 'll, CodegenCx<'ll, 'tcx>>
impl<'ll, 'tcx> BackendTypes for GenericBuilder<'_, 'll, CodegenCx<'ll, 'tcx>>
type Value = &'ll Value
type Metadata = &'ll Metadata
type Function = &'ll Value
type BasicBlock = &'ll BasicBlock
type Type = &'ll Type
type Funclet = Funclet<'ll>
type DIScope = &'ll Metadata
type DILocation = &'ll Metadata
type DIVariable = &'ll Metadata
Source§impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for GenericBuilder<'a, 'll, CodegenCx<'ll, 'tcx>>
type CodegenCx = CodegenCx<'ll, 'tcx>
fn build(cx: &'a CodegenCx<'ll, 'tcx>, llbb: &'ll BasicBlock) -> Self
fn cx(&self) -> &CodegenCx<'ll, 'tcx>
fn llbb(&self) -> &'ll BasicBlock
fn set_span(&mut self, _span: Span)
fn append_block( cx: &'a CodegenCx<'ll, 'tcx>, llfn: &'ll Value, name: &str, ) -> &'ll BasicBlock
fn append_sibling_block(&mut self, name: &str) -> &'ll BasicBlock
fn switch_to_block(&mut self, llbb: Self::BasicBlock)
fn ret_void(&mut self)
fn ret(&mut self, v: &'ll Value)
fn br(&mut self, dest: &'ll BasicBlock)
fn cond_br( &mut self, cond: &'ll Value, then_llbb: &'ll BasicBlock, else_llbb: &'ll BasicBlock, )
fn switch( &mut self, v: &'ll Value, else_llbb: &'ll BasicBlock, cases: impl ExactSizeIterator<Item = (u128, &'ll BasicBlock)>, )
fn switch_with_weights( &mut self, v: Self::Value, else_llbb: Self::BasicBlock, else_is_cold: bool, cases: impl ExactSizeIterator<Item = (u128, Self::BasicBlock, bool)>, )
fn invoke( &mut self, llty: &'ll Type, fn_attrs: Option<&CodegenFnAttrs>, fn_abi: Option<&FnAbi<'tcx, Ty<'tcx>>>, llfn: &'ll Value, args: &[&'ll Value], then: &'ll BasicBlock, catch: &'ll BasicBlock, funclet: Option<&Funclet<'ll>>, instance: Option<Instance<'tcx>>, ) -> &'ll Value
fn unreachable(&mut self)
fn add(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn fadd(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn sub(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn fsub(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn mul(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn fmul(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn udiv(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn exactudiv(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn sdiv(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn exactsdiv(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn fdiv(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn urem(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn srem(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn frem(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
Source§fn shl(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn shl(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
Generate a left-shift. Both operands must have the same size. The right operand must be
interpreted as unsigned and can be assumed to be less than the size of the left operand.
Source§fn lshr(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn lshr(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
Generate a logical right-shift. Both operands must have the same size. The right operand
must be interpreted as unsigned and can be assumed to be less than the size of the left
operand.
Source§fn ashr(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn ashr(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
Generate an arithmetic right-shift. Both operands must have the same size. The right operand
must be interpreted as unsigned and can be assumed to be less than the size of the left
operand.
fn and(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn or(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn xor(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn neg(&mut self, x: &'ll Value) -> &'ll Value
fn fneg(&mut self, x: &'ll Value) -> &'ll Value
fn not(&mut self, x: &'ll Value) -> &'ll Value
fn unchecked_sadd(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn unchecked_uadd(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn unchecked_ssub(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn unchecked_usub(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn unchecked_smul(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn unchecked_umul(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn unchecked_suadd(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn unchecked_susub(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn unchecked_sumul(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
Source§fn or_disjoint(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
fn or_disjoint(&mut self, a: &'ll Value, b: &'ll Value) -> &'ll Value
Defaults to
Self::or
, but guarantees (lhs & rhs) == 0
so some backends
can emit something more helpful for optimizations.fn fadd_fast(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn fsub_fast(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn fmul_fast(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn fdiv_fast(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn frem_fast(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn fadd_algebraic(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn fsub_algebraic(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn fmul_algebraic(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn fdiv_algebraic(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn frem_algebraic(&mut self, x: &'ll Value, y: &'ll Value) -> &'ll Value
fn checked_binop( &mut self, oop: OverflowOp, ty: Ty<'_>, lhs: Self::Value, rhs: Self::Value, ) -> (Self::Value, Self::Value)
fn from_immediate(&mut self, val: Self::Value) -> Self::Value
fn to_immediate_scalar( &mut self, val: Self::Value, scalar: Scalar, ) -> Self::Value
fn alloca(&mut self, size: Size, align: Align) -> &'ll Value
fn dynamic_alloca(&mut self, size: &'ll Value, align: Align) -> &'ll Value
fn load(&mut self, ty: &'ll Type, ptr: &'ll Value, align: Align) -> &'ll Value
fn volatile_load(&mut self, ty: &'ll Type, ptr: &'ll Value) -> &'ll Value
fn atomic_load( &mut self, ty: &'ll Type, ptr: &'ll Value, order: AtomicOrdering, size: Size, ) -> &'ll Value
fn load_operand( &mut self, place: PlaceRef<'tcx, &'ll Value>, ) -> OperandRef<'tcx, &'ll Value>
Source§fn write_operand_repeatedly(
&mut self,
cg_elem: OperandRef<'tcx, &'ll Value>,
count: u64,
dest: PlaceRef<'tcx, &'ll Value>,
)
fn write_operand_repeatedly( &mut self, cg_elem: OperandRef<'tcx, &'ll Value>, count: u64, dest: PlaceRef<'tcx, &'ll Value>, )
Called for Rvalue::Repeat when the elem is neither a ZST nor optimizable using memset.
fn range_metadata(&mut self, load: &'ll Value, range: WrappingRange)
fn nonnull_metadata(&mut self, load: &'ll Value)
fn store( &mut self, val: &'ll Value, ptr: &'ll Value, align: Align, ) -> &'ll Value
fn store_with_flags( &mut self, val: &'ll Value, ptr: &'ll Value, align: Align, flags: MemFlags, ) -> &'ll Value
fn atomic_store( &mut self, val: &'ll Value, ptr: &'ll Value, order: AtomicOrdering, size: Size, )
fn gep( &mut self, ty: &'ll Type, ptr: &'ll Value, indices: &[&'ll Value], ) -> &'ll Value
fn inbounds_gep( &mut self, ty: &'ll Type, ptr: &'ll Value, indices: &[&'ll Value], ) -> &'ll Value
fn inbounds_nuw_gep( &mut self, ty: &'ll Type, ptr: &'ll Value, indices: &[&'ll Value], ) -> &'ll Value
fn trunc(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
Source§fn unchecked_utrunc(
&mut self,
val: &'ll Value,
dest_ty: &'ll Type,
) -> &'ll Value
fn unchecked_utrunc( &mut self, val: &'ll Value, dest_ty: &'ll Type, ) -> &'ll Value
Produces the same value as
Self::trunc
(and defaults to that),
but is UB unless the zero-extending the result can reproduce val
.Source§fn unchecked_strunc(
&mut self,
val: &'ll Value,
dest_ty: &'ll Type,
) -> &'ll Value
fn unchecked_strunc( &mut self, val: &'ll Value, dest_ty: &'ll Type, ) -> &'ll Value
Produces the same value as
Self::trunc
(and defaults to that),
but is UB unless the sign-extending the result can reproduce val
.fn sext(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn fptoui_sat(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn fptosi_sat(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn fptoui(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn fptosi(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn uitofp(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn sitofp(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn fptrunc(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn fpext(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn ptrtoint(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn inttoptr(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn bitcast(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn intcast( &mut self, val: &'ll Value, dest_ty: &'ll Type, is_signed: bool, ) -> &'ll Value
fn pointercast(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn icmp( &mut self, op: IntPredicate, lhs: &'ll Value, rhs: &'ll Value, ) -> &'ll Value
fn fcmp( &mut self, op: RealPredicate, lhs: &'ll Value, rhs: &'ll Value, ) -> &'ll Value
fn memcpy( &mut self, dst: &'ll Value, dst_align: Align, src: &'ll Value, src_align: Align, size: &'ll Value, flags: MemFlags, )
fn memmove( &mut self, dst: &'ll Value, dst_align: Align, src: &'ll Value, src_align: Align, size: &'ll Value, flags: MemFlags, )
fn memset( &mut self, ptr: &'ll Value, fill_byte: &'ll Value, size: &'ll Value, align: Align, flags: MemFlags, )
fn select( &mut self, cond: &'ll Value, then_val: &'ll Value, else_val: &'ll Value, ) -> &'ll Value
fn va_arg(&mut self, list: &'ll Value, ty: &'ll Type) -> &'ll Value
fn extract_element(&mut self, vec: &'ll Value, idx: &'ll Value) -> &'ll Value
fn vector_splat(&mut self, num_elts: usize, elt: &'ll Value) -> &'ll Value
fn extract_value(&mut self, agg_val: &'ll Value, idx: u64) -> &'ll Value
fn insert_value( &mut self, agg_val: &'ll Value, elt: &'ll Value, idx: u64, ) -> &'ll Value
fn set_personality_fn(&mut self, personality: &'ll Value)
fn cleanup_landing_pad( &mut self, pers_fn: &'ll Value, ) -> (&'ll Value, &'ll Value)
fn filter_landing_pad( &mut self, pers_fn: &'ll Value, ) -> (&'ll Value, &'ll Value)
fn resume(&mut self, exn0: &'ll Value, exn1: &'ll Value)
fn cleanup_pad( &mut self, parent: Option<&'ll Value>, args: &[&'ll Value], ) -> Funclet<'ll>
fn cleanup_ret( &mut self, funclet: &Funclet<'ll>, unwind: Option<&'ll BasicBlock>, )
fn catch_pad(&mut self, parent: &'ll Value, args: &[&'ll Value]) -> Funclet<'ll>
fn catch_switch( &mut self, parent: Option<&'ll Value>, unwind: Option<&'ll BasicBlock>, handlers: &[&'ll BasicBlock], ) -> &'ll Value
fn atomic_cmpxchg( &mut self, dst: &'ll Value, cmp: &'ll Value, src: &'ll Value, order: AtomicOrdering, failure_order: AtomicOrdering, weak: bool, ) -> (&'ll Value, &'ll Value)
fn atomic_rmw( &mut self, op: AtomicRmwBinOp, dst: &'ll Value, src: &'ll Value, order: AtomicOrdering, ) -> &'ll Value
fn atomic_fence(&mut self, order: AtomicOrdering, scope: SynchronizationScope)
fn set_invariant_load(&mut self, load: &'ll Value)
Source§fn lifetime_start(&mut self, ptr: &'ll Value, size: Size)
fn lifetime_start(&mut self, ptr: &'ll Value, size: Size)
Called for
StorageLive
Source§fn lifetime_end(&mut self, ptr: &'ll Value, size: Size)
fn lifetime_end(&mut self, ptr: &'ll Value, size: Size)
Called for
StorageDead
fn call( &mut self, llty: &'ll Type, fn_attrs: Option<&CodegenFnAttrs>, fn_abi: Option<&FnAbi<'tcx, Ty<'tcx>>>, llfn: &'ll Value, args: &[&'ll Value], funclet: Option<&Funclet<'ll>>, instance: Option<Instance<'tcx>>, ) -> &'ll Value
fn zext(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value
fn apply_attrs_to_cleanup_callsite(&mut self, llret: &'ll Value)
fn cond_br_with_expect( &mut self, cond: Self::Value, then_llbb: Self::BasicBlock, else_llbb: Self::BasicBlock, expect: Option<bool>, )
fn load_from_place( &mut self, ty: Self::Type, place: PlaceValue<Self::Value>, ) -> Self::Value
Source§fn assume_integer_range(
&mut self,
imm: Self::Value,
ty: Self::Type,
range: WrappingRange,
)
fn assume_integer_range( &mut self, imm: Self::Value, ty: Self::Type, range: WrappingRange, )
Source§fn assume_nonnull(&mut self, val: Self::Value)
fn assume_nonnull(&mut self, val: Self::Value)
fn store_to_place( &mut self, val: Self::Value, place: PlaceValue<Self::Value>, ) -> Self::Value
fn store_to_place_with_flags( &mut self, val: Self::Value, place: PlaceValue<Self::Value>, flags: MemFlags, ) -> Self::Value
fn ptradd(&mut self, ptr: Self::Value, offset: Self::Value) -> Self::Value
fn inbounds_ptradd( &mut self, ptr: Self::Value, offset: Self::Value, ) -> Self::Value
fn cast_float_to_int( &mut self, signed: bool, x: Self::Value, dest_ty: Self::Type, ) -> Self::Value
Source§fn typed_place_copy(
&mut self,
dst: PlaceValue<Self::Value>,
src: PlaceValue<Self::Value>,
layout: TyAndLayout<'tcx, Ty<'tcx>>,
)
fn typed_place_copy( &mut self, dst: PlaceValue<Self::Value>, src: PlaceValue<Self::Value>, layout: TyAndLayout<'tcx, Ty<'tcx>>, )
Typed copy for non-overlapping places. Read more
fn typed_place_copy_with_flags( &mut self, dst: PlaceValue<Self::Value>, src: PlaceValue<Self::Value>, layout: TyAndLayout<'tcx, Ty<'tcx>>, flags: MemFlags, )
Source§fn typed_place_swap(
&mut self,
left: PlaceValue<Self::Value>,
right: PlaceValue<Self::Value>,
layout: TyAndLayout<'tcx, Ty<'tcx>>,
)
fn typed_place_swap( &mut self, left: PlaceValue<Self::Value>, right: PlaceValue<Self::Value>, layout: TyAndLayout<'tcx, Ty<'tcx>>, )
Typed swap for non-overlapping places. Read more
Source§impl<'tcx> CoverageInfoBuilderMethods<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
impl<'tcx> CoverageInfoBuilderMethods<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
Source§fn init_coverage(&mut self, instance: Instance<'tcx>)
fn init_coverage(&mut self, instance: Instance<'tcx>)
Performs any start-of-function codegen needed for coverage instrumentation. Read more
Source§fn add_coverage(&mut self, instance: Instance<'tcx>, kind: &CoverageKind)
fn add_coverage(&mut self, instance: Instance<'tcx>, kind: &CoverageKind)
Handle the MIR coverage info in a backend-specific way. Read more
Source§impl<'ll> DebugInfoBuilderMethods for GenericBuilder<'_, 'll, CodegenCx<'ll, '_>>
impl<'ll> DebugInfoBuilderMethods for GenericBuilder<'_, 'll, CodegenCx<'ll, '_>>
fn dbg_var_addr( &mut self, dbg_var: &'ll DIVariable, dbg_loc: &'ll DILocation, variable_alloca: Self::Value, direct_offset: Size, indirect_offsets: &[Size], fragment: Option<Range<Size>>, )
fn set_dbg_loc(&mut self, dbg_loc: &'ll DILocation)
fn clear_dbg_loc(&mut self)
fn get_dbg_loc(&self) -> Option<&'ll DILocation>
fn insert_reference_to_gdb_debug_scripts_section_global(&mut self)
fn set_var_name(&mut self, value: &'ll Value, name: &str)
Source§impl<'ll, 'tcx> Deref for GenericBuilder<'_, 'll, CodegenCx<'ll, 'tcx>>
impl<'ll, 'tcx> Deref for GenericBuilder<'_, 'll, CodegenCx<'ll, 'tcx>>
Source§impl<'tcx> FnAbiOfHelpers<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
impl<'tcx> FnAbiOfHelpers<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
Source§fn handle_fn_abi_err(
&self,
err: FnAbiError<'tcx>,
span: Span,
fn_abi_request: FnAbiRequest<'tcx>,
) -> !
fn handle_fn_abi_err( &self, err: FnAbiError<'tcx>, span: Span, fn_abi_request: FnAbiRequest<'tcx>, ) -> !
Helper used for
fn_abi_of_*
, to adapt tcx.fn_abi_of_*(...)
into a
Self::FnAbiOfResult
(which does not need to be a Result<...>
). Read moreSource§type FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>
type FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>
The
&FnAbi
-wrapping type (or &FnAbi
itself), which will be
returned from fn_abi_of_*
(see also handle_fn_abi_err
).Source§impl HasDataLayout for GenericBuilder<'_, '_, CodegenCx<'_, '_>>
impl HasDataLayout for GenericBuilder<'_, '_, CodegenCx<'_, '_>>
fn data_layout(&self) -> &TargetDataLayout
Source§impl HasTargetSpec for GenericBuilder<'_, '_, CodegenCx<'_, '_>>
impl HasTargetSpec for GenericBuilder<'_, '_, CodegenCx<'_, '_>>
fn target_spec(&self) -> &Target
Source§impl<'tcx> HasTyCtxt<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
impl<'tcx> HasTyCtxt<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
Source§impl<'tcx> HasTypingEnv<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
impl<'tcx> HasTypingEnv<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
Source§impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for GenericBuilder<'_, 'll, CodegenCx<'ll, 'tcx>>
impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for GenericBuilder<'_, 'll, CodegenCx<'ll, 'tcx>>
Source§fn codegen_intrinsic_call(
&mut self,
instance: Instance<'tcx>,
fn_abi: &FnAbi<'tcx, Ty<'tcx>>,
args: &[OperandRef<'tcx, &'ll Value>],
llresult: &'ll Value,
span: Span,
) -> Result<(), Instance<'tcx>>
fn codegen_intrinsic_call( &mut self, instance: Instance<'tcx>, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, args: &[OperandRef<'tcx, &'ll Value>], llresult: &'ll Value, span: Span, ) -> Result<(), Instance<'tcx>>
Remember to add all intrinsics here, in
compiler/rustc_hir_analysis/src/check/mod.rs
,
and in library/core/src/intrinsics.rs
; if you need access to any LLVM intrinsics,
add them to compiler/rustc_codegen_llvm/src/context.rs
.
Returns Err
if another instance should be called instead. This is used to invoke
intrinsic default bodies in case an intrinsic is not implemented by the backend.fn abort(&mut self)
fn assume(&mut self, val: Self::Value)
fn expect(&mut self, cond: Self::Value, expected: bool) -> Self::Value
Source§fn type_test(
&mut self,
pointer: Self::Value,
typeid: Self::Metadata,
) -> Self::Value
fn type_test( &mut self, pointer: Self::Value, typeid: Self::Metadata, ) -> Self::Value
Trait method used to test whether a given pointer is associated with a type identifier.
Source§fn type_checked_load(
&mut self,
llvtable: &'ll Value,
vtable_byte_offset: u64,
typeid: &'ll Metadata,
) -> Self::Value
fn type_checked_load( &mut self, llvtable: &'ll Value, vtable_byte_offset: u64, typeid: &'ll Metadata, ) -> Self::Value
Trait method used to load a function while testing if it is associated with a type
identifier.
Source§impl<'tcx> LayoutOfHelpers<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
impl<'tcx> LayoutOfHelpers<'tcx> for GenericBuilder<'_, '_, CodegenCx<'_, 'tcx>>
Source§fn handle_layout_err(
&self,
err: LayoutError<'tcx>,
span: Span,
ty: Ty<'tcx>,
) -> !
fn handle_layout_err( &self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>, ) -> !
Helper used for
layout_of
, to adapt tcx.layout_of(...)
into a
Self::LayoutOfResult
(which does not need to be a Result<...>
). Read moreSource§type LayoutOfResult = TyAndLayout<'tcx, Ty<'tcx>>
type LayoutOfResult = TyAndLayout<'tcx, Ty<'tcx>>
The
TyAndLayout
-wrapping type (or TyAndLayout
itself), which will be
returned from layout_of
(see also handle_layout_err
).Source§fn layout_tcx_at_span(&self) -> Span
fn layout_tcx_at_span(&self) -> Span
Span
to use for tcx.at(span)
, from layout_of
.