Skip to main content

insts

Function insts 

Source
pub fn insts(
    func: &mut Func,
    timing: &TimingInsts,
    machine: &MachineInsts,
    flags: &FlagInsts,
    names: &Interner,
    accurate: bool,
    pinned: &HashSet<Inst>,
) -> Scheduled
Expand description

Puts each block’s instructions in the order the machine finishes soonest.

accurate is whether the unit counts in the model are worth holding an instruction back over, which is cycle-accurate-model of section 38.1. A model that is not cycle accurate is one whose latencies came out of a table and whose picture of the machine’s units is a summary, so the latencies are used to order and the units are not used to stall. See TimingInsts::accurate.

pinned is the instructions the caller needs left where they are. The block’s own last instruction is always one, and the caller adds the comparisons crate::layout is going to fuse with a branch, which have to stay next to the branch for the fusion to happen.