Dataflow fix
The live-in computation failed to account for Dalvik opcodes with
variable number of arguments. This in turn led to missing Phi
nodes and the type inference pass missing uses of Dalvik variables
as float - knowledge of which is required by the register promotion
mechanism.
Change-Id: I4a2d60b77ad5274b09c4ed7546c207a3a54b3ad9
diff --git a/src/compiler/Dataflow.cc b/src/compiler/Dataflow.cc
index 908e1cc..4572857 100644
--- a/src/compiler/Dataflow.cc
+++ b/src/compiler/Dataflow.cc
@@ -1145,6 +1145,16 @@
handleLiveInUse(cUnit, useV, defV, liveInV, dInsn->vC+1);
}
}
+ if (dfAttributes & DF_FORMAT_35C) {
+ for (unsigned int i = 0; i < dInsn->vA; i++) {
+ handleLiveInUse(cUnit, useV, defV, liveInV, dInsn->arg[i]);
+ }
+ }
+ if (dfAttributes & DF_FORMAT_3RC) {
+ for (unsigned int i = 0; i < dInsn->vA; i++) {
+ handleLiveInUse(cUnit, useV, defV, liveInV, dInsn->vC+i);
+ }
+ }
if (dfAttributes & DF_HAS_DEFS) {
handleDef(cUnit, defV, dInsn->vA);
if (dfAttributes & DF_DA_WIDE) {