Revert "Move outline identification to method optimization"
This reverts commit f3beb1f32e5abefa07fcf4e1e93d835073c92456.
Reason for revert: Bot failures
Change-Id: Ie1ba7d5a1360286c6bacde3f9f1d1cce5d1812b0
diff --git a/src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java b/src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
index 1aa1857..ce9faef 100644
--- a/src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
+++ b/src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
@@ -1222,9 +1222,6 @@
if (assumeInserter != null) {
assumeInserter.insertAssumeInstructions(code, timing);
- timing.begin("Rewrite always throwing instructions");
- codeRewriter.optimizeAlwaysThrowingInstructions(code);
- timing.end();
}
previous = printMethod(code, "IR after inserting assume instructions (SSA)", previous);
@@ -1421,6 +1418,14 @@
previous = printMethod(code, "IR after interface method rewriting (SSA)", previous);
+ // TODO(b/140766440): an ideal solution would be putting CodeOptimization for this into
+ // the list for primary processing only.
+ outliner.collectOutlineSites(code, timing);
+
+ assert code.verifyTypes(appView);
+
+ previous = printMethod(code, "IR after outline handler (SSA)", previous);
+
if (stringSwitchRemover != null) {
// Remove string switches prior to canonicalization to ensure that the constants that are
// being introduced will be canonicalized if possible.
@@ -1537,8 +1542,6 @@
appView.withArgumentPropagator(
argumentPropagator -> argumentPropagator.scan(method, code, methodProcessor, timing));
- outliner.collectOutlineSites(code, timing);
-
if (methodProcessor.isPrimaryMethodProcessor()) {
enumUnboxer.analyzeEnums(code, conversionOptions);
}