Bring Reference Type Propagation to Instance/StaticInstanceField

For this, we need the field index in FieldInfo, hence the add of the field.

Change-Id: Id219bd826d8496acf3981307a8c42e2eb6ddb712
diff --git a/compiler/optimizing/register_allocator_test.cc b/compiler/optimizing/register_allocator_test.cc
index b72ffb8..d07a14a 100644
--- a/compiler/optimizing/register_allocator_test.cc
+++ b/compiler/optimizing/register_allocator_test.cc
@@ -474,8 +474,12 @@
   graph->AddBlock(block);
   entry->AddSuccessor(block);
 
-  HInstruction* test = new (allocator) HInstanceFieldGet(
-      parameter, Primitive::kPrimBoolean, MemberOffset(22), false);
+  HInstruction* test = new (allocator) HInstanceFieldGet(parameter,
+                                                         Primitive::kPrimBoolean,
+                                                         MemberOffset(22),
+                                                         false,
+                                                         kUnknownFieldIndex,
+                                                         graph->GetDexFile());
   block->AddInstruction(test);
   block->AddInstruction(new (allocator) HIf(test));
   HBasicBlock* then = new (allocator) HBasicBlock(graph);
@@ -494,10 +498,18 @@
 
   *phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt);
   join->AddPhi(*phi);
-  *input1 = new (allocator) HInstanceFieldGet(parameter, Primitive::kPrimInt,
-                                              MemberOffset(42), false);
-  *input2 = new (allocator) HInstanceFieldGet(parameter, Primitive::kPrimInt,
-                                              MemberOffset(42), false);
+  *input1 = new (allocator) HInstanceFieldGet(parameter,
+                                              Primitive::kPrimInt,
+                                              MemberOffset(42),
+                                              false,
+                                              kUnknownFieldIndex,
+                                              graph->GetDexFile());
+*input2 = new (allocator) HInstanceFieldGet(parameter,
+                                            Primitive::kPrimInt,
+                                            MemberOffset(42),
+                                            false,
+                                            kUnknownFieldIndex,
+                                            graph->GetDexFile());
   then->AddInstruction(*input1);
   else_->AddInstruction(*input2);
   join->AddInstruction(new (allocator) HExit());
@@ -604,8 +616,12 @@
   graph->AddBlock(block);
   entry->AddSuccessor(block);
 
-  *field = new (allocator) HInstanceFieldGet(parameter, Primitive::kPrimInt,
-                                             MemberOffset(42), false);
+  *field = new (allocator) HInstanceFieldGet(parameter,
+                                             Primitive::kPrimInt,
+                                             MemberOffset(42),
+                                             false,
+                                             kUnknownFieldIndex,
+                                             graph->GetDexFile());
   block->AddInstruction(*field);
   *ret = new (allocator) HReturn(*field);
   block->AddInstruction(*ret);