diff options
| author | 2015-06-19 18:15:00 +0000 | |
|---|---|---|
| committer | 2015-06-19 18:15:00 +0000 | |
| commit | d5ff8c584b230da350f4ebfffec1d245c09bf26b (patch) | |
| tree | 06efa56d932dfdaab5ae27b020cdb7e292558dfe /compiler/dex/mir_optimization.cc | |
| parent | e102f1937ca14df87594469430d2e6e0ebe0f357 (diff) | |
| parent | dde9827f75d1e1e9cd4b7e6b54086aec54f29b5f (diff) | |
Merge "Fix case where block has no predecessor for StringChange."
Diffstat (limited to 'compiler/dex/mir_optimization.cc')
| -rw-r--r-- | compiler/dex/mir_optimization.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/dex/mir_optimization.cc b/compiler/dex/mir_optimization.cc index 727d0fd759..5bb0ce3ba5 100644 --- a/compiler/dex/mir_optimization.cc +++ b/compiler/dex/mir_optimization.cc @@ -1667,15 +1667,9 @@ void MIRGraph::StringChange() { if (opcode == Instruction::NEW_INSTANCE) { uint32_t type_idx = mir->dalvikInsn.vB; if (cu_->compiler_driver->IsStringTypeIndex(type_idx, cu_->dex_file)) { - // Change NEW_INSTANCE and throwing half of the insn (if it exists) into CONST_4 of 0 + // Change NEW_INSTANCE into CONST_4 of 0 mir->dalvikInsn.opcode = Instruction::CONST_4; mir->dalvikInsn.vB = 0; - MIR* check_mir = GetBasicBlock(bb->predecessors[0])->last_mir_insn; - if (check_mir != nullptr && - static_cast<int>(check_mir->dalvikInsn.opcode) == kMirOpCheck) { - check_mir->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpNop); - check_mir->dalvikInsn.vB = 0; - } } } else if ((opcode == Instruction::INVOKE_DIRECT) || (opcode == Instruction::INVOKE_DIRECT_RANGE)) { |