Skip to content
Snippets Groups Projects

Intraprocedural SROA

Merged Aaron Councilman requested to merge sroa into main
1 file
+ 3
0
Compare changes
  • Side-by-side
  • Inline
+ 3
0
@@ -82,6 +82,9 @@ impl DomTree {
@@ -82,6 +82,9 @@ impl DomTree {
* ancestor of the two nodes that is as far down the tree as possible.
* ancestor of the two nodes that is as far down the tree as possible.
*/
*/
pub fn least_common_ancestor(&self, mut a: NodeID, mut b: NodeID) -> NodeID {
pub fn least_common_ancestor(&self, mut a: NodeID, mut b: NodeID) -> NodeID {
 
if a == self.root || b == self.root {
 
return self.root;
 
}
while self.idom[&a].0 > self.idom[&b].0 {
while self.idom[&a].0 > self.idom[&b].0 {
a = self.idom[&a].1;
a = self.idom[&a].1;
}
}
Loading