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

Issue 1312433004: Weight variables by their number of uses for register allocation. (Closed)

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

Weight variables for register allocation by their number of uses. Count the number of instructions that use a variable following the heuristic that more uses implies higher register priority. This is currently very simple but is precursor work for weighting variables by loop nest depth. BUG= R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=11c9a325399b282cb4ea7d1d24d42fceeec2a09a

Patch Set 1 #

Total comments: 17

Patch Set 2 : Tidy up lose ends. #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : Don't count a use if used as dest. #

Total comments: 9

Patch Set 5 : Correctly count variable uses in a new pass. #

Patch Set 6 : Count uses in VMetadata #

Total comments: 8

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -106 lines) Patch
M src/IceCfg.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/IceCfgNode.cpp View 1 2 chunks +4 lines, -4 lines 0 comments Download
M src/IceLiveness.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/IceOperand.h View 1 2 3 4 5 6 13 chunks +36 lines, -38 lines 0 comments Download
M src/IceOperand.cpp View 1 2 3 4 5 3 chunks +19 lines, -1 line 0 comments Download
M src/IceRegAlloc.cpp View 1 2 3 4 5 7 chunks +10 lines, -11 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLoweringX8664.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 5 17 chunks +17 lines, -17 lines 0 comments Download
M tests_lit/assembler/x86/jump_encodings.ll View 1 2 3 4 5 6 1 chunk +7 lines, -7 lines 0 comments Download
M tests_lit/assembler/x86/opcode_register_encodings.ll View 1 2 3 4 3 chunks +17 lines, -17 lines 0 comments Download
M tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 13 (1 generated)
ascull
https://codereview.chromium.org/1312433004/diff/1/tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll File tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll (left): https://codereview.chromium.org/1312433004/diff/1/tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll#oldcode131 tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll:131: ; O2: mov {{.*}} Discussed with Jan. This used ...
5 years, 3 months ago (2015-08-26 19:24:36 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/1312433004/diff/1/src/IceInst.cpp File src/IceInst.cpp (right): https://codereview.chromium.org/1312433004/diff/1/src/IceInst.cpp#newcode183 src/IceInst.cpp:183: Dest->addUse(1); Hmm, not sure we should count definitions as ...
5 years, 3 months ago (2015-08-26 21:45:47 UTC) #3
ascull
https://codereview.chromium.org/1312433004/diff/1/src/IceInst.cpp File src/IceInst.cpp (right): https://codereview.chromium.org/1312433004/diff/1/src/IceInst.cpp#newcode183 src/IceInst.cpp:183: Dest->addUse(1); On 2015/08/26 21:45:46, jvoung wrote: > Hmm, not ...
5 years, 3 months ago (2015-08-26 22:06:39 UTC) #4
jvoung (off chromium)
https://codereview.chromium.org/1312433004/diff/1/src/IceInst.cpp File src/IceInst.cpp (right): https://codereview.chromium.org/1312433004/diff/1/src/IceInst.cpp#newcode183 src/IceInst.cpp:183: Dest->addUse(1); On 2015/08/26 22:06:38, ascull wrote: > On 2015/08/26 ...
5 years, 3 months ago (2015-08-26 22:35:16 UTC) #5
ascull
https://codereview.chromium.org/1312433004/diff/1/src/IceInst.cpp File src/IceInst.cpp (right): https://codereview.chromium.org/1312433004/diff/1/src/IceInst.cpp#newcode183 src/IceInst.cpp:183: Dest->addUse(1); On 2015/08/26 22:35:16, jvoung wrote: > On 2015/08/26 ...
5 years, 3 months ago (2015-08-26 22:53:49 UTC) #6
Jim Stichnoth
https://codereview.chromium.org/1312433004/diff/60001/src/IceInst.cpp File src/IceInst.cpp (right): https://codereview.chromium.org/1312433004/diff/60001/src/IceInst.cpp#newcode185 src/IceInst.cpp:185: Live[VarNum] = false; I kind of expected Dest to ...
5 years, 3 months ago (2015-08-27 05:03:06 UTC) #7
jvoung (off chromium)
https://codereview.chromium.org/1312433004/diff/60001/src/IceInst.cpp File src/IceInst.cpp (right): https://codereview.chromium.org/1312433004/diff/60001/src/IceInst.cpp#newcode185 src/IceInst.cpp:185: Live[VarNum] = false; On 2015/08/27 05:03:06, stichnot wrote: > ...
5 years, 3 months ago (2015-08-27 18:34:27 UTC) #8
Jim Stichnoth
https://codereview.chromium.org/1312433004/diff/60001/src/IceInst.cpp File src/IceInst.cpp (right): https://codereview.chromium.org/1312433004/diff/60001/src/IceInst.cpp#newcode208 src/IceInst.cpp:208: Var->addUse(1); On 2015/08/27 18:34:27, jvoung wrote: > On 2015/08/27 ...
5 years, 3 months ago (2015-08-27 20:04:21 UTC) #9
ascull
Now the counting happen along with the VariableMetadata. Below show the previous number of Spill+Fill ...
5 years, 3 months ago (2015-08-28 19:26:36 UTC) #10
jvoung (off chromium)
otherwise LGTM -- the new spill+fill counts are pretty encouraging! https://codereview.chromium.org/1312433004/diff/100001/src/IceInst.cpp File src/IceInst.cpp (left): https://codereview.chromium.org/1312433004/diff/100001/src/IceInst.cpp#oldcode206 ...
5 years, 3 months ago (2015-08-28 20:31:45 UTC) #11
ascull
https://codereview.chromium.org/1312433004/diff/100001/src/IceInst.cpp File src/IceInst.cpp (left): https://codereview.chromium.org/1312433004/diff/100001/src/IceInst.cpp#oldcode206 src/IceInst.cpp:206: const Variable *Var = Src->getVar(J); On 2015/08/28 20:31:45, jvoung ...
5 years, 3 months ago (2015-08-28 21:22:37 UTC) #12
ascull
5 years, 3 months ago (2015-08-28 21:24:19 UTC) #13
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as
11c9a325399b282cb4ea7d1d24d42fceeec2a09a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698