MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / replace_redundant_loads

Method replace_redundant_loads

cranelift/codegen/src/context.rs:348–352  ·  view source on GitHub ↗

Replace all redundant loads with the known values in memory. These are loads whose values were already loaded by other loads earlier, as well as loads whose values were stored by a store instruction to the same instruction (so-called "store-to-load forwarding").

(&mut self)

Source from the content-addressed store, hash-verified

346 /// by a store instruction to the same instruction (so-called
347 /// "store-to-load forwarding").
348 pub fn replace_redundant_loads(&mut self) -> CodegenResult<()> {
349 let mut analysis = AliasAnalysis::new(&self.func, &self.domtree);
350 analysis.compute_and_update_aliases(&mut self.func);
351 Ok(())
352 }
353
354 /// Harvest candidate left-hand sides for superoptimization with Souper.
355 #[cfg(feature = "souper-harvest")]

Callers 1

runMethod · 0.80

Calls 3

OkFunction · 0.85
newFunction · 0.50

Tested by 1

runMethod · 0.64