Skip to content

Commit 4d5b5bb

Browse files
aartbikcommit-bot@chromium.org
authored andcommitted
[vm/compiler] Fine tune operator and phi handling.
Rationale: Running an extra call specialization pass a bit later in the compiler passes stream (after types are propagated) recognizes more operators, which execute more efficiently. In addition, unboxing phis seems useful on all archs, not just 32-bit. These minor tweeks combined improve the prime number benchmark 3 fold. flutter/flutter#19677 Change-Id: Ib2102ce807c2f0a9f801542e0c4bc6a7673f552b Reviewed-on: https://dart-review.googlesource.com/69240 Reviewed-by: Vyacheslav Egorov <[email protected]> Commit-Queue: Aart Bik <[email protected]>
1 parent 28583df commit 4d5b5bb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

runtime/vm/compiler/backend/flow_graph.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,9 +1730,9 @@ static void UnboxPhi(PhiInstr* phi) {
17301730
break;
17311731
}
17321732

1733-
if ((kSmiBits < 32) && (unboxed == kTagged) && phi->Type()->IsInt() &&
1733+
if ((unboxed == kTagged) && phi->Type()->IsInt() &&
17341734
RangeUtils::Fits(phi->range(), RangeBoundary::kRangeBoundaryInt64)) {
1735-
// On 32-bit platforms conservatively unbox phis that:
1735+
// Conservatively unbox phis that:
17361736
// - are proven to be of type Int;
17371737
// - fit into 64bits range;
17381738
// - have either constants or Box() operations as inputs;

runtime/vm/compiler/compiler_pass.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ void CompilerPass::RunPipeline(PipelineMode mode,
223223
INVOKE_PASS(TypePropagation);
224224
INVOKE_PASS(ApplyClassIds);
225225
INVOKE_PASS(TypePropagation);
226+
INVOKE_PASS(ApplyICData);
226227
INVOKE_PASS(Canonicalize);
227228
INVOKE_PASS(BranchSimplify);
228229
INVOKE_PASS(IfConvert);

0 commit comments

Comments
 (0)