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

Issue 589003002: Subzero: Refactor tracking of Defs and block-local Variables. (Closed)

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

Description

Subzero: Refactor tracking of Defs and block-local Variables. This affects tracking of two kinds of Variable metadata: whether a Variable is block-local (i.e., all uses are in a single block) and if so, which CfgNode that is; and whether a Variable has a single defining instruction, and if so, which Inst that is. Originally, this metadata was constructed incrementally, which was quite fragile and most likely inaccurate under many circumstances. In the new approach, this metadata is reconstructed in a separate pass as needed. As a side benefit, the metadata fields are removed from each Variable and pulled into a separate structure, shrinking the size of Variable. There should be no functional changes, except that simple stack slot coalescing is turned off under Om1, since it takes a separate pass to calculate block-local variables, and passes are minimized under Om1. As a result, a couple of the lit tests needed to be changed. There are a few non-mechanical changes, generally to tighten up Variable tracking for liveness analysis. This is being done mainly to get precise Variable definition information so that register allocation can infer the best register preferences as well as when overlapping live ranges are allowable. BUG=none R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=144cdceaebc730d39e35861e4cc9577545e26bce

Patch Set 1 #

Patch Set 2 : Refactor a common function call into the caller #

Patch Set 3 : Indicate args as non-multidef #

Total comments: 8

Patch Set 4 : Code review updates #

Total comments: 2

Patch Set 5 : "Mark args as being used in the entry node" was unnecessary. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+335 lines, -226 lines) Patch
M src/IceCfg.h View 1 2 3 3 chunks +8 lines, -5 lines 0 comments Download
M src/IceCfg.cpp View 1 2 3 5 chunks +17 lines, -8 lines 0 comments Download
M src/IceCfgNode.cpp View 4 chunks +3 lines, -6 lines 0 comments Download
M src/IceConverter.cpp View 1 2 3 5 chunks +2 lines, -6 lines 0 comments Download
M src/IceDefs.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/IceInst.h View 2 chunks +2 lines, -8 lines 0 comments Download
M src/IceInst.cpp View 3 chunks +4 lines, -20 lines 0 comments Download
M src/IceInstX8632.h View 3 chunks +8 lines, -10 lines 0 comments Download
M src/IceInstX8632.cpp View 2 chunks +5 lines, -4 lines 0 comments Download
M src/IceLiveness.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M src/IceOperand.h View 1 2 3 5 chunks +65 lines, -37 lines 0 comments Download
M src/IceOperand.cpp View 1 2 3 4 4 chunks +143 lines, -47 lines 0 comments Download
M src/IceTargetLowering.h View 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLowering.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M src/IceTargetLoweringX8632.h View 2 chunks +3 lines, -2 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 29 chunks +62 lines, -63 lines 0 comments Download
M src/PNaClTranslator.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/align-spill-locations.ll View 1 chunk +2 lines, -2 lines 0 comments Download
M tests_lit/llvm2ice_tests/returns_twice_no_coalesce.ll View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 9 (1 generated)
Jim Stichnoth
6 years, 3 months ago (2014-09-22 05:40:09 UTC) #2
Jim Stichnoth
> There should be no functional changes Comparing the asm output determined that was a ...
6 years, 3 months ago (2014-09-22 12:54:24 UTC) #3
jvoung (off chromium)
https://codereview.chromium.org/589003002/diff/40001/src/IceConverter.cpp File src/IceConverter.cpp (left): https://codereview.chromium.org/589003002/diff/40001/src/IceConverter.cpp#oldcode135 src/IceConverter.cpp:135: assert(CurrentNode); It seems like CurrentNode is not read anymore, ...
6 years, 3 months ago (2014-09-22 17:07:29 UTC) #4
Jim Stichnoth
https://codereview.chromium.org/589003002/diff/40001/src/IceConverter.cpp File src/IceConverter.cpp (left): https://codereview.chromium.org/589003002/diff/40001/src/IceConverter.cpp#oldcode135 src/IceConverter.cpp:135: assert(CurrentNode); On 2014/09/22 17:07:29, jvoung wrote: > It seems ...
6 years, 3 months ago (2014-09-22 21:00:46 UTC) #5
jvoung (off chromium)
LGTM
6 years, 3 months ago (2014-09-22 21:29:55 UTC) #6
jvoung (off chromium)
https://codereview.chromium.org/589003002/diff/60001/src/IceOperand.cpp File src/IceOperand.cpp (right): https://codereview.chromium.org/589003002/diff/60001/src/IceOperand.cpp#newcode230 src/IceOperand.cpp:230: for (VarList::const_iterator I = ArgList.begin(), E = ArgList.end(); I ...
6 years, 3 months ago (2014-09-22 21:48:03 UTC) #7
Jim Stichnoth
https://codereview.chromium.org/589003002/diff/60001/src/IceOperand.cpp File src/IceOperand.cpp (right): https://codereview.chromium.org/589003002/diff/60001/src/IceOperand.cpp#newcode230 src/IceOperand.cpp:230: for (VarList::const_iterator I = ArgList.begin(), E = ArgList.end(); I ...
6 years, 3 months ago (2014-09-22 22:25:07 UTC) #8
Jim Stichnoth
6 years, 3 months ago (2014-09-22 23:03:09 UTC) #9
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as 144cdce (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698