[−][src]Enum cranelift_codegen::ir::GlobalValueData
Information about a global value declaration.
Variants
VMContext
Value is the address of the VM context struct.
Load
Value is pointed to by another global value.
The base
global value is assumed to contain a pointer. This global value is computed
by loading from memory at that pointer value. The memory must be accessible, and
naturally aligned to hold a value of the type. The data at this address is assumed
to never change while the current function is executing.
Fields of Load
base: GlobalValue
The base pointer global value.
offset: Offset32
Offset added to the base pointer before doing the load.
global_type: Type
Type of the loaded value.
readonly: bool
Specifies whether the memory that this refers to is readonly, allowing for the elimination of redundant loads.
IAddImm
Value is an offset from another global value.
Fields of IAddImm
base: GlobalValue
The base pointer global value.
offset: Imm64
Byte offset to be added to the value.
global_type: Type
Type of the iadd.
Symbol
Value is symbolic, meaning it's a name which will be resolved to an actual value later (eg. by linking). Cranelift itself does not interpret this name; it's used by embedders to link with other data structures.
For now, symbolic values always have pointer type, and represent addresses, however in the future they could be used to represent other things as well.
Fields of Symbol
name: ExternalName
The symbolic name.
offset: Imm64
Offset from the symbol. This can be used instead of IAddImm to represent folding an offset into a symbol.
colocated: bool
Will this symbol be defined nearby, such that it will always be a certain distance away, after linking? If so, references to it can avoid going through a GOT. Note that symbols meant to be preemptible cannot be colocated.
Methods
impl GlobalValueData
[src]
pub fn symbol_name(&self) -> &ExternalName
[src]
Assume that self
is an GlobalValueData::Symbol
and return its name.
pub fn global_type(&self, isa: &dyn TargetIsa) -> Type
[src]
Return the type of this global.
Trait Implementations
impl Display for GlobalValueData
[src]
impl Clone for GlobalValueData
[src]
fn clone(&self) -> GlobalValueData
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl Send for GlobalValueData
impl Sync for GlobalValueData
impl Unpin for GlobalValueData
impl RefUnwindSafe for GlobalValueData
impl UnwindSafe for GlobalValueData
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,