Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Issue 2897603002: VM: Constant fold more loads from constants in the optimizer. (Closed)

Created:
3 years, 7 months ago by Vyacheslav Egorov (Google)
Modified:
3 years, 7 months ago
Reviewers:
erikcorry
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

VM: Constant fold more loads from constants in the optimizer. We have limited support for folding away length loads from constant arrays and strings. However we were not folding away loads in code like: enum E { V } isV(flags) => (flags & (1 << E.V.index)) != 0; Here we would emit load index and shift for mask computation instead of simply emitting 1. This change fixes the oversight by enabling folding away loads of final fields from constants. BUG= R=erikcorry@google.com Committed: https://github.com/dart-lang/sdk/commit/746ab58f4623372e1efcfd04644927f16dd0fab7

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -40 lines) Patch
M runtime/vm/constant_propagator.cc View 1 chunk +17 lines, -14 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 chunk +58 lines, -26 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
Vyacheslav Egorov (Google)
Hi Erik, Please take a look.
3 years, 7 months ago (2017-05-19 09:30:13 UTC) #2
erikcorry
lgtm
3 years, 7 months ago (2017-05-19 13:54:02 UTC) #3
Vyacheslav Egorov (Google)
3 years, 7 months ago (2017-05-19 14:07:06 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
746ab58f4623372e1efcfd04644927f16dd0fab7 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698