Mark instructions that produce non-null object arguments as non-null.
Improve null-check elimination by marking instructions that can't produce a
non-null object as non-null. Reduces the size of ThinkFree by 16kb (0.05%).
Change-Id: I43148b55a4896081fe3da37a3345814b55fa9b82
diff --git a/src/compiler/dex/mir_dataflow.cc b/src/compiler/dex/mir_dataflow.cc
index 79eac6d..3b2c1a6 100644
--- a/src/compiler/dex/mir_dataflow.cc
+++ b/src/compiler/dex/mir_dataflow.cc
@@ -70,7 +70,7 @@
DF_DA | DF_REF_A,
// 0D MOVE_EXCEPTION vAA
- DF_DA | DF_REF_A,
+ DF_DA | DF_REF_A | DF_NON_NULL_DST,
// 0E RETURN_VOID
DF_NOP,
@@ -109,13 +109,13 @@
DF_DA | DF_A_WIDE | DF_SETS_CONST,
// 1A CONST_STRING vAA, string@BBBB
- DF_DA | DF_REF_A,
+ DF_DA | DF_REF_A | DF_NON_NULL_DST,
// 1B CONST_STRING_JUMBO vAA, string@BBBBBBBB
- DF_DA | DF_REF_A,
+ DF_DA | DF_REF_A | DF_NON_NULL_DST,
// 1C CONST_CLASS vAA, type@BBBB
- DF_DA | DF_REF_A,
+ DF_DA | DF_REF_A | DF_NON_NULL_DST,
// 1D MONITOR_ENTER vAA
DF_UA | DF_NULL_CHK_0 | DF_REF_A,