diff options
| author | 2018-04-06 15:24:35 -0700 | |
|---|---|---|
| committer | 2018-04-09 09:54:13 -0700 | |
| commit | 4af599d6f2016430b4cc32d5983fb25d6c77c67a (patch) | |
| tree | f981a4dcb6dbc5002ef2ec97daf1b2510c1d65cc /compiler/optimizing/block_builder.cc | |
| parent | 51d77d6f54306038e75f42c11cee5f54b55b0222 (diff) | |
Count switch as branch.
Rationale:
Builder heuristics bail for method without branches. A method with a
switch should not be discarded that easily.
Boot size delta (oat files, sailfish arm64): + 16488 bytes
Test: test-art-host,target
Bug: b/77652521
(cherry picked from commit d99f203eab7eb310f8326f2739fdf44cd0025679)
Change-Id: Ib29482a0b7f9641fd840afd8cd40981246babaf5
Diffstat (limited to 'compiler/optimizing/block_builder.cc')
| -rw-r--r-- | compiler/optimizing/block_builder.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/optimizing/block_builder.cc b/compiler/optimizing/block_builder.cc index 95f2e98ac6..d9df23fd47 100644 --- a/compiler/optimizing/block_builder.cc +++ b/compiler/optimizing/block_builder.cc @@ -107,6 +107,7 @@ bool HBasicBlockBuilder::CreateBranchTargets() { number_of_branches_++; MaybeCreateBlockAt(dex_pc + instruction.GetTargetOffset()); } else if (instruction.IsSwitch()) { + number_of_branches_++; // count as at least one branch (b/77652521) DexSwitchTable table(instruction, dex_pc); for (DexSwitchTableIterator s_it(table); !s_it.Done(); s_it.Advance()) { MaybeCreateBlockAt(dex_pc + s_it.CurrentTargetOffset()); |