diff options
-rw-r--r-- | compiler/dex/local_value_numbering_test.cc | 1 | ||||
-rw-r--r-- | compiler/dex/mir_graph.cc | 1 | ||||
-rw-r--r-- | compiler/dex/mir_graph.h | 3 | ||||
-rw-r--r-- | compiler/dex/mir_optimization_test.cc | 1 | ||||
-rw-r--r-- | compiler/dex/quick/dex_file_method_inliner.cc | 8 |
5 files changed, 2 insertions, 12 deletions
diff --git a/compiler/dex/local_value_numbering_test.cc b/compiler/dex/local_value_numbering_test.cc index 2b1c4207e8..e56e0160ca 100644 --- a/compiler/dex/local_value_numbering_test.cc +++ b/compiler/dex/local_value_numbering_test.cc @@ -144,7 +144,6 @@ class LocalValueNumberingTest : public testing::Test { mir->ssa_rep->fp_def = nullptr; // Not used by LVN. mir->dalvikInsn.opcode = def->opcode; mir->offset = i; // LVN uses offset only for debug output - mir->width = 1u; // Not used by LVN. mir->optimization_flags = 0u; if (i != 0u) { diff --git a/compiler/dex/mir_graph.cc b/compiler/dex/mir_graph.cc index ba4224ea78..08d1bca9af 100644 --- a/compiler/dex/mir_graph.cc +++ b/compiler/dex/mir_graph.cc @@ -633,7 +633,6 @@ void MIRGraph::InlineMethod(const DexFile::CodeItem* code_item, uint32_t access_ insn->offset = current_offset_; insn->m_unit_index = current_method_; int width = ParseInsn(code_ptr, &insn->dalvikInsn); - insn->width = width; Instruction::Code opcode = insn->dalvikInsn.opcode; if (opcode_count_ != NULL) { opcode_count_[static_cast<int>(opcode)]++; diff --git a/compiler/dex/mir_graph.h b/compiler/dex/mir_graph.h index 11d2fbe039..ded1c99e93 100644 --- a/compiler/dex/mir_graph.h +++ b/compiler/dex/mir_graph.h @@ -263,7 +263,8 @@ struct MIR { Instruction::Code opcode; } dalvikInsn; - uint16_t width; // Note: width can include switch table or fill array data. + // TODO: Add id of parent basic block. + // BasicBlockId parent_bb; // ID of parent basic block. NarrowDexOffset offset; // Offset of the instruction in code units. uint16_t optimization_flags; int16_t m_unit_index; // From which method was this MIR included diff --git a/compiler/dex/mir_optimization_test.cc b/compiler/dex/mir_optimization_test.cc index 891d9fb7ea..86092b6e3d 100644 --- a/compiler/dex/mir_optimization_test.cc +++ b/compiler/dex/mir_optimization_test.cc @@ -170,7 +170,6 @@ class ClassInitCheckEliminationTest : public testing::Test { } mir->ssa_rep = nullptr; mir->offset = 2 * i; // All insns need to be at least 2 code units long. - mir->width = 2u; mir->optimization_flags = 0u; merged_df_flags |= MIRGraph::GetDataFlowAttributes(def->opcode); } diff --git a/compiler/dex/quick/dex_file_method_inliner.cc b/compiler/dex/quick/dex_file_method_inliner.cc index 3ec31ba7d9..9f98e55997 100644 --- a/compiler/dex/quick/dex_file_method_inliner.cc +++ b/compiler/dex/quick/dex_file_method_inliner.cc @@ -38,12 +38,7 @@ MIR* AllocReplacementMIR(MIRGraph* mir_graph, MIR* invoke, MIR* move_return) { ArenaAllocator* arena = mir_graph->GetArena(); MIR* insn = static_cast<MIR*>(arena->Alloc(sizeof(MIR), kArenaAllocMIR)); insn->offset = invoke->offset; - insn->width = invoke->width; insn->optimization_flags = MIR_CALLEE; - if (move_return != nullptr) { - DCHECK_EQ(move_return->offset, invoke->offset + invoke->width); - insn->width += move_return->width; - } return insn; } @@ -660,7 +655,6 @@ bool DexFileMethodInliner::GenInlineIGet(MIRGraph* mir_graph, BasicBlock* bb, MI } MIR* insn = AllocReplacementMIR(mir_graph, invoke, move_result); - insn->width += insn->offset - invoke->offset; insn->offset = invoke->offset; insn->dalvikInsn.opcode = opcode; insn->dalvikInsn.vA = move_result->dalvikInsn.vA; @@ -737,9 +731,7 @@ bool DexFileMethodInliner::GenInlineIPut(MIRGraph* mir_graph, BasicBlock* bb, MI if (move_result != nullptr) { MIR* move = AllocReplacementMIR(mir_graph, invoke, move_result); - insn->width = invoke->width; move->offset = move_result->offset; - move->width = move_result->width; if (move_result->dalvikInsn.opcode == Instruction::MOVE_RESULT) { move->dalvikInsn.opcode = Instruction::MOVE_FROM16; } else if (move_result->dalvikInsn.opcode == Instruction::MOVE_RESULT_OBJECT) { |