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

Issue 22859007: Insert dummy conversion instruction for impossible conversion requests. (Closed)

Created:
7 years, 4 months ago by Cutch
Modified:
7 years, 4 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Insert dummy conversion instruction for impossible conversion requests. BUG=12417 R=srdjan@google.com Committed: https://code.google.com/p/dart/source/detail?r=26143

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -0 lines) Patch
M runtime/vm/flow_graph_optimizer.cc View 1 chunk +16 lines, -0 lines 8 comments Download

Messages

Total messages: 9 (0 generated)
Cutch
7 years, 4 months ago (2013-08-14 18:49:43 UTC) #1
srdjan
7 years, 4 months ago (2013-08-14 18:56:17 UTC) #2
srdjan
lgtm
7 years, 4 months ago (2013-08-14 18:56:22 UTC) #3
Cutch
Committed patchset #1 manually as r26143 (presubmit successful).
7 years, 4 months ago (2013-08-14 20:11:13 UTC) #4
Florian Schneider
dbc: https://codereview.chromium.org/22859007/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/22859007/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode408 runtime/vm/flow_graph_optimizer.cc:408: converted = new UnboxDoubleInstr(use->CopyWithType(), deopt_id); How about inserting ...
7 years, 4 months ago (2013-08-15 09:11:35 UTC) #5
srdjan
https://codereview.chromium.org/22859007/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/22859007/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode408 runtime/vm/flow_graph_optimizer.cc:408: converted = new UnboxDoubleInstr(use->CopyWithType(), deopt_id); On 2013/08/15 09:11:35, Florian ...
7 years, 4 months ago (2013-08-15 14:34:39 UTC) #6
Cutch
https://codereview.chromium.org/22859007/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/22859007/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode408 runtime/vm/flow_graph_optimizer.cc:408: converted = new UnboxDoubleInstr(use->CopyWithType(), deopt_id); On 2013/08/15 09:11:35, Florian ...
7 years, 4 months ago (2013-08-15 14:35:01 UTC) #7
Florian Schneider
https://codereview.chromium.org/22859007/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/22859007/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode408 runtime/vm/flow_graph_optimizer.cc:408: converted = new UnboxDoubleInstr(use->CopyWithType(), deopt_id); On 2013/08/15 14:35:02, Cutch ...
7 years, 4 months ago (2013-08-16 10:31:18 UTC) #8
Cutch
7 years, 4 months ago (2013-08-16 15:57:05 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/22859007/diff/1/runtime/vm/flow_graph_optimiz...
File runtime/vm/flow_graph_optimizer.cc (right):

https://codereview.chromium.org/22859007/diff/1/runtime/vm/flow_graph_optimiz...
runtime/vm/flow_graph_optimizer.cc:408: converted = new
UnboxDoubleInstr(use->CopyWithType(), deopt_id);
On 2013/08/16 10:31:18, Florian Schneider wrote:
> On 2013/08/15 14:35:02, Cutch wrote:
> > On 2013/08/15 09:11:35, Florian Schneider wrote:
> > > How about inserting a Box- and an Unbox-instruction to avoid
deoptimization
> > here
> > > and in the other cases?
> > 
> > We are being asked to convert an UnboxedFloat32x4 to an UnboxedDouble. Even
if
> > we inserted a BoxFloat32x4Instr followed by an UnboxDoubleInstr a
> deoptimization
> > will be triggered.
> 
> Still, I don't understand how this should work: Even if never executed, the
> representations still should match: Unbox-instructions need a boxed input
> (tagged) which comes in a regular register. An unboxed float32x4 value comes
in
> a XMM register.

So what ends up happening is that unboxed -> tagged conversion routine is
inserted anyways. I'm sending you a CL which makes this explicit and fixes the
issue you found below.

https://codereview.chromium.org/22859007/diff/1/runtime/vm/flow_graph_optimiz...
runtime/vm/flow_graph_optimizer.cc:410: converted = new
UnboxDoubleInstr(use->CopyWithType(), deopt_id);
On 2013/08/16 10:31:18, Florian Schneider wrote:
> Ok, but shouldn't this be UnboxUint32x4Instr here?

Yes.

Powered by Google App Engine
This is Rietveld 408576698