summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/builder.h
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2015-02-02 15:23:05 +0000
committerDavid Brazdil <dbrazdil@google.com>2015-02-02 17:58:02 +0000
commit852eaffe8e478186e134d88a02843a469118ef8c (patch)
treefa00068edc1391698af4d771430578fccd9dcd77 /compiler/optimizing/builder.h
parente5deafe9cdd81238c3916b04301ea884c93f46b5 (diff)
downloadandroid_art-852eaffe8e478186e134d88a02843a469118ef8c.tar.gz
android_art-852eaffe8e478186e134d88a02843a469118ef8c.tar.bz2
android_art-852eaffe8e478186e134d88a02843a469118ef8c.zip
No SuspendChecks when branching to return block
The return basic block is usually placed at the beginning of the DEX file, making the branches to it back edges where the Optimizing's graph builder places SuspendCheck instructions, only to be removed later by the instruction_simplifier pass. Since huge auto-generated methods tend to contain hundreds/thousands of these, this patch recognizes the pattern and prevents builder from generating the redundant check in the first place. Change-Id: I065a3c2f71964b8fc2e53dc20730ba42938b78a1
Diffstat (limited to 'compiler/optimizing/builder.h')
-rw-r--r--compiler/optimizing/builder.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h
index 592db2348b..8ee27a1b35 100644
--- a/compiler/optimizing/builder.h
+++ b/compiler/optimizing/builder.h
@@ -106,7 +106,7 @@ class HGraphBuilder : public ValueObject {
HLocal* GetLocalAt(int register_index) const;
void UpdateLocal(int register_index, HInstruction* instruction) const;
HInstruction* LoadLocal(int register_index, Primitive::Type type) const;
- void PotentiallyAddSuspendCheck(int32_t target_offset, uint32_t dex_pc);
+ void PotentiallyAddSuspendCheck(HBasicBlock* target, uint32_t dex_pc);
void InitializeParameters(uint16_t number_of_parameters);
bool NeedsAccessCheck(uint32_t type_index) const;