Skip to content

Commit

Permalink
Revert "[vm/compiler] Fine tune operator and phi handling."
Browse files Browse the repository at this point in the history
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 <vegorov@google.com>
> Commit-Queue: Aart Bik <ajcbik@google.com>

TBR=vegorov@google.com,alexmarkov@google.com,asiva@google.com,ajcbik@google.com

# 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 <asiva@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
  • Loading branch information
a-siva authored and commit-bot@chromium.org committed Nov 7, 2018
1 parent 1dabf0d commit cde4793
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions runtime/vm/compiler/backend/flow_graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1793,9 +1793,9 @@ static void UnboxPhi(PhiInstr* phi) {
break;
}

if ((unboxed == kTagged) && phi->Type()->IsInt() &&
if ((kSmiBits < 32) && (unboxed == kTagged) && phi->Type()->IsInt() &&
RangeUtils::Fits(phi->range(), RangeBoundary::kRangeBoundaryInt64)) {
// Conservatively unbox phis that:
// On 32-bit platforms conservatively unbox phis that:
// - are proven to be of type Int;
// - fit into 64bits range;
// - have either constants or Box() operations as inputs;
Expand Down
1 change: 0 additions & 1 deletion runtime/vm/compiler/compiler_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ void CompilerPass::RunPipeline(PipelineMode mode,
INVOKE_PASS(TypePropagation);
INVOKE_PASS(ApplyClassIds);
INVOKE_PASS(TypePropagation);
INVOKE_PASS(ApplyICData);
INVOKE_PASS(Canonicalize);
INVOKE_PASS(BranchSimplify);
INVOKE_PASS(IfConvert);
Expand Down

0 comments on commit cde4793

Please sign in to comment.