From d3a245b5993d69389d149df6433da13791f214f5 Mon Sep 17 00:00:00 2001 From: rarbore2 <rarbore2@illinois.edu> Date: Fri, 27 Dec 2024 19:17:24 -0600 Subject: [PATCH] Ignore anti-deps in GCM for now --- hercules_ir/src/gcm.rs | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/hercules_ir/src/gcm.rs b/hercules_ir/src/gcm.rs index 33b18a61..35541d18 100644 --- a/hercules_ir/src/gcm.rs +++ b/hercules_ir/src/gcm.rs @@ -73,14 +73,15 @@ pub fn gcm( .as_ref() .into_iter() .map(|id| *id) + // TODO: once anti-dependence analysis is fixed, use it in GCM. // Include "uses" from anti-dependencies. - .chain( - antideps_uses - .get(&id) - .unwrap_or(&vec![]) - .into_iter() - .map(|id| *id), - ) + //.chain( + // antideps_uses + // .get(&id) + // .unwrap_or(&vec![]) + // .into_iter() + // .map(|id| *id), + //) .map(|id| schedule_early[id.idx()]) .collect(); if let Some(use_places) = use_places { @@ -127,19 +128,16 @@ pub fn gcm( // For every user, consider where we need to be to directly dominate the // user. - for user in def_use - .get_users(id) - .as_ref() - .into_iter() - .map(|id| *id) - // Include "users" from anti-dependencies. - .chain( - antideps_users - .get(&id) - .unwrap_or(&vec![]) - .into_iter() - .map(|id| *id), - ) + for user in def_use.get_users(id).as_ref().into_iter().map(|id| *id) + // TODO: once anti-dependence analysis is fixed, use it in GCM. + // Include "users" from anti-dependencies. + //.chain( + // antideps_users + // .get(&id) + // .unwrap_or(&vec![]) + // .into_iter() + // .map(|id| *id), + //) { if let Node::Phi { control, data } = &function.nodes[user.idx()] { // For phis, we need to dominate the block jumping to the phi in -- GitLab