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

Issue 1441793002: Subzero: Find rematerializable variables transitively. (Closed)

Created:
5 years, 1 month ago by Jim Stichnoth
Modified:
5 years, 1 month ago
Reviewers:
Karl, sehr, John
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: Find rematerializable variables transitively. There are situations where a variable is assigned as the result of a rematerializable alloca instruction, and then another variable is assigned as essentially a known-offset interior pointer into the alloca space. In this case, the secondary variable is also rematerializable. We add a pass, after alloca analysis, to find these derived variables and mark them transitively as rematerializable. Because we lack use-def chains (or in fact any map to variable use locations), we need to iterate over the CFG until convergence. Fortunately, this is pretty cheap, and not even done unless the alloca analysis seeds it with an initial set of rematerializable variables. This analysis is only really needed for arithmetic instructions, but we also need to apply it to assignments and pointer-type bitcasts that are added when the IceConverter directly parses a .ll file rather than a .pexe file. BUG= none R=jpp@chromium.org, sehr@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=3607b6c924922d261cbc75b68e07a1e2a5aec5dc

Patch Set 1 #

Patch Set 2 : Suppress stack offset defs for rematerialize variables in asm-verbose mode #

Total comments: 4

Patch Set 3 : Make the analysis loop more readable #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -9 lines) Patch
M src/IceCfg.h View 2 chunks +10 lines, -8 lines 0 comments Download
M src/IceCfg.cpp View 1 2 2 chunks +103 lines, -1 line 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 2 chunks +8 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/fused-alloca.ll View 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
Jim Stichnoth
I was trying to get 1-2% gain on perlbmk, but the surprise looks like 7-8% ...
5 years, 1 month ago (2015-11-12 20:08:05 UTC) #3
John
lgtm https://codereview.chromium.org/1441793002/diff/20001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1441793002/diff/20001/src/IceCfg.cpp#newcode672 src/IceCfg.cpp:672: if (Src0Var->isRematerializable()) { soooo many nest levels. My ...
5 years, 1 month ago (2015-11-12 20:43:15 UTC) #4
Jim Stichnoth
https://codereview.chromium.org/1441793002/diff/20001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1441793002/diff/20001/src/IceCfg.cpp#newcode672 src/IceCfg.cpp:672: if (Src0Var->isRematerializable()) { On 2015/11/12 20:43:14, John wrote: > ...
5 years, 1 month ago (2015-11-12 21:02:44 UTC) #5
John
https://codereview.chromium.org/1441793002/diff/20001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1441793002/diff/20001/src/IceCfg.cpp#newcode672 src/IceCfg.cpp:672: if (Src0Var->isRematerializable()) { On 2015/11/12 21:02:44, stichnot wrote: > ...
5 years, 1 month ago (2015-11-12 21:11:39 UTC) #6
Jim Stichnoth
https://codereview.chromium.org/1441793002/diff/20001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1441793002/diff/20001/src/IceCfg.cpp#newcode672 src/IceCfg.cpp:672: if (Src0Var->isRematerializable()) { On 2015/11/12 21:11:39, John wrote: > ...
5 years, 1 month ago (2015-11-13 01:18:48 UTC) #7
sehr
lgtm
5 years, 1 month ago (2015-11-13 21:46:26 UTC) #8
Jim Stichnoth
5 years, 1 month ago (2015-11-13 22:28:29 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
3607b6c924922d261cbc75b68e07a1e2a5aec5dc (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698