File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1313,6 +1313,7 @@ fn compile_iseq(iseq: IseqPtr) -> Option<Function> {
13131313 if !get_option ! ( disable_hir_opt) {
13141314 function. optimize ( ) ;
13151315 }
1316+ function. dump_hir ( ) ;
13161317 #[ cfg( debug_assertions) ]
13171318 if let Err ( err) = function. validate ( ) {
13181319 debug ! ( "ZJIT: compile_iseq: {err:?}" ) ;
Original file line number Diff line number Diff line change @@ -2143,7 +2143,10 @@ impl Function {
21432143 #[ cfg( debug_assertions) ] self . assert_validates ( ) ;
21442144 self . eliminate_dead_code ( ) ;
21452145 #[ cfg( debug_assertions) ] self . assert_validates ( ) ;
2146+ }
21462147
2148+ /// Dump HIR passed to codegen if specified by options.
2149+ pub fn dump_hir ( & self ) {
21472150 // Dump HIR after optimization
21482151 match get_option ! ( dump_hir_opt) {
21492152 Some ( DumpHIR :: WithoutSnapshot ) => println ! ( "Optimized HIR:\n {}" , FunctionPrinter :: without_snapshot( & self ) ) ,
@@ -2157,7 +2160,6 @@ impl Function {
21572160 }
21582161 }
21592162
2160-
21612163 /// Validates the following:
21622164 /// 1. Basic block jump args match parameter arity.
21632165 /// 2. Every terminator must be in the last position.
You can’t perform that action at this time.
0 commit comments