Skip to main content

Flags

Struct Flags 

Source
pub struct Flags {
    pub frame_pointer: bool,
    pub red_zone: bool,
    pub stack_clash: bool,
    pub landing: bool,
    pub profile: Profile,
    pub patch: Room,
    pub reorder: bool,
    pub reuse: bool,
    pub schedule: bool,
    pub accurate: Option<bool>,
}
Expand description

What the command line says about a frame, as opposed to what the machine says.

Fields§

§frame_pointer: bool

Whether every function keeps a frame pointer, which -fno-omit-frame-pointer asks for.

§red_zone: bool

Whether the red zone may be used, which -mno-red-zone and every kernel turns off.

§stack_clash: bool

Whether a frame is taken a page at a time, which -fstack-clash-protection asks for.

§landing: bool

Whether every address an indirect branch may arrive at opens with a landing pad, which -fcf-protection=branch asks for. That is every function, and every label of a function whose address the program took.

§profile: Profile

Whether every function calls a profiler on the way in, which -pg asks for.

§patch: Room

How much room every function opens with for a patcher, which -fpatchable-function-entry= asks for. See Room.

§reorder: bool

Whether the blocks are put in the order the weights say rather than in the order the shape of the graph says, which -freorder-blocks asks for and every level above -O0 turns on. See crate::layout.

§reuse: bool

Whether two things in the frame that are never both wanted may be the same bytes, which -fstack-reuse=none turns off. See crate::slots.

§schedule: bool

Whether the instructions of a block are put in the order the machine finishes soonest, which -fschedule-insns2 asks for and every level from -O2 turns on. See crate::schedule.

§accurate: Option<bool>

Whether the target’s timing model is believed about the machine’s units as well as about its latencies, which -Zcycle-accurate-model= says and the model itself answers otherwise.

None is a command line that did not say, which is nearly every one, and then the model’s own answer decides. It is here rather than only on the model because section 38.1 asks for a way to say the model is better or worse than it claims without editing the model, and because the measurement section 38.8 owes is the same corpus compiled both ways.

Trait Implementations§

Source§

impl Clone for Flags

Source§

fn clone(&self) -> Flags

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 Copy for Flags

Source§

impl Debug for Flags

Source§

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

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

impl Default for Flags

Source§

fn default() -> Self

No frame pointer, the red zone allowed, the frame taken in one subtraction, no landing pad, no profiling, no room for a patcher, the blocks in the order the graph’s shape gives, nothing in the frame sharing with anything and no scheduling, which is what a convention that has a red zone says at -O0 when nobody on the command line has said otherwise.

Source§

impl Eq for Flags

Source§

impl PartialEq for Flags

Source§

fn eq(&self, other: &Flags) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Flags

Auto Trait Implementations§

§

impl Freeze for Flags

§

impl RefUnwindSafe for Flags

§

impl Send for Flags

§

impl Sync for Flags

§

impl Unpin for Flags

§

impl UnsafeUnpin for Flags

§

impl UnwindSafe for Flags

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.