summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2022-12-05 14:38:00 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2022-12-06 13:45:37 +0000
commit31242a99a1b58ce5267c1a74ad96a9d0b6dc1a94 (patch)
treec7ff6d1c5894656eff061277f8f2ce10233f4a02 /compiler/optimizing/nodes.h
parent4f715add9d7f1bc84cfb4fe958ce4afdbdac67c2 (diff)
Update domination chain and RPO manually in MaybeAddExtraGotoBlocks
There's no need to recompute the whole graph as we know what changed. As a drive-by, we now don't return false for graphs with irreducible loops so we can remove that restriction from the builder. However, if a graph with irreducible loops hits this path it means that: A) it's being inlined B) Has irreducible loops We don't inline graphs with irreducible loops, and after building for inline we don't remove them either because constant folding and instruction simplifier don't remove them, and DCE doesn't run for graphs with irreducible loops. So, in terms of dex2oat's outputs nothing should change. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I8cbf1b5f0518bb5dd14ffd751100ea81f5478863
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 006ccfb8ec..591087bae6 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -138,7 +138,6 @@ enum GraphAnalysisResult {
kAnalysisInvalidBytecode,
kAnalysisFailThrowCatchLoop,
kAnalysisFailAmbiguousArrayOp,
- kAnalysisFailInliningIrreducibleLoop,
kAnalysisFailIrreducibleLoopAndStringInit,
kAnalysisFailPhiEquivalentInOsr,
kAnalysisSuccess,
@@ -515,6 +514,11 @@ class HGraph : public ArenaObject<kArenaAllocGraph> {
HBasicBlock* SplitEdge(HBasicBlock* block, HBasicBlock* successor);
void SplitCriticalEdge(HBasicBlock* block, HBasicBlock* successor);
+
+ // Splits the edge between `block` and `successor` and then updates the graph's RPO to keep
+ // consistency without recomputing the whole graph.
+ HBasicBlock* SplitEdgeAndUpdateRPO(HBasicBlock* block, HBasicBlock* successor);
+
void OrderLoopHeaderPredecessors(HBasicBlock* header);
// Transform a loop into a format with a single preheader.