From 1b498727f79e85756a9eee86d31214393dc7002c Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Tue, 31 Mar 2015 11:37:18 +0100 Subject: ART: Same skip-compilation heuristic in both backends When deciding if a method should be compiled, Optimizing counts the DEX instructions while Quick approximates this figure as the size of the CodeItem. This patch modifies Optimizing to use the same logic so that the two backends reject the same set of methods. Change-Id: Icb12bf2977f948198df08d59f243532ec8c61783 --- compiler/optimizing/builder.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'compiler/optimizing/builder.h') diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h index 6a0738a7b..dc6d97eb0 100644 --- a/compiler/optimizing/builder.h +++ b/compiler/optimizing/builder.h @@ -90,8 +90,6 @@ class HGraphBuilder : public ValueObject { // branches. void ComputeBranchTargets(const uint16_t* start, const uint16_t* end, - size_t* number_of_dex_instructions, - size_t* number_of_block, size_t* number_of_branches); void MaybeUpdateCurrentBlock(size_t index); HBasicBlock* FindBlockStartingAt(int32_t index) const; @@ -217,9 +215,7 @@ class HGraphBuilder : public ValueObject { HInstruction* value, int32_t case_value_int, int32_t target_offset, uint32_t dex_pc); - bool SkipCompilation(size_t number_of_dex_instructions, - size_t number_of_blocks, - size_t number_of_branches); + bool SkipCompilation(const DexFile::CodeItem& code_item, size_t number_of_branches); void MaybeRecordStat(MethodCompilationStat compilation_stat); -- cgit v1.2.3