diff --git a/compiler/gen/src/llvm/build.rs b/compiler/gen/src/llvm/build.rs index 01e092a8d3..5822e06240 100644 --- a/compiler/gen/src/llvm/build.rs +++ b/compiler/gen/src/llvm/build.rs @@ -3035,6 +3035,18 @@ pub fn build_procedures_return_main<'a, 'ctx, 'env>( .unwrap() } +// Coming soon +// pub enum AliasAnalysisSolutions { +// NotAvailable, +// Available(morphic_lib::Solutions), +// } +// +// impl std::fmt::Debug for AliasAnalysisSolutions { +// fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +// write!(f, "AliasAnalysisSolutions {{}}") +// } +// } + fn build_procedures_help<'a, 'ctx, 'env>( env: &Env<'a, 'ctx, 'env>, opt_level: OptLevel, @@ -3044,6 +3056,20 @@ fn build_procedures_help<'a, 'ctx, 'env>( let mut layout_ids = roc_mono::layout::LayoutIds::default(); let mut scope = Scope::default(); + // Coming Soon + // + // if false { + // let it = state.procedures.iter().map(|x| x.1); + // + // match roc_mono::alias_analysis::spec_program(it) { + // Err(e) => panic!("Error in alias analysis: {:?}", e), + // Ok(solutions) => { + // state.alias_analysis_solutions = + // AliasAnalysisSolutions::Available(solutions) + // } + // } + // } + // Add all the Proc headers to the module. // We have to do this in a separate pass first, // because their bodies may reference each other. diff --git a/compiler/load/src/file.rs b/compiler/load/src/file.rs index cf9ff87acc..e1273e0335 100644 --- a/compiler/load/src/file.rs +++ b/compiler/load/src/file.rs @@ -706,7 +706,6 @@ pub struct MonomorphizedModule<'a> { pub type_problems: MutMap>, pub mono_problems: MutMap>, pub procedures: MutMap<(Symbol, TopLevelFunctionLayout<'a>), Proc<'a>>, - pub alias_analysis_solutions: AliasAnalysisSolutions, pub exposed_to_host: MutMap, pub header_sources: MutMap)>, pub sources: MutMap)>, @@ -864,19 +863,6 @@ struct State<'a> { pub layout_caches: std::vec::Vec>, pub procs: Procs<'a>, - - pub alias_analysis_solutions: AliasAnalysisSolutions, -} - -pub enum AliasAnalysisSolutions { - NotAvailable, - Available(morphic_lib::Solutions), -} - -impl std::fmt::Debug for AliasAnalysisSolutions { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "AliasAnalysisSolutions {{}}") - } } #[derive(Debug)] @@ -1486,7 +1472,6 @@ where specializations_in_flight: 0, layout_caches: std::vec::Vec::with_capacity(num_cpus::get()), procs: Procs::new_in(arena), - alias_analysis_solutions: AliasAnalysisSolutions::NotAvailable, }; // We've now distributed one worker queue to each thread. @@ -2085,18 +2070,6 @@ fn update<'a>( &mut state.procedures, ); - if false { - let it = state.procedures.iter().map(|x| x.1); - - match roc_mono::alias_analysis::spec_program(it) { - Err(e) => panic!("Error in alias analysis: {:?}", e), - Ok(solutions) => { - state.alias_analysis_solutions = - AliasAnalysisSolutions::Available(solutions) - } - } - } - state.constrained_ident_ids.insert(module_id, ident_ids); for (module_id, requested) in external_specializations_requested { @@ -2176,7 +2149,6 @@ fn finish_specialization( let State { procedures, - alias_analysis_solutions, module_cache, output_path, platform_path, @@ -2238,7 +2210,6 @@ fn finish_specialization( subs, interns, procedures, - alias_analysis_solutions, sources, header_sources, timings: state.timings,