WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit c00adcf3 authored by qinsoon's avatar qinsoon
Browse files

[wip] output original IR and final IR separately

parent d0bd8e72
......@@ -134,7 +134,7 @@ impl fmt::Debug for MuFunctionVersion {
write!(f, "Empty\n").unwrap();
}
if self.block_trace.is_some() {
write!(f, "{:?}\n", self.block_trace.as_ref().unwrap())
write!(f, "Block Trace: {:?}\n", self.block_trace.as_ref().unwrap())
} else {
write!(f, "Trace not available\n")
}
......
......@@ -35,15 +35,38 @@ impl CodeEmission {
// create emit directory
create_emit_directory(vm);
let mut file_path = path::PathBuf::new();
file_path.push(&vm.vm_options.flag_aot_emit_dir);
file_path.push(func.name().unwrap().to_string() + ".muir");
let mut file = match File::create(file_path.as_path()) {
Err(why) => panic!("couldn't create muir file {}: {}", file_path.to_str().unwrap(), why),
Ok(file) => file
};
// final IR
{
let mut file_path = path::PathBuf::new();
file_path.push(&vm.vm_options.flag_aot_emit_dir);
file_path.push(func.name().unwrap().to_string() + ".muir");
let mut file = match File::create(file_path.as_path()) {
Err(why) => panic!("couldn't create muir file {}: {}", file_path.to_str().unwrap(), why),
Ok(file) => file
};
file.write_fmt(format_args!("{:?}", func)).unwrap();
file.write_fmt(format_args!("{:?}", func)).unwrap();
}
// original IR (source/input)
{
let mut file_path = path::PathBuf::new();
file_path.push(&vm.vm_options.flag_aot_emit_dir);
file_path.push(func.name().unwrap().to_string() + "_orig.muir");
let mut file = match File::create(file_path.as_path()) {
Err(why) => panic!("couldn't create muir file {}: {}", file_path.to_str().unwrap(), why),
Ok(file) => file
};
file.write_fmt(format_args!("FuncVer {} of Func #{}\n", func.hdr, func.func_id)).unwrap();
file.write_fmt(format_args!("Signature: {}\n", func.sig)).unwrap();
file.write_fmt(format_args!("IR:\n")).unwrap();
if func.get_orig_ir().is_some() {
file.write_fmt(format_args!("{:?}\n", func.get_orig_ir().as_ref().unwrap())).unwrap();
} else {
file.write_fmt(format_args!("Empty\n")).unwrap();
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment