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

Issue 680733002: Subzero: Allow delaying Phi lowering until after register allocation. (Closed)

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

Description

Subzero: Implementation of "advanced Phi lowering". Delays Phi lowering until after register allocation. This lets the Phi assignment order take register allocation into account and avoid creating false dependencies. All edges that lead to Phi instructions are split, and the new node gets mov instructions in the correct topological order, using available physical registers as needed. This lowering style is controllable under -O2 using -phi-edge-split (enabled by default). The result is faster translation time (due to fewer temporaries leading to faster liveness analysis and register allocation) as well as better code quality (due to better register allocation and fewer phi-based assignments). BUG= none R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=336f6c4a90e7f5ee156bc9a339d80c7def5ddeff

Patch Set 1 #

Patch Set 2 : Fix lit tests #

Patch Set 3 : Clean up lowerPhiAssignments() #

Patch Set 4 : Minor cleanup #

Total comments: 35

Patch Set 5 : Code review changes #

Total comments: 14

Patch Set 6 : Code review round 2 #

Patch Set 7 : Refactor the mem=mem pattern during phi lowering #

Total comments: 4

Patch Set 8 : Fix vector const undef lowering for phis. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+830 lines, -109 lines) Patch
M pydir/szbuild_spec2k.py View 1 chunk +5 lines, -4 lines 0 comments Download
M src/IceCfg.h View 2 chunks +3 lines, -0 lines 0 comments Download
M src/IceCfg.cpp View 1 2 3 4 5 2 chunks +87 lines, -0 lines 0 comments Download
M src/IceCfgNode.h View 3 chunks +7 lines, -0 lines 0 comments Download
M src/IceCfgNode.cpp View 1 2 3 4 5 9 chunks +321 lines, -8 lines 0 comments Download
M src/IceDefs.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/IceInst.h View 1 2 3 4 4 chunks +22 lines, -3 lines 0 comments Download
M src/IceInst.cpp View 1 2 3 4 5 chunks +29 lines, -3 lines 0 comments Download
M src/IceInstX8632.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/IceInstX8632.cpp View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M src/IceLiveness.h View 2 chunks +26 lines, -5 lines 0 comments Download
M src/IceLiveness.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M src/IceOperand.h View 1 2 3 4 chunks +11 lines, -3 lines 0 comments Download
M src/IceOperand.cpp View 1 chunk +55 lines, -30 lines 0 comments Download
M src/IceRegAlloc.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M src/IceTargetLowering.h View 2 chunks +12 lines, -1 line 0 comments Download
M src/IceTargetLowering.cpp View 1 2 3 4 1 chunk +6 lines, -2 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 2 chunks +4 lines, -1 line 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 6 7 11 chunks +196 lines, -20 lines 0 comments Download
M src/IceTimerTree.def View 1 chunk +1 line, -0 lines 0 comments Download
M src/IceTypes.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/IceTypes.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/llvm2ice.cpp View 1 2 3 4 5 6 2 chunks +10 lines, -10 lines 0 comments Download
M tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll View 1 3 chunks +2 lines, -8 lines 0 comments Download
M tests_lit/llvm2ice_tests/simple-loop.ll View 1 1 chunk +9 lines, -8 lines 0 comments Download

Messages

Total messages: 14 (1 generated)
Jim Stichnoth
6 years, 1 month ago (2014-10-26 06:16:25 UTC) #2
jvoung (off chromium)
whew https://codereview.chromium.org/680733002/diff/60001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/680733002/diff/60001/src/IceCfg.cpp#newcode194 src/IceCfg.cpp:194: Nodes[Cur++] = Node; Would it be good to ...
6 years, 1 month ago (2014-10-27 22:12:21 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/680733002/diff/60001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/680733002/diff/60001/src/IceCfg.cpp#newcode194 src/IceCfg.cpp:194: Nodes[Cur++] = Node; On 2014/10/27 22:12:20, jvoung wrote: > ...
6 years, 1 month ago (2014-10-28 01:20:14 UTC) #4
Derek Schuff
Context-free ignorant drive-by: premature optimization is the root of all evil. Wouldn't it make more ...
6 years, 1 month ago (2014-10-28 22:35:02 UTC) #5
jvoung (off chromium)
https://codereview.chromium.org/680733002/diff/60001/src/IceCfgNode.cpp File src/IceCfgNode.cpp (right): https://codereview.chromium.org/680733002/diff/60001/src/IceCfgNode.cpp#newcode769 src/IceCfgNode.cpp:769: I->repointEdge(this, OutEdges[0]); On 2014/10/28 01:20:14, stichnot wrote: > On ...
6 years, 1 month ago (2014-10-29 13:46:51 UTC) #6
Jim Stichnoth
On 2014/10/28 22:35:02, Derek Schuff wrote: > Context-free ignorant drive-by: premature optimization is the root ...
6 years, 1 month ago (2014-10-29 14:30:54 UTC) #7
Jim Stichnoth
(unfortunately it looks like "make format-diff" got a bit more aggressive than it should have.) ...
6 years, 1 month ago (2014-10-30 00:25:27 UTC) #8
jvoung (off chromium)
otherwise LGTM https://codereview.chromium.org/680733002/diff/80001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/680733002/diff/80001/src/IceTargetLoweringX8632.cpp#newcode4222 src/IceTargetLoweringX8632.cpp:4222: if (llvm::isa<ConstantUndef>(Src)) { On 2014/10/30 00:25:25, stichnot ...
6 years, 1 month ago (2014-10-30 15:55:25 UTC) #9
Jim Stichnoth
PTAL, thanks! https://codereview.chromium.org/680733002/diff/80001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/680733002/diff/80001/src/IceTargetLoweringX8632.cpp#newcode4222 src/IceTargetLoweringX8632.cpp:4222: if (llvm::isa<ConstantUndef>(Src)) { On 2014/10/30 15:55:25, jvoung ...
6 years, 1 month ago (2014-10-30 19:10:34 UTC) #10
jvoung (off chromium)
https://codereview.chromium.org/680733002/diff/120001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/680733002/diff/120001/src/IceTargetLoweringX8632.cpp#newcode4228 src/IceTargetLoweringX8632.cpp:4228: bool NeedSpill = !AvailRegsForType.any(); nit: Could be NeedSpill == ...
6 years, 1 month ago (2014-10-30 19:47:42 UTC) #11
Jim Stichnoth
https://codereview.chromium.org/680733002/diff/120001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/680733002/diff/120001/src/IceTargetLoweringX8632.cpp#newcode4228 src/IceTargetLoweringX8632.cpp:4228: bool NeedSpill = !AvailRegsForType.any(); On 2014/10/30 19:47:42, jvoung wrote: ...
6 years, 1 month ago (2014-10-30 21:43:01 UTC) #12
jvoung (off chromium)
LGTM
6 years, 1 month ago (2014-10-30 22:01:06 UTC) #13
Jim Stichnoth
6 years, 1 month ago (2014-10-30 22:01:45 UTC) #14
Message was sent while issue was closed.
Committed patchset #8 (id:140001) manually as
336f6c4a90e7f5ee156bc9a339d80c7def5ddeff (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698