Partially rewrite the constant-phi-nodes pass to make it more idiomatic (#4111)

* Add [must_use] to the timer functions

And remove unused vcode_post_ra function

* Make remove-constant-phis code more idiomatic
This commit is contained in:
Benjamin Bouvier
2022-05-09 19:22:34 +02:00
committed by GitHub
parent 4e6f3ea899
commit 8bd507db65
2 changed files with 60 additions and 52 deletions

View File

@@ -29,6 +29,7 @@ macro_rules! define_passes {
$(
#[doc=$desc]
#[must_use]
pub fn $pass() -> TimingToken {
details::start_pass($enum::$pass)
}
@@ -40,6 +41,8 @@ macro_rules! define_passes {
define_passes! {
Pass, NUM_PASSES, DESCRIPTIONS;
// All these are used in other crates but defined here so they appear in the unified
// `PassTimes` output.
process_file: "Processing test file",
parse_text: "Parsing textual Cranelift IR",
wasm_translate_module: "Translate WASM module",
@@ -60,7 +63,6 @@ define_passes! {
remove_constant_phis: "Remove constant phi-nodes",
vcode_lower: "VCode lowering",
vcode_post_ra: "VCode post-register allocation finalization",
vcode_emit: "VCode emission",
vcode_emit_finish: "VCode emission finalization",