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: boolWhether every function keeps a frame pointer, which -fno-omit-frame-pointer asks for.
red_zone: boolWhether the red zone may be used, which -mno-red-zone and every kernel turns off.
stack_clash: boolWhether a frame is taken a page at a time, which -fstack-clash-protection asks for.
landing: boolWhether 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: ProfileWhether every function calls a profiler on the way in, which -pg asks for.
patch: RoomHow much room every function opens with for a patcher, which
-fpatchable-function-entry= asks for. See Room.
reorder: boolWhether 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: boolWhether 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: boolWhether 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§
impl Copy for Flags
Source§impl Default for Flags
impl Default for Flags
Source§fn default() -> Self
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.