Skip to content

Commit 255c6fa

Browse files
alexmarkovcommit-bot@chromium.org
authored andcommitted
[vm/compiler] Do not count UnboxedConstant instructions in inliner
These instructions are often folded into indexing instructions. Also, we do not want unboxing decisions to hinder inlining. Fixes the regression of NNBD version of ParticleSystemUpdate benchmark in AOT mode after https://dart-review.googlesource.com/c/sdk/+/150300 ParticleSystemUpdate +11-14% Change-Id: I9707137195b8fe8550985fd972c02dcc59ce9239 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153540 Commit-Queue: Alexander Markov <[email protected]> Reviewed-by: Martin Kustermann <[email protected]>
1 parent 27a13c2 commit 255c6fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

runtime/vm/compiler/backend/inliner.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ class GraphInfoCollector : public ValueObject {
194194
if (current->IsRedefinition()) {
195195
continue;
196196
}
197+
// UnboxedConstant is often folded into the indexing
198+
// instructions (similar to Constant instructions which
199+
// belong to initial definitions and not counted here).
200+
if (current->IsUnboxedConstant()) {
201+
continue;
202+
}
197203
++instruction_count_;
198204
// Count inputs of certain instructions as if separate PushArgument
199205
// instructions are used for inputs. This is done in order to

0 commit comments

Comments
 (0)