pub struct Block<'c> { /* private fields */ }Expand description
A block.
Implementations§
Trait Implementations§
Source§impl<'c> ArithBlockExt<'c> for Block<'c>
impl<'c> ArithBlockExt<'c> for Block<'c>
Source§fn addi(
&self,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn addi( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.addi operation.Source§fn andi(
&self,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn andi( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.andi operation.Source§fn divsi(
&self,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn divsi( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.divsi operation.Source§fn divui(
&self,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn divui( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.divui operation.Source§fn muli(
&self,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn muli( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.muli operation.Source§fn ori(
&self,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn ori( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.ori operation.Source§fn shli(
&self,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn shli( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.shli operation.Source§fn shrsi(
&self,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn shrsi( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.shrsi operation.Source§fn shrui(
&self,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn shrui( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.shrui operation.Source§fn subi(
&self,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn subi( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.subi operation.Source§fn xori(
&self,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn xori( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.xori operation.Source§fn cmpi(
&self,
context: &'c Context,
predicate: CmpiPredicate,
lhs: Value<'c, '_>,
rhs: Value<'c, '_>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn cmpi( &self, context: &'c Context, predicate: CmpiPredicate, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.cmpi operation.Source§fn extsi(
&self,
value: Value<'c, '_>,
target_type: Type<'c>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn extsi( &self, value: Value<'c, '_>, target_type: Type<'c>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.extui operation.Source§fn extui(
&self,
value: Value<'c, '_>,
target_type: Type<'c>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn extui( &self, value: Value<'c, '_>, target_type: Type<'c>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.extui operation.Source§fn trunci(
&self,
value: Value<'c, '_>,
target_type: Type<'c>,
location: Location<'c>,
) -> Result<Value<'c, '_>, Error>
fn trunci( &self, value: Value<'c, '_>, target_type: Type<'c>, location: Location<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
arith.extui operation.Source§impl<'c: 'a, 'a> BlockLike<'c, 'a> for Block<'c>
impl<'c: 'a, 'a> BlockLike<'c, 'a> for Block<'c>
Source§fn argument(&self, index: usize) -> Result<BlockArgument<'c, 'a>, Error>
fn argument(&self, index: usize) -> Result<BlockArgument<'c, 'a>, Error>
Returns an argument at a position.
Source§fn argument_count(&self) -> usize
fn argument_count(&self) -> usize
Returns a number of arguments.
Source§fn first_operation(&self) -> Option<OperationRef<'c, 'a>>
fn first_operation(&self) -> Option<OperationRef<'c, 'a>>
Returns a reference to the first operation.
Source§fn first_operation_mut(&self) -> Option<OperationRefMut<'c, 'a>>
fn first_operation_mut(&self) -> Option<OperationRefMut<'c, 'a>>
Returns a mutable reference to the first operation.
Source§fn terminator(&self) -> Option<OperationRef<'c, 'a>>
fn terminator(&self) -> Option<OperationRef<'c, 'a>>
Returns a reference to a terminator operation.
Source§fn terminator_mut(&self) -> Option<OperationRefMut<'c, 'a>>
fn terminator_mut(&self) -> Option<OperationRefMut<'c, 'a>>
Returns a mutable reference to a terminator operation.
Source§fn parent_region(&self) -> Option<RegionRef<'c, 'a>>
fn parent_region(&self) -> Option<RegionRef<'c, 'a>>
Returns a parent region.
Source§fn parent_operation(&self) -> Option<OperationRef<'c, 'a>>
fn parent_operation(&self) -> Option<OperationRef<'c, 'a>>
Returns a parent operation.
Source§fn add_argument(&self, type: Type<'c>, location: Location<'c>) -> Value<'c, 'a>
fn add_argument(&self, type: Type<'c>, location: Location<'c>) -> Value<'c, 'a>
Adds an argument.
Source§fn append_operation(&self, operation: Operation<'c>) -> OperationRef<'c, 'a>
fn append_operation(&self, operation: Operation<'c>) -> OperationRef<'c, 'a>
Appends an operation.
Source§fn insert_operation(
&self,
position: usize,
operation: Operation<'c>,
) -> OperationRef<'c, 'a>
fn insert_operation( &self, position: usize, operation: Operation<'c>, ) -> OperationRef<'c, 'a>
Inserts an operation.
Source§fn insert_operation_after(
&self,
one: OperationRef<'c, 'a>,
other: Operation<'c>,
) -> OperationRef<'c, 'a>
fn insert_operation_after( &self, one: OperationRef<'c, 'a>, other: Operation<'c>, ) -> OperationRef<'c, 'a>
Inserts an operation after another.
Source§fn insert_operation_before(
&self,
one: OperationRef<'c, 'a>,
other: Operation<'c>,
) -> OperationRef<'c, 'a>
fn insert_operation_before( &self, one: OperationRef<'c, 'a>, other: Operation<'c>, ) -> OperationRef<'c, 'a>
Inserts an operation before another.
Source§fn insert_argument(
&self,
index: usize,
type: Type<'c>,
location: Location<'c>,
) -> Value<'c, 'a>
fn insert_argument( &self, index: usize, type: Type<'c>, location: Location<'c>, ) -> Value<'c, 'a>
Inserts an argument at the given position. Read more
Source§unsafe fn erase_argument(&self, index: usize)
unsafe fn erase_argument(&self, index: usize)
Erases the argument at the given position. Read more
Source§fn successor_count(&self) -> usize
fn successor_count(&self) -> usize
Returns the number of successors.
Source§fn successor(&self, index: usize) -> Result<BlockRef<'c, 'a>, Error>
fn successor(&self, index: usize) -> Result<BlockRef<'c, 'a>, Error>
Returns a successor block at a position.
Source§fn predecessor_count(&self) -> usize
fn predecessor_count(&self) -> usize
Returns the number of predecessors.
Source§fn predecessor(&self, index: usize) -> Result<BlockRef<'c, 'a>, Error>
fn predecessor(&self, index: usize) -> Result<BlockRef<'c, 'a>, Error>
Returns a predecessor block at a position.
Source§fn next_in_region(&self) -> Option<BlockRef<'c, 'a>>
fn next_in_region(&self) -> Option<BlockRef<'c, 'a>>
Returns a next block in a region.
Source§impl<'c> BuiltinBlockExt<'c> for Block<'c>
impl<'c> BuiltinBlockExt<'c> for Block<'c>
Source§impl<'c> LlvmBlockExt<'c> for Block<'c>
impl<'c> LlvmBlockExt<'c> for Block<'c>
Source§fn extract_value(
&self,
context: &'c Context,
location: Location<'c>,
container: Value<'c, '_>,
value_type: Type<'c>,
index: usize,
) -> Result<Value<'c, '_>, Error>
fn extract_value( &self, context: &'c Context, location: Location<'c>, container: Value<'c, '_>, value_type: Type<'c>, index: usize, ) -> Result<Value<'c, '_>, Error>
Creates an
llvm.extractvalue operation.Source§fn insert_value(
&self,
context: &'c Context,
location: Location<'c>,
container: Value<'c, '_>,
value: Value<'c, '_>,
index: usize,
) -> Result<Value<'c, '_>, Error>
fn insert_value( &self, context: &'c Context, location: Location<'c>, container: Value<'c, '_>, value: Value<'c, '_>, index: usize, ) -> Result<Value<'c, '_>, Error>
Creates an
llvm.insertvalue operation.Source§fn insert_values<'block>(
&'block self,
context: &'c Context,
location: Location<'c>,
container: Value<'c, 'block>,
values: &[Value<'c, 'block>],
) -> Result<Value<'c, 'block>, Error>
fn insert_values<'block>( &'block self, context: &'c Context, location: Location<'c>, container: Value<'c, 'block>, values: &[Value<'c, 'block>], ) -> Result<Value<'c, 'block>, Error>
Creates an
llvm.insertvalue operation that insert multiple elements
into an aggregate from the first index.Source§fn store(
&self,
context: &'c Context,
location: Location<'c>,
addr: Value<'c, '_>,
value: Value<'c, '_>,
) -> Result<(), Error>
fn store( &self, context: &'c Context, location: Location<'c>, addr: Value<'c, '_>, value: Value<'c, '_>, ) -> Result<(), Error>
Creates an
llvm.store operation.Source§fn load(
&self,
context: &'c Context,
location: Location<'c>,
addr: Value<'c, '_>,
value_type: Type<'c>,
) -> Result<Value<'c, '_>, Error>
fn load( &self, context: &'c Context, location: Location<'c>, addr: Value<'c, '_>, value_type: Type<'c>, ) -> Result<Value<'c, '_>, Error>
Creates an
llvm.load operation.Source§fn memcpy(
&self,
context: &'c Context,
location: Location<'c>,
src: Value<'c, '_>,
dst: Value<'c, '_>,
len_bytes: Value<'c, '_>,
)
fn memcpy( &self, context: &'c Context, location: Location<'c>, src: Value<'c, '_>, dst: Value<'c, '_>, len_bytes: Value<'c, '_>, )
Creates an
llvm.memcpy operation.Source§fn alloca(
&self,
context: &'c Context,
location: Location<'c>,
element_type: Type<'c>,
element_count: Value<'c, '_>,
align: usize,
) -> Result<Value<'c, '_>, Error>
fn alloca( &self, context: &'c Context, location: Location<'c>, element_type: Type<'c>, element_count: Value<'c, '_>, align: usize, ) -> Result<Value<'c, '_>, Error>
Creates an
llvm.alloca operation.Source§fn alloca1(
&self,
context: &'c Context,
location: Location<'c>,
type: Type<'c>,
align: usize,
) -> Result<Value<'c, '_>, Error>
fn alloca1( &self, context: &'c Context, location: Location<'c>, type: Type<'c>, align: usize, ) -> Result<Value<'c, '_>, Error>
Creates an
llvm.alloca operation that allocates one element.impl Eq for Block<'_>
Auto Trait Implementations§
impl<'c> Freeze for Block<'c>
impl<'c> RefUnwindSafe for Block<'c>
impl<'c> !Send for Block<'c>
impl<'c> !Sync for Block<'c>
impl<'c> Unpin for Block<'c>
impl<'c> UnwindSafe for Block<'c>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more