Skip to content

Commit 9eb1d74

Browse files
aartbikcommit-bot@chromium.org
authored andcommitted
Reland "[vm/compiler] Fine tune operator and phi handling."
This reverts commit cde4793. Reason for revert: the real underlying bug has been fixed Original change's description: > Revert "[vm/compiler] Fine tune operator and phi handling." > > This reverts commit 4d5b5bb. > > Reason for revert: We are seeing an AOT compiler issue as a result of this change (please see flutter/flutter#23879) > > Original change's description: > > [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]> > > [email protected],[email protected],[email protected],[email protected] > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Change-Id: I46e420f9355bfc3c4a3f2fb9274f648e8a596d9a > Reviewed-on: https://dart-review.googlesource.com/c/83229 > Reviewed-by: Siva Annamalai <[email protected]> > Reviewed-by: Aart Bik <[email protected]> > Commit-Queue: Siva Annamalai <[email protected]> [email protected],[email protected],[email protected],[email protected] # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I7f9d892a6225c42810e7be52b6845bfee9cc017d Reviewed-on: https://dart-review.googlesource.com/c/83800 Reviewed-by: Aart Bik <[email protected]> Reviewed-by: Alexander Markov <[email protected]> Commit-Queue: Aart Bik <[email protected]>
1 parent 849ece5 commit 9eb1d74

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

runtime/vm/compiler/backend/flow_graph.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1793,9 +1793,9 @@ static void UnboxPhi(PhiInstr* phi) {
17931793
break;
17941794
}
17951795

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

runtime/vm/compiler/compiler_pass.cc

+1
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)