diff options
author | 2018-04-06 15:24:35 -0700 | |
---|---|---|
committer | 2018-04-06 16:10:22 -0700 | |
commit | d99f203eab7eb310f8326f2739fdf44cd0025679 (patch) | |
tree | 71107b138cd56472c77f664ee3c8320a83c5b279 /compiler/optimizing/block_builder.cc | |
parent | 6fcf35bc06b1eb88080863b3bd8f7e16ca099910 (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
Change-Id: I6f90fcd65263e85024d8a268bcd8bfa739af2c6f
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()); |