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

Issue 300563003: Subzero: Initial O2 lowering (Closed)

Created:
6 years, 7 months ago by Jim Stichnoth
Modified:
6 years, 6 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

Subzero: Initial O2 lowering Includes the following: 1. Liveness analysis. 2. Linear-scan register allocation. 3. Address mode optimization. 4. Compare-branch fusing. All of these depend on liveness analysis. There are three versions of liveness analysis (in order of increasing cost): 1. Lightweight. This computes last-uses for variables local to a single basic block. 2. Full. This computes last-uses for all variables based on global dataflow analysis. 3. Full live ranges. This computes all last-uses, plus calculates the live range intervals in terms of instruction numbers. (The live ranges are needed for register allocation.) For testing the full live range computation, Cfg::validateLiveness() checks every Variable of every Inst and verifies that the current Inst is contained within the Variable's live range. The cross tests are run with O2 in addition to Om1. Some of the lit tests (for what good they do) are updated with O2 code sequences. BUG= none R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=d97c7df

Patch Set 1 #

Total comments: 60

Patch Set 2 : #

Total comments: 17

Patch Set 3 : Jan's second-round comments. #

Total comments: 5

Patch Set 4 : Jan's third-round comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2152 lines, -261 lines) Patch
M Makefile.standalone View 1 chunk +2 lines, -0 lines 0 comments Download
M crosstest/runtests.sh View 1 chunk +1 line, -1 line 0 comments Download
M src/IceCfg.h View 1 2 5 chunks +10 lines, -3 lines 0 comments Download
M src/IceCfg.cpp View 1 2 9 chunks +179 lines, -11 lines 0 comments Download
M src/IceCfgNode.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M src/IceCfgNode.cpp View 1 2 8 chunks +259 lines, -4 lines 0 comments Download
M src/IceDefs.h View 1 2 2 chunks +19 lines, -0 lines 0 comments Download
M src/IceGlobalContext.cpp View 1 2 chunks +10 lines, -2 lines 0 comments Download
M src/IceInst.h View 1 2 7 chunks +34 lines, -2 lines 0 comments Download
M src/IceInst.cpp View 1 2 7 chunks +177 lines, -6 lines 0 comments Download
A src/IceLiveness.h View 1 2 3 1 chunk +100 lines, -0 lines 0 comments Download
A src/IceLiveness.cpp View 1 2 1 chunk +116 lines, -0 lines 0 comments Download
M src/IceOperand.h View 1 2 9 chunks +84 lines, -10 lines 0 comments Download
M src/IceOperand.cpp View 1 2 4 chunks +125 lines, -8 lines 0 comments Download
A src/IceRegAlloc.h View 1 2 1 chunk +81 lines, -0 lines 0 comments Download
A src/IceRegAlloc.cpp View 1 2 3 1 chunk +461 lines, -0 lines 0 comments Download
M src/IceTargetLowering.h View 2 chunks +4 lines, -0 lines 0 comments Download
M src/IceTargetLowering.cpp View 3 chunks +27 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 1 2 3 5 chunks +8 lines, -5 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 19 chunks +347 lines, -46 lines 0 comments Download
M src/llvm2ice.cpp View 2 chunks +24 lines, -18 lines 0 comments Download
M tests_lit/llvm2ice_tests/64bit.pnacl.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/alloc.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/bitcast.ll View 2 chunks +13 lines, -5 lines 0 comments Download
M tests_lit/llvm2ice_tests/callindirect.pnacl.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/casts.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/cmp-opt.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/convert.ll View 1 9 chunks +50 lines, -131 lines 0 comments Download
M tests_lit/llvm2ice_tests/fp.pnacl.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/fpconst.pnacl.ll View 1 1 chunk +1 line, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/select-opt.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/shift.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/simple-loop.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/unreachable.ll View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Jim Stichnoth
6 years, 7 months ago (2014-05-24 01:05:37 UTC) #1
JF
First pass. https://codereview.chromium.org/300563003/diff/1/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/300563003/diff/1/src/IceCfg.cpp#newcode150 src/IceCfg.cpp:150: (*I)->liveness(Mode, getLiveness()); Can't getLiveness() return a nullptr ...
6 years, 7 months ago (2014-05-25 22:50:49 UTC) #2
jvoung (off chromium)
scanned through a bit too https://codereview.chromium.org/300563003/diff/1/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/300563003/diff/1/src/IceCfg.cpp#newcode231 src/IceCfg.cpp:231: dump(); If ctx->isVerbose, then ...
6 years, 6 months ago (2014-05-28 17:48:14 UTC) #3
Jim Stichnoth
This addresses JF's and Jan's initial comments. https://codereview.chromium.org/300563003/diff/1/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/300563003/diff/1/src/IceCfg.cpp#newcode150 src/IceCfg.cpp:150: (*I)->liveness(Mode, getLiveness()); ...
6 years, 6 months ago (2014-05-29 01:39:46 UTC) #4
jvoung (off chromium)
looks pretty good -- mostly nits https://codereview.chromium.org/300563003/diff/20001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/300563003/diff/20001/src/IceCfg.cpp#newcode224 src/IceCfg.cpp:224: setCurrentNode(NULL); Does setCurrentNode(NULL) ...
6 years, 6 months ago (2014-05-30 15:41:30 UTC) #5
Jim Stichnoth
https://codereview.chromium.org/300563003/diff/20001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/300563003/diff/20001/src/IceCfg.cpp#newcode224 src/IceCfg.cpp:224: setCurrentNode(NULL); On 2014/05/30 15:41:31, jvoung wrote: > Does setCurrentNode(NULL) ...
6 years, 6 months ago (2014-05-30 23:06:18 UTC) #6
jvoung (off chromium)
Otherwise LGTM https://codereview.chromium.org/300563003/diff/20001/src/IceLiveness.h File src/IceLiveness.h (right): https://codereview.chromium.org/300563003/diff/20001/src/IceLiveness.h#newcode44 src/IceLiveness.h:44: std::vector<int> LiveBegin, LiveEnd; On 2014/05/30 23:06:18, stichnot ...
6 years, 6 months ago (2014-06-02 17:07:40 UTC) #7
Jim Stichnoth
https://codereview.chromium.org/300563003/diff/20001/src/IceLiveness.h File src/IceLiveness.h (right): https://codereview.chromium.org/300563003/diff/20001/src/IceLiveness.h#newcode44 src/IceLiveness.h:44: std::vector<int> LiveBegin, LiveEnd; On 2014/06/02 17:07:40, jvoung wrote: > ...
6 years, 6 months ago (2014-06-04 14:18:03 UTC) #8
jvoung (off chromium)
https://codereview.chromium.org/300563003/diff/30001/src/IceRegAlloc.cpp File src/IceRegAlloc.cpp (right): https://codereview.chromium.org/300563003/diff/30001/src/IceRegAlloc.cpp#newcode212 src/IceRegAlloc.cpp:212: if (Item.Var->hasReg() && Item.overlaps(Cur)) { On 2014/06/04 14:18:03, stichnot ...
6 years, 6 months ago (2014-06-04 18:17:57 UTC) #9
Jim Stichnoth
6 years, 6 months ago (2014-06-04 18:57:12 UTC) #10
Message was sent while issue was closed.
Committed patchset #4 manually as rd97c7df (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698