OSDN Git Service

ART: Generate chained compare-and-branch for short switches
authorAndreas Gampe <agampe@google.com>
Wed, 6 Aug 2014 17:09:01 +0000 (10:09 -0700)
committerAndreas Gampe <agampe@google.com>
Sat, 9 Aug 2014 05:57:06 +0000 (22:57 -0700)
commit8c18c2aaedb171f9b03ec49c94b0e33449dc411b
tree9d0e81e3b6459061163e30b5db0fc755c81352b4
parent9f642e83c176fec52e496be0ae4b0b97fb2905b4
ART: Generate chained compare-and-branch for short switches

Refactor Mir2Lir to generate chained compare-and-branch sequences
for short switches on all architectures.

Bug: 16241558

(cherry picked from commit 48971b3242e5126bcd800cc9c68df64596b43d13)

Change-Id: I0bb3071b8676523e90e0258e9b0e3fd69c1237f4
12 files changed:
compiler/dex/quick/arm/call_arm.cc
compiler/dex/quick/arm/codegen_arm.h
compiler/dex/quick/arm64/call_arm64.cc
compiler/dex/quick/arm64/codegen_arm64.h
compiler/dex/quick/gen_common.cc
compiler/dex/quick/mips/call_mips.cc
compiler/dex/quick/mips/codegen_mips.h
compiler/dex/quick/mir_to_lir.h
compiler/dex/quick/x86/call_x86.cc
compiler/dex/quick/x86/codegen_x86.h
test/015-switch/expected.txt
test/015-switch/src/Main.java