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>(
110
110
// Verify function
111
111
verify_func ( tcx, & clif_comments, & context. func ) ;
112
112
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
-
118
113
// If the return block is not reachable, then the SSA builder may have inserted an `iconst.i128`
119
114
// instruction, which doesn't have an encoding.
120
115
context. compute_cfg ( ) ;
@@ -125,10 +120,14 @@ pub(crate) fn codegen_fn<'tcx>(
125
120
// invalidate it when it would change.
126
121
context. domtree . clear ( ) ;
127
122
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
+ } ) ;
129
127
130
128
// Define function
131
129
tcx. sess . time ( "define function" , || {
130
+ context. want_disasm = crate :: pretty_clif:: should_write_ir ( tcx) ;
132
131
module
133
132
. define_function ( func_id, context, & mut NullTrapSink { } , & mut NullStackMapSink { } )
134
133
. unwrap ( )
You can’t perform that action at this time.
0 commit comments