1
0
forked from M-Labs/nac3

standalone: DEBUG_STANDALONE_DUMP_IR

This commit is contained in:
lyken 2024-07-11 16:23:04 +08:00
parent d658d9b00e
commit 600acc8e5e

View File

@ -449,6 +449,11 @@ fn main() {
.create_target_machine(llvm_options.opt_level)
.expect("couldn't create target machine");
// Debug print if DEBUG_STANDALONE_DUMP_IR is defined
if std::env::var("DEBUG_STANDALONE_DUMP_IR").is_ok() {
main.print_to_file("standalone.ll").unwrap();
}
let pass_options = PassBuilderOptions::create();
pass_options.set_merge_functions(true);
let passes = format!("default<O{}>", opt_level as u32);