Optionally show annotations in final allocation/program dump based on RegallocOptions flag

This commit is contained in:
Chris Fallin
2021-05-19 16:36:36 -07:00
parent e1f67e860f
commit f1c6dfe807
3 changed files with 95 additions and 81 deletions

View File

@@ -1010,6 +1010,17 @@ impl std::fmt::Display for RegAllocError {
impl std::error::Error for RegAllocError {}
pub fn run<F: Function>(func: &F, env: &MachineEnv) -> Result<Output, RegAllocError> {
ion::run(func, env)
pub fn run<F: Function>(
func: &F,
env: &MachineEnv,
options: &RegallocOptions,
) -> Result<Output, RegAllocError> {
ion::run(func, env, options.verbose_log)
}
/// Options for allocation.
#[derive(Clone, Copy, Debug, Default)]
pub struct RegallocOptions {
/// Add extra verbosity to debug logs.
pub verbose_log: bool,
}