From a3aba6593cea77f8b300b95c27db8b8d578786cb Mon Sep 17 00:00:00 2001 From: Khyber Sen Date: Wed, 10 Aug 2022 00:31:04 -0700 Subject: [PATCH] Renamed `non_unique` to `alias`, which is the terminology Rust uses for this more often and is more succinct. --- pdg/src/info.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pdg/src/info.rs b/pdg/src/info.rs index 3948030872..4709499891 100644 --- a/pdg/src/info.rs +++ b/pdg/src/info.rs @@ -18,7 +18,7 @@ pub struct NodeInfo { flows_to_load: Option, flows_to_pos_offset: Option, flows_to_neg_offset: Option, - non_unique: Option, + aliases: Option, } impl Display for NodeInfo { @@ -28,7 +28,7 @@ impl Display for NodeInfo { ("load", self.flows_to_load), ("+offset", self.flows_to_neg_offset), ("-offset", self.flows_to_neg_offset), - ("non unique by", self.non_unique), + ("alias", self.aliases), ].into_iter() .filter_map(|(name,node)| Some((name,node?))) .format_with(", ", |(name, node), f| f(&format_args!("{name} {node}"))); @@ -172,7 +172,7 @@ pub fn augment_with_info(pdg: &mut Graphs) { let mut idx_flow_to_load = HashMap::new(); let mut idx_flow_to_pos_offset = HashMap::new(); let mut idx_flow_to_neg_offset = HashMap::new(); - let mut idx_non_unique = HashMap::new(); + let mut idx_aliases = HashMap::new(); for (idx, _) in g.nodes.iter_enumerated() { if let Some(descmutidx) = check_flows_to_node_kind(g, &idx, node_does_mutation) { idx_flow_to_store.insert(idx, descmutidx); @@ -187,7 +187,7 @@ pub fn augment_with_info(pdg: &mut Graphs) { idx_flow_to_neg_offset.insert(idx, descnegoidx); } if let Some(non_unique_idx) = check_whether_rules_obeyed(g, &idx) { - idx_non_unique.insert(idx, non_unique_idx); + idx_aliases.insert(idx, non_unique_idx); } } for (idx, node) in g.nodes.iter_enumerated_mut() { @@ -196,7 +196,7 @@ pub fn augment_with_info(pdg: &mut Graphs) { flows_to_load: idx_flow_to_load.remove(&idx), flows_to_pos_offset: idx_flow_to_pos_offset.remove(&idx), flows_to_neg_offset: idx_flow_to_pos_offset.remove(&idx), - non_unique: idx_non_unique.remove(&idx), + aliases: idx_aliases.remove(&idx), }) } }