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:
@@ -8,6 +8,7 @@ use isa;
|
||||
use packed_option::PackedOption;
|
||||
use std::result;
|
||||
use verifier::{Result, Error};
|
||||
use timing;
|
||||
|
||||
/// Verify that CPU flags are used correctly.
|
||||
///
|
||||
@@ -26,6 +27,7 @@ pub fn verify_flags(
|
||||
cfg: &ControlFlowGraph,
|
||||
isa: Option<&isa::TargetIsa>,
|
||||
) -> Result {
|
||||
let _tt = timing::verify_flags();
|
||||
let mut verifier = FlagsVerifier {
|
||||
func,
|
||||
cfg,
|
||||
|
||||
Reference in New Issue
Block a user