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:
@@ -6,6 +6,7 @@ use ir::Function;
|
||||
use regalloc::liveness::Liveness;
|
||||
use regalloc::virtregs::VirtRegs;
|
||||
use std::cmp::Ordering;
|
||||
use timing;
|
||||
use verifier::Result;
|
||||
|
||||
/// Verify conventional SSA form for `func`.
|
||||
@@ -29,6 +30,7 @@ pub fn verify_cssa(
|
||||
liveness: &Liveness,
|
||||
virtregs: &VirtRegs,
|
||||
) -> Result {
|
||||
let _tt = timing::verify_cssa();
|
||||
let verifier = CssaVerifier {
|
||||
func,
|
||||
cfg,
|
||||
|
||||
Reference in New Issue
Block a user