Remove optimize_function
It currently doesn't have any optimizations at all.
This commit is contained in:
parent
1cac888e43
commit
701b2747c3
2 changed files with 1 additions and 29 deletions
13
src/base.rs
13
src/base.rs
|
|
@ -148,7 +148,7 @@ fn compile_fn<'tcx>(
|
|||
) {
|
||||
let tcx = cx.tcx;
|
||||
|
||||
let mut clif_comments = codegened_func.clif_comments;
|
||||
let clif_comments = codegened_func.clif_comments;
|
||||
|
||||
// Store function in context
|
||||
let context = cached_context;
|
||||
|
|
@ -165,17 +165,6 @@ fn compile_fn<'tcx>(
|
|||
// invalidate it when it would change.
|
||||
context.domtree.clear();
|
||||
|
||||
// Perform rust specific optimizations
|
||||
tcx.sess.time("optimize clif ir", || {
|
||||
crate::optimize::optimize_function(
|
||||
tcx,
|
||||
module.isa(),
|
||||
codegened_func.instance,
|
||||
context,
|
||||
&mut clif_comments,
|
||||
);
|
||||
});
|
||||
|
||||
#[cfg(any())] // This is never true
|
||||
let _clif_guard = {
|
||||
use std::fmt::Write;
|
||||
|
|
|
|||
|
|
@ -1,20 +1,3 @@
|
|||
//! Various optimizations specific to cg_clif
|
||||
|
||||
use cranelift_codegen::isa::TargetIsa;
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
pub(crate) mod peephole;
|
||||
|
||||
pub(crate) fn optimize_function<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
isa: &dyn TargetIsa,
|
||||
instance: Instance<'tcx>,
|
||||
ctx: &mut Context,
|
||||
clif_comments: &mut crate::pretty_clif::CommentWriter,
|
||||
) {
|
||||
// FIXME classify optimizations over opt levels once we have more
|
||||
|
||||
crate::pretty_clif::write_clif_file(tcx, "preopt", isa, instance, &ctx.func, &*clif_comments);
|
||||
crate::base::verify_func(tcx, &*clif_comments, &ctx.func);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue