Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions zjit/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,7 @@ fn compile_iseq(iseq: IseqPtr) -> Option<Function> {
if !get_option!(disable_hir_opt) {
function.optimize();
}
function.dump_hir();
#[cfg(debug_assertions)]
if let Err(err) = function.validate() {
debug!("ZJIT: compile_iseq: {err:?}");
Expand Down
4 changes: 3 additions & 1 deletion zjit/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2143,7 +2143,10 @@ impl Function {
#[cfg(debug_assertions)] self.assert_validates();
self.eliminate_dead_code();
#[cfg(debug_assertions)] self.assert_validates();
}

/// Dump HIR passed to codegen if specified by options.
pub fn dump_hir(&self) {
// Dump HIR after optimization
match get_option!(dump_hir_opt) {
Some(DumpHIR::WithoutSnapshot) => println!("Optimized HIR:\n{}", FunctionPrinter::without_snapshot(&self)),
Expand All @@ -2157,7 +2160,6 @@ impl Function {
}
}


/// Validates the following:
/// 1. Basic block jump args match parameter arity.
/// 2. Every terminator must be in the last position.
Expand Down
Loading