Only record vreg definitions when fuzzing (#66)

The `vreg_def_blockparam` and `vreg_def_inst` fields on CFGInfo are only
used in `validate_ssa`, which in turn is only used in the ssagen fuzz
target.

Since these fields are never read in normal usage, initializing them is
entirely wasted effort. According to valgrind/DHAT, when running
`wasmtime compile` on the Sightglass Spidermonkey benchmark, removing
these fields saves about 100M instructions, 23k heap allocations
totalling 40MiB, and 47MiB of writes to the heap.
This commit is contained in:
Jamey Sharp
2022-07-29 10:25:27 -07:00
committed by GitHub
parent 0eb3deb384
commit 1955c6dfb5
4 changed files with 29 additions and 29 deletions

View File

@@ -6,6 +6,7 @@
//! Utilities for fuzzing.
pub mod func;
pub mod ssa;
// Re-exports for fuzz targets.
@@ -21,9 +22,6 @@ pub mod moves {
pub mod cfg {
pub use crate::cfg::*;
}
pub mod ssa {
pub use crate::ssa::*;
}
pub mod ion {
pub use crate::ion::*;
}