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

Issue 682993008: Improve precision of range analysis by allowing it to track ranges across all int typed phis. (Closed)

Created:
6 years, 1 month ago by Vyacheslav Egorov (Google)
Modified:
5 years, 8 months ago
Reviewers:
Florian Schneider
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Improve precision of range analysis by allowing it to track ranges across all int typed phis. Even when range of the integer definition is unknown we can optimistically assign full int64-range to it even though tagged integer definition can contain instance of the Bigint. This is based on the following observation: we only use ranges when working with unboxed arithmetic in the optimized code, but the widest possible unboxed arithmetic is 64-bit (mint) one and corresponding unboxing operations will deoptimize if they get Bigint as an input. This makes it safe to assume that any integer definition fits into 64-bit range *once unboxed*. Additional small fixes: - Fix ranges assigned to loads from Int32/Uint32 arrays on 64-bit platform - it was overly conservative; - Add UnboxUint32 range inference to ensure that range is not lost when it passes through box-unbox pair; - When canonicalizing Binary/Unary Integer operations ensure that we unwrap UnboxUint32(Constant(C)) -> C. BUG= R=fschneider@google.com Committed: https://code.google.com/p/dart/source/detail?r=41640

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -60 lines) Patch
M runtime/vm/flow_graph_optimizer.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/flow_graph_range_analysis.h View 3 chunks +12 lines, -6 lines 0 comments Download
M runtime/vm/flow_graph_range_analysis.cc View 10 chunks +94 lines, -30 lines 2 comments Download
M runtime/vm/intermediate_language.h View 3 chunks +14 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 2 chunks +32 lines, -24 lines 1 comment Download

Messages

Total messages: 4 (1 generated)
Vyacheslav Egorov (Google)
PTAL
6 years, 1 month ago (2014-11-10 15:40:46 UTC) #2
Florian Schneider
lgtm https://codereview.chromium.org/682993008/diff/1/runtime/vm/flow_graph_range_analysis.cc File runtime/vm/flow_graph_range_analysis.cc (left): https://codereview.chromium.org/682993008/diff/1/runtime/vm/flow_graph_range_analysis.cc#oldcode2798 runtime/vm/flow_graph_range_analysis.cc:2798: if (Typed32BitIsSmi()) { Is Typed32BitIsSmi() still used anywhere? ...
6 years, 1 month ago (2014-11-10 16:10:47 UTC) #3
Vyacheslav Egorov (Google)
6 years, 1 month ago (2014-11-10 17:16:25 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 41640 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698