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

Issue 1590303002: Subzero: Make optimizations more resilient for early Target development. (Closed)

Created:
4 years, 11 months ago by Jim Stichnoth
Modified:
4 years, 11 months ago
Reviewers:
Karl, sehr, John, reed.kotler
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Subzero: Make optimizations more resilient for early Target development. A good trick for implementing lowering for a new target is, for not-yet-implemented instructions, to insert a FakeUse of each instruction variable followed by a FakeDef of the dest variable. Otherwise one risks running afoul of liveness analysis integrity checks. However, if all the high-level instructions in a basic block lack variables (e.g. unconditional branches, or void calls with only constant arguments), the resulting block may be completely empty. In O2 mode, this triggers a couple of assertions/errors that wouldn't normally occur: 1. CfgNode::contractIfEmpty() finds a block with a single out-edge that does *not* end with an unconditional branch. 2. CfgNode::livenessAddIntervals() tries to add a bogus liveness interval to a variable because the empty block contains no actual instruction numbers to form a valid interval from. This adds some fixes/workarounds for those problems. Another workaround for the empty basic block problem may be to just to add a FakeUse of the stack pointer when lowering an unconditional branch, which combined with the trick above, should prevent empty blocks. However, these fixes seem reasonable apart from that. BUG= none R=sehr@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=6f7ad6c28af7985b690d6e5b39bb916ba9e6333b

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -5 lines) Patch
M src/IceCfg.cpp View 2 chunks +18 lines, -5 lines 0 comments Download
M src/IceCfgNode.cpp View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (4 generated)
Jim Stichnoth
4 years, 11 months ago (2016-01-15 16:17:35 UTC) #4
sehr
lgtm
4 years, 11 months ago (2016-01-15 16:41:07 UTC) #5
Jim Stichnoth
4 years, 11 months ago (2016-01-15 17:52:58 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
6f7ad6c28af7985b690d6e5b39bb916ba9e6333b (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698