Improve type propagation with if-contexts
This works by adding a new instruction (HBoundType) after each `if (a
instanceof ClassA) {}` to bound the type that `a` can take in the True-
dominated blocks.
Change-Id: Iae6a150b353486d4509b0d9b092164675732b90c
diff --git a/compiler/optimizing/code_generator_arm.cc b/compiler/optimizing/code_generator_arm.cc
index 7b0231b..e864ae1 100644
--- a/compiler/optimizing/code_generator_arm.cc
+++ b/compiler/optimizing/code_generator_arm.cc
@@ -3865,5 +3865,17 @@
DCHECK(!IsLeafMethod());
}
+void LocationsBuilderARM::VisitBoundType(HBoundType* instruction) {
+ // Nothing to do, this should be removed during prepare for register allocator.
+ UNUSED(instruction);
+ LOG(FATAL) << "Unreachable";
+}
+
+void InstructionCodeGeneratorARM::VisitBoundType(HBoundType* instruction) {
+ // Nothing to do, this should be removed during prepare for register allocator.
+ UNUSED(instruction);
+ LOG(FATAL) << "Unreachable";
+}
+
} // namespace arm
} // namespace art