cranelift_codegen::souper_harvest: Move preopt out of Context, into clif-util
This allows for more flexibility of when/where to harvest LHS candidates. For example, we could choose to harvest candidates that overlap with and supercede our current preopt peepholes. This commit also makes sure that we compute the CFG before running preopt, when harvesting LHS candidates via `clif-util souper-harvest`.
This commit is contained in:
@@ -457,10 +457,8 @@ impl Context {
|
||||
#[cfg(feature = "souper-harvest")]
|
||||
pub fn souper_harvest(
|
||||
&mut self,
|
||||
isa: &dyn TargetIsa,
|
||||
out: &mut std::sync::mpsc::Sender<String>,
|
||||
) -> CodegenResult<()> {
|
||||
self.preopt(isa)?;
|
||||
do_souper_harvest(&self.func, out);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user