Make the CFG metadata computation conditional on a flag.

This commit is contained in:
Chris Fallin
2021-05-24 11:16:57 -07:00
parent 11a2ef01e7
commit 800cf25bb5
4 changed files with 49 additions and 22 deletions

View File

@@ -341,10 +341,16 @@ pub struct MachCompileResult {
/// Debug info: stackslots to stack pointer offsets.
pub stackslot_offsets: PrimaryMap<StackSlot, u32>,
/// Basic-block layout info: block start offsets.
///
/// This info is generated only if the `machine_code_cfg_info`
/// flag is set.
pub bb_starts: Vec<CodeOffset>,
/// Basic-block layout info: block edges. Each edge is `(from,
/// to)`, where `from` and `to` are basic-block start offsets of
/// the respective blocks.
///
/// This info is generated only if the `machine_code_cfg_info`
/// flag is set.
pub bb_edges: Vec<(CodeOffset, CodeOffset)>,
}