Add a compilation pass timing facility.
Individual compilation passes call the corresponding timing::*() function and hold on to their timing token while they run. This causes nested per-pass timing information to be recorded in thread-local storage. The --time-passes command line option prints a pass timing report to stdout.
This commit is contained in:
@@ -26,6 +26,7 @@ use regalloc::liveness::Liveness;
|
||||
use regalloc::pressure::Pressure;
|
||||
use regalloc::virtregs::VirtRegs;
|
||||
use std::fmt;
|
||||
use timing;
|
||||
use topo_order::TopoOrder;
|
||||
|
||||
/// Persistent data structures for the spilling pass.
|
||||
@@ -87,6 +88,7 @@ impl Spilling {
|
||||
topo: &mut TopoOrder,
|
||||
tracker: &mut LiveValueTracker,
|
||||
) {
|
||||
let _tt = timing::ra_spilling();
|
||||
dbg!("Spilling for:\n{}", func.display(isa));
|
||||
let reginfo = isa.register_info();
|
||||
let usable_regs = isa.allocatable_registers(func);
|
||||
|
||||
Reference in New Issue
Block a user