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

Issue 1392383003: Subzero: Consider all instruction variables for register preference. (Closed)

Created:
5 years, 2 months ago by Jim Stichnoth
Modified:
5 years, 2 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

Subzero: Consider all instruction variables for register preference. The original code only looked at top-level source operands in the defining instruction, with a TODO to instead consider all inner variables in the instruction. The primary reason is so that we end up with more instructions like mov eax, eax which are later elided as redundant assignments. A secondary reason is to foster more instructions like: mov ecx, [ecx] rather than mov eax, [ecx] where ecx's live range ends. This hopefully keeps eax (in the latter case) free for longer and maybe allow some other variable to get a register. By considering all instruction variables, we enable this. BUG= none R=jpp@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=28b71be495bb1eada446ba36b5236914d79cea0e

Patch Set 1 #

Total comments: 13

Patch Set 2 : Code review changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -25 lines) Patch
M src/IceInst.h View 2 chunks +4 lines, -2 lines 0 comments Download
M src/IceInst.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M src/IceInstARM32.h View 1 chunk +1 line, -1 line 0 comments Download
M src/IceInstVarIter.h View 1 3 chunks +9 lines, -3 lines 0 comments Download
M src/IceInstX86Base.h View 1 chunk +3 lines, -1 line 0 comments Download
M src/IceRegAlloc.cpp View 1 4 chunks +22 lines, -13 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 chunk +4 lines, -5 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
Jim Stichnoth
5 years, 2 months ago (2015-10-12 00:27:13 UTC) #2
John
lgtm lgtm otherwise https://chromiumcodereview.appspot.com/1392383003/diff/1/src/IceInstARM32.h File src/IceInstARM32.h (right): https://chromiumcodereview.appspot.com/1392383003/diff/1/src/IceInstARM32.h#newcode1155 src/IceInstARM32.h:1155: bool isVarAssign() const override { return ...
5 years, 2 months ago (2015-10-12 15:35:17 UTC) #3
Jim Stichnoth
PTAL. https://chromiumcodereview.appspot.com/1392383003/diff/1/src/IceInstARM32.h File src/IceInstARM32.h (right): https://chromiumcodereview.appspot.com/1392383003/diff/1/src/IceInstARM32.h#newcode1155 src/IceInstARM32.h:1155: bool isVarAssign() const override { return llvm::isa<Variable>(getSrc(0)); } ...
5 years, 2 months ago (2015-10-12 17:27:31 UTC) #4
John
lgtm Still LGTM. https://chromiumcodereview.appspot.com/1392383003/diff/1/src/IceRegAlloc.cpp File src/IceRegAlloc.cpp (right): https://chromiumcodereview.appspot.com/1392383003/diff/1/src/IceRegAlloc.cpp#newcode504 src/IceRegAlloc.cpp:504: if (SrcVar->hasRegTmp() && (Iter.RegMask & *RegAliases[SrcReg]).any()) ...
5 years, 2 months ago (2015-10-12 20:39:58 UTC) #5
Jim Stichnoth
5 years, 2 months ago (2015-10-12 22:24:52 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
28b71be495bb1eada446ba36b5236914d79cea0e (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698