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

Issue 1255303004: Add -reorder-basic-blocks option and fix nop insertion (Closed)

Created:
5 years, 4 months ago by qining
Modified:
5 years, 4 months ago
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

Add -reorder-basic-blocks option and fix nop insertion 1. Basic block reordering can be enabled with -reorder-basic-blocks option enabled. Blocks will be sorted according to the Reversed Post Traversal Order, but the next node to visit among all candidate children nodes is selected 'randomly'. Example: A / \ B C \ / D This CFG can generate two possible layouts: A-B-C-D or A-C-B-D 2. Fix nop insetion Add checks to avoiding insertions in empty basic blocks(dead blocks) and bundle locked instructions. BUG= R=jpp@chromium.org, jvoung@chromium.org, stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=969f6a33c32f9e7197672fbc911918589f5218bd

Patch Set 1 #

Patch Set 2 : Minor fix #

Total comments: 20

Patch Set 3 : fix comments #

Total comments: 8

Patch Set 4 : #

Patch Set 5 : minor fix #

Total comments: 4

Patch Set 6 : #

Total comments: 2

Patch Set 7 : #

Patch Set 8 : rebase to master branch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -59 lines) Patch
M src/IceCfg.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M src/IceCfg.cpp View 1 2 3 4 5 6 7 2 chunks +47 lines, -0 lines 0 comments Download
M src/IceCfgNode.cpp View 1 2 3 1 chunk +11 lines, -7 lines 0 comments Download
M src/IceClFlags.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M src/IceClFlags.cpp View 1 2 3 4 5 6 7 4 chunks +16 lines, -16 lines 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 2 3 4 5 6 7 3 chunks +10 lines, -7 lines 0 comments Download
M tests_lit/llvm2ice_tests/nop-insertion.ll View 1 2 2 chunks +63 lines, -29 lines 0 comments Download
A tests_lit/llvm2ice_tests/reorder-basic-blocks.ll View 1 2 3 4 5 1 chunk +41 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (1 generated)
qining
5 years, 4 months ago (2015-07-28 21:54:10 UTC) #2
John
https://codereview.chromium.org/1255303004/diff/20001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1255303004/diff/20001/src/IceCfg.cpp#newcode340 src/IceCfg.cpp:340: void getRandomReversedPostOrder(NodeType *Node, Does this need to be a ...
5 years, 4 months ago (2015-07-29 17:52:36 UTC) #3
jvoung (off chromium)
https://codereview.chromium.org/1255303004/diff/20001/src/IceCfgNode.cpp File src/IceCfgNode.cpp (right): https://codereview.chromium.org/1255303004/diff/20001/src/IceCfgNode.cpp#newcode503 src/IceCfgNode.cpp:503: Target->doNopInsertion(); On BundleUnlock what happens? Does it insert nops ...
5 years, 4 months ago (2015-07-29 18:09:18 UTC) #4
qining
Updated to Patch set 3. https://codereview.chromium.org/1255303004/diff/20001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1255303004/diff/20001/src/IceCfg.cpp#newcode340 src/IceCfg.cpp:340: void getRandomReversedPostOrder(NodeType *Node, On ...
5 years, 4 months ago (2015-07-29 23:04:40 UTC) #5
Jim Stichnoth
https://codereview.chromium.org/1255303004/diff/40001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1255303004/diff/40001/src/IceCfg.cpp#newcode354 src/IceCfg.cpp:354: } add "// end of anonymous namespace" comment https://codereview.chromium.org/1255303004/diff/40001/src/IceCfg.cpp#newcode357 ...
5 years, 4 months ago (2015-07-30 16:30:51 UTC) #6
qining
Updated to Patch set 4. Change the Node container used for DFS from List<> to ...
5 years, 4 months ago (2015-07-30 20:25:55 UTC) #7
Jim Stichnoth
https://codereview.chromium.org/1255303004/diff/80001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1255303004/diff/80001/src/IceCfg.cpp#newcode403 src/IceCfg.cpp:403: Unreachable.push_back(Nodes[i]); Unfortunately, I think I may have led you ...
5 years, 4 months ago (2015-07-30 21:14:33 UTC) #8
qining
Updated to Patch Set 6. https://codereview.chromium.org/1255303004/diff/80001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1255303004/diff/80001/src/IceCfg.cpp#newcode403 src/IceCfg.cpp:403: Unreachable.push_back(Nodes[i]); On 2015/07/30 21:14:33, ...
5 years, 4 months ago (2015-07-30 21:38:32 UTC) #9
Jim Stichnoth
lgtm https://codereview.chromium.org/1255303004/diff/100001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1255303004/diff/100001/src/IceCfg.cpp#newcode409 src/IceCfg.cpp:409: for (int i = ReversedReachable.size() - 1; i ...
5 years, 4 months ago (2015-07-30 21:59:15 UTC) #10
qining
Apply reverse_range in patch set 7 https://codereview.chromium.org/1255303004/diff/100001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1255303004/diff/100001/src/IceCfg.cpp#newcode409 src/IceCfg.cpp:409: for (int i ...
5 years, 4 months ago (2015-07-30 22:19:51 UTC) #11
jvoung (off chromium)
LGTM too btw
5 years, 4 months ago (2015-07-31 15:30:08 UTC) #12
John
lgtm
5 years, 4 months ago (2015-07-31 16:13:56 UTC) #13
qining
5 years, 4 months ago (2015-07-31 16:58:39 UTC) #14
Message was sent while issue was closed.
Committed patchset #8 (id:140001) manually as
969f6a33c32f9e7197672fbc911918589f5218bd (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698