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)
| 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")] |