pub struct AssumeAlignmentOperation<'c> { /* private fields */ }
Expand description
An assume_alignment
operation. Assertion that gives alignment information to the input memref.
The assume_alignment
operation takes a memref and an integer of alignment
value, and internally annotates the buffer with the given alignment. If
the buffer isn’t aligned to the given alignment, the behavior is undefined.
This operation doesn’t affect the semantics of a correct program. It’s for optimization only, and the optimization is best-effort.
Implementations§
source§impl<'c> AssumeAlignmentOperation<'c>
impl<'c> AssumeAlignmentOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> AssumeAlignmentOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> AssumeAlignmentOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn memref(&self) -> Result<Value<'c, '_>, Error>
pub fn alignment(&self) -> Result<IntegerAttribute<'c>, Error>
pub fn set_alignment(&mut self, value: IntegerAttribute<'c>)
Trait Implementations§
source§impl<'c> From<AssumeAlignmentOperation<'c>> for Operation<'c>
impl<'c> From<AssumeAlignmentOperation<'c>> for Operation<'c>
source§fn from(operation: AssumeAlignmentOperation<'c>) -> Self
fn from(operation: AssumeAlignmentOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for AssumeAlignmentOperation<'c>
impl<'c> !Send for AssumeAlignmentOperation<'c>
impl<'c> !Sync for AssumeAlignmentOperation<'c>
impl<'c> Unpin for AssumeAlignmentOperation<'c>
impl<'c> UnwindSafe for AssumeAlignmentOperation<'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