Skip to main content

Body

Struct Body 

Source
pub struct Body {
    pub blocks: Vec<Block>,
    pub root: Option<NodeId>,
    pub matched: Vec<(String, NodeId)>,
    pub params: Vec<ParamAttrs>,
    pub ret_noundef: bool,
    pub ret_range: Option<(String, String)>,
    pub ret_nofpclass: u16,
    pub returns_value: bool,
}
Expand description

A program: the source or the target.

Fields§

§blocks: Vec<Block>

Its blocks; the first is the entry.

§root: Option<NodeId>

A transformation’s root: the instruction whose value the target must refine.

§matched: Vec<(String, NodeId)>

Registers besides the root, matched by position between the source and the target, with their names: the target’s must refine the source’s too (the transformation syntax: each register of the source that the target defines again, since the rewrite replaces it at its other uses).

§params: Vec<ParamAttrs>

The attributes this program declares on each input, in Transform::inputs order (the function syntax; empty in the transformation syntax). Each program sees an input through its own: a target that adds noundef or range to a parameter is checked with them, the source’s never apply to the target.

§ret_noundef: bool

noundef on the return value: returning poison is undefined behavior.

§ret_range: Option<(String, String)>

range(ty lo, hi) on the return value: outside it, the value is poison.

§ret_nofpclass: u16

nofpclass(…) on the return value: in those classes, the value is poison.

§returns_value: bool

Whether the program returns a value (a function returning void does not).

Trait Implementations§

Source§

impl Clone for Body

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Body

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Body

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Forget for Body

§

impl Freeze for Body

§

impl Move for Body

§

impl RefUnwindSafe for Body

§

impl Send for Body

§

impl Sync for Body

§

impl Unpin for Body

§

impl UnsafeUnpin for Body

§

impl UnwindSafe for Body

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.