Struct cretonne_codegen::ir::MemFlags
[−]
[src]
pub struct MemFlags { /* fields omitted */ }
Flags for memory operations like load/store.
Each of these flags introduce a limited form of undefined behavior. The flags each enable certain optimizations that need to make additional assumptions. Generally, the semantics of a program does not change when a flag is removed, but adding a flag will.
Methods
impl MemFlags
[src]
pub fn new() -> Self
[src]
Create a new empty set of flags.
pub fn set_by_name(&mut self, name: &str) -> bool
[src]
Set a flag bit by name.
Returns true if the flag was found and set, false for an unknown flag name.
pub fn notrap(self) -> bool
[src]
Test if the notrap
flag is set.
Normally, trapping is part of the semantics of a load/store operation. If the platform would cause a trap when accessing the effective address, the Cretonne memory operation is also required to trap.
The notrap
flag tells Cretonne that the memory is accessible, which means that
accesses will not trap. This makes it possible to delete an unused load or a dead store
instruction.
pub fn set_notrap(&mut self)
[src]
Set the notrap
flag.
pub fn aligned(self) -> bool
[src]
Test if the aligned
flag is set.
By default, Cretonne memory instructions work with any unaligned effective address. If the
aligned
flag is set, the instruction is permitted to trap or return a wrong result if the
effective address is misaligned.
pub fn set_aligned(&mut self)
[src]
Set the aligned
flag.
Trait Implementations
impl Clone for MemFlags
[src]
fn clone(&self) -> MemFlags
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for MemFlags
[src]
impl Debug for MemFlags
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Hash for MemFlags
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for MemFlags
[src]
fn eq(&self, __arg_0: &MemFlags) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &MemFlags) -> bool
[src]
This method tests for !=
.