File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -110,11 +110,6 @@ pub(crate) fn codegen_fn<'tcx>(
110110 // Verify function
111111 verify_func ( tcx, & clif_comments, & context. func ) ;
112112
113- // Perform rust specific optimizations
114- tcx. sess . time ( "optimize clif ir" , || {
115- crate :: optimize:: optimize_function ( tcx, instance, context, & mut clif_comments) ;
116- } ) ;
117-
118113 // If the return block is not reachable, then the SSA builder may have inserted an `iconst.i128`
119114 // instruction, which doesn't have an encoding.
120115 context. compute_cfg ( ) ;
@@ -125,10 +120,14 @@ pub(crate) fn codegen_fn<'tcx>(
125120 // invalidate it when it would change.
126121 context. domtree . clear ( ) ;
127122
128- context. want_disasm = crate :: pretty_clif:: should_write_ir ( tcx) ;
123+ // Perform rust specific optimizations
124+ tcx. sess . time ( "optimize clif ir" , || {
125+ crate :: optimize:: optimize_function ( tcx, instance, context, & mut clif_comments) ;
126+ } ) ;
129127
130128 // Define function
131129 tcx. sess . time ( "define function" , || {
130+ context. want_disasm = crate :: pretty_clif:: should_write_ir ( tcx) ;
132131 module
133132 . define_function ( func_id, context, & mut NullTrapSink { } , & mut NullStackMapSink { } )
134133 . unwrap ( )
You can’t perform that action at this time.
0 commit comments