Compare commits

..

4 Commits

Author SHA1 Message Date
David Mak d5fb0ddfd9 meta: Allow specifying compiler arguments for check_demos 2023-09-18 11:28:59 +08:00
David Mak 14b9869cd1 artiq: Specify target CPU when creating LLVM target options
We can try to optimize for the host and Cortex-A9 chips; The RISC-V
ISAs do not target specific chips, so we will fallback to using the
generic CPU.
2023-09-18 11:28:59 +08:00
David Mak 1e6a4e4f59 standalone: Add command line flags for target properties
For testing codegen for different platforms on the host system.
2023-09-18 11:28:59 +08:00
David Mak 04e0e4c66b core: Switch to LLVM New Pass Manager 2023-09-18 11:28:58 +08:00
3 changed files with 5 additions and 8 deletions

View File

@ -662,8 +662,7 @@ impl Nac3 {
pass_options.set_merge_functions(true);
let result = main.run_passes("default<O3>", &target_machine, pass_options);
if let Err(err) = result {
println!("Failed to run optimization for module `main`\n{}", err.to_string());
panic!();
panic!("Failed to run optimization for module `main`\n{}", err.to_string());
}
link_fn(&main)

View File

@ -334,10 +334,9 @@ impl WorkerRegistry {
let result = module.run_passes(passes.as_str(), &target_machine, pass_options);
if let Err(err) = result {
println!("Failed to run optimization for module `{}`\n{}",
module.get_name().to_str().unwrap(),
err.to_string());
panic!();
panic!("Failed to run optimization for module `{}`\n{}",
module.get_name().to_str().unwrap(),
err.to_string());
}
if self.llvm_options.emit_llvm {

View File

@ -365,8 +365,7 @@ fn main() {
pass_options.set_merge_functions(true);
let result = main.run_passes("default<O3>", &target_machine, pass_options);
if let Err(err) = result {
println!("Failed to run optimization for module `main`\n{}", err.to_string());
panic!();
panic!("Failed to run optimization for module `main`\n{}", err.to_string());
}
target_machine