pub struct Cfg {
pub locals: Vec<Local>,
pub blocks: Vec<BasicBlock>,
pub labels: HashMap<LabelId, u32>,
pub shape: Option<Plan>,
}Expand description
A function body lowered into basic blocks.
Fields§
§locals: Vec<Local>Every local of the function, defined once at the top.
blocks: Vec<BasicBlock>The blocks, in the order they should be emitted; block 0 is the entry.
labels: HashMap<LabelId, u32>The number each label whose address was taken is given, from 1 up —
which is the value GNU’s &&label has, and the case of the computed
goto’s dispatch that enters it. See Labels as
values and ir::ExprKind::LabelAddr.
shape: Option<Plan>The structured form of the same graph, when there is one; see
reloop.
This is what codegen emits: loops, ifs and matches, with the state
machine below kept only for a graph the relooper gives up on.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cfg
impl RefUnwindSafe for Cfg
impl Send for Cfg
impl Sync for Cfg
impl Unpin for Cfg
impl UnsafeUnpin for Cfg
impl UnwindSafe for Cfg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more