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

Issue 1490763003: [turbofan] Bidirectional representation inference. (Closed)

Created:
5 years ago by Jarin
Modified:
4 years, 11 months ago
Reviewers:
Benedikt Meurer
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Bidirectional representation inference. This changes representation inference to be bidirectional: 1. truncations are propagated from uses to definitions. 2. output types are propagated from definitions to uses. (and nodes are revisited until fixpoint.) At the moment, (2) is used only superficially; the idea here is to use the output type propagation to propagate types from type feedback. For the output types to be usable, we need to keep track of the type of the JavaScript value rather than the truncated value. Otherwise, representation inference could not rely on the ranges indicated by the values. For example, for "var b = (a|0) + (a|0); return (b/16) >>> 0", the type of b cannot be int32; otherwise the division "b/16" would believe that it is fine to do an integer division on the truncated value, which would give a wrong result for 2^31 <= a < 2^32. The change makes representation inference a bit more expensive (the phase is about 20% slower), but since this is only small part of the overall compiler time, the overall effect is negligible. If the running time becomes a problem, we could optimize this by remembering when the nodes are stable (ie., no further changes to type/truncations) and/or explicit subscriptions for changes. BUG=v8:4583 R=bmeurer@chromium.org LOG=N Committed: https://crrev.com/f0e41175fde3d86f3790d69dfa6c9cb0a01eaad2 Cr-Commit-Position: refs/heads/master@{#33112}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -37 lines) Patch
M src/compiler/simplified-lowering.cc View 1 2 7 chunks +103 lines, -37 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
Jarin
Could you take a look at this tiny and completely benign change?
5 years ago (2015-12-01 12:42:41 UTC) #4
Benedikt Meurer
I'm not sure about this commit. For the purpose mentioned in the description it's LGTM, ...
5 years ago (2015-12-01 13:26:38 UTC) #5
Jarin
On 2015/12/01 13:26:38, Benedikt Meurer wrote: > I'm not sure about this commit. For the ...
5 years ago (2015-12-01 13:50:12 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1490763003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1490763003/20001
4 years, 11 months ago (2016-01-05 10:56:28 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1490763003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1490763003/40001
4 years, 11 months ago (2016-01-05 10:57:39 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 11 months ago (2016-01-05 11:56:08 UTC) #15
commit-bot: I haz the power
4 years, 11 months ago (2016-01-05 11:56:48 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f0e41175fde3d86f3790d69dfa6c9cb0a01eaad2
Cr-Commit-Position: refs/heads/master@{#33112}

Powered by Google App Engine
This is Rietveld 408576698