bnjbvr opened PR #4481 from regalloc-verbose-logs-flag
to main
:
Instead of relying on the
log_enabled
check to decide whether to enable regalloc2 verbose logs, I propose to use an explicit Cranelift flag to do that, as it's more explicit and allows downstream users to use thelog::trace!()
level without suffering from a big performance penalty.The flag is disabled by default, because I assume this is only useful when debugging regalloc2 or understanding the decisions it took during register allocation.
As a matter of fact, in our embedding where we enable the
Trace
level to get all logs (and filter them selectively in sometracing
subscribers), this is a 32% compile time speedup when compiling a large module in parallel on my machine.
cfallin submitted PR review.
cfallin has enabled auto merge for PR #4481.
bnjbvr updated PR #4481 from regalloc-verbose-logs-flag
to main
.
cfallin merged PR #4481.
Last updated: Nov 22 2024 at 17:03 UTC