From 48231de6c188a2fcf3f2ca2cefed5022ff57fcfd Mon Sep 17 00:00:00 2001 From: Russel Arbore <russel.jma@gmail.com> Date: Thu, 30 Jan 2025 11:04:50 -0600 Subject: [PATCH] add TODO comments --- hercules_opt/src/forkify.rs | 5 +++++ juno_scheduler/src/pm.rs | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hercules_opt/src/forkify.rs b/hercules_opt/src/forkify.rs index 73077678..356dd67a 100644 --- a/hercules_opt/src/forkify.rs +++ b/hercules_opt/src/forkify.rs @@ -10,6 +10,11 @@ use hercules_ir::*; use crate::*; +/* + * TODO: Forkify currently makes a bunch of small edits - this needs to be + * changed so that every loop that gets forkified corresponds to a single edit + * + sub-edits. This would allow us to run forkify on a subset of a function. + */ pub fn forkify( editor: &mut FunctionEditor, control_subgraph: &Subgraph, diff --git a/juno_scheduler/src/pm.rs b/juno_scheduler/src/pm.rs index 8b3e9050..9888f3d2 100644 --- a/juno_scheduler/src/pm.rs +++ b/juno_scheduler/src/pm.rs @@ -1306,10 +1306,6 @@ fn run_pass( } Pass::ForkSplit => { assert!(args.is_empty()); - // FIXME: I'm not sure if this is the correct way to build fixpoint into the PM, - // i.e cloning selection. Does something need to be done to propagate labels between iterations - // of this loop? - loop { let mut inner_changed = false; pm.make_fork_join_maps(); @@ -1354,8 +1350,10 @@ fn run_pass( let Some(mut func) = func else { continue; }; + // TODO: uses direct return from forkify for now instead of + // func.modified, see comment on top of `forkify` for why. Fix + // this eventually. changed |= forkify(&mut func, control_subgraph, fork_join_map, loop_nest); - // func.modified(); } pm.delete_gravestones(); pm.clear_analyses(); -- GitLab