summaryrefslogtreecommitdiffstats
path: root/compiler/utils/dex_instruction_utils.h
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2014-11-24 14:09:46 +0000
committerVladimir Marko <vmarko@google.com>2014-11-24 14:40:22 +0000
commit26e7d454b9924f3673b075b05e4c604ad658a062 (patch)
tree6cfc018247661e298137cb0985b6ce7c7fb400a6 /compiler/utils/dex_instruction_utils.h
parentc2155048075b4916536f3aa23a88cd483b0f64a2 (diff)
downloadandroid_art-26e7d454b9924f3673b075b05e4c604ad658a062.tar.gz
android_art-26e7d454b9924f3673b075b05e4c604ad658a062.tar.bz2
android_art-26e7d454b9924f3673b075b05e4c604ad658a062.zip
Eliminate suspend checks on back-edges to return insn.
This optimization seems to have been broken for a long time. Change-Id: I62ec85c71bb5253917ad9465a952911e917f6b52
Diffstat (limited to 'compiler/utils/dex_instruction_utils.h')
-rw-r--r--compiler/utils/dex_instruction_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/utils/dex_instruction_utils.h b/compiler/utils/dex_instruction_utils.h
index 09d9419c0b..ad7d750dea 100644
--- a/compiler/utils/dex_instruction_utils.h
+++ b/compiler/utils/dex_instruction_utils.h
@@ -58,6 +58,10 @@ constexpr bool IsInstructionInvokeStatic(Instruction::Code opcode) {
return opcode == Instruction::INVOKE_STATIC || opcode == Instruction::INVOKE_STATIC_RANGE;
}
+constexpr bool IsInstructionGoto(Instruction::Code opcode) {
+ return Instruction::GOTO <= opcode && opcode <= Instruction::GOTO_32;
+}
+
constexpr bool IsInstructionIfCc(Instruction::Code opcode) {
return Instruction::IF_EQ <= opcode && opcode <= Instruction::IF_LE;
}