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_x86.cc b/compiler/optimizing/code_generator_x86.cc
index 8a73eb4..e151c6b 100644
--- a/compiler/optimizing/code_generator_x86.cc
+++ b/compiler/optimizing/code_generator_x86.cc
@@ -3914,5 +3914,17 @@
}
}
+void LocationsBuilderX86::VisitBoundType(HBoundType* instruction) {
+ // Nothing to do, this should be removed during prepare for register allocator.
+ UNUSED(instruction);
+ LOG(FATAL) << "Unreachable";
+}
+
+void InstructionCodeGeneratorX86::VisitBoundType(HBoundType* instruction) {
+ // Nothing to do, this should be removed during prepare for register allocator.
+ UNUSED(instruction);
+ LOG(FATAL) << "Unreachable";
+}
+
} // namespace x86
} // namespace art