Minor simplification of OptimizeParameters#alreadyRemoved
@@ -358,13 +358,11 @@ class OptimizeParameters implements CompilerPass, OptimizeCalls.CallGraphCompile
private static boolean alreadyRemoved(Node n) {
Node parent = n.getParent();
- if (parent == null) {
- return true;
- }
- if (parent.isRoot()) {
- return false;
+ while (parent != null) {
+ n = parent;
+ parent = n.getParent();
}
- return alreadyRemoved(parent);
+ return !n.isRoot();
}
/**
