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

Issue 1641653004: Subzero: Make the register allocator more robust with -reg-use and -reg-exclude. (Closed)

Created:
4 years, 10 months ago by Jim Stichnoth
Modified:
4 years, 10 months ago
Reviewers:
Eric Holk, 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: Make the register allocator more robust with -reg-use and -reg-exclude. The problem is that if you too aggressively -reg-use or -reg-exclude, you can get failures because of inherently high register pressure, and there are also contributions from the "specialty" register classes. For example, when you combine load optimization, address mode inference, local register availability optimization, and the div instruction, you can end up needing 5 simultaneously live infinite-weight registers. The fix/enhancement here is to keep track of the "reserve" set of registers for each register class, and allow the register allocator to draw from that as a last resort. This behavior is guarded by the -reg-reserve flag. This CL also includes two improvements in lowering sequences to reduce register pressure. BUG= none R=kschimpf@google.com Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=b40595a17b83cca5d11f8d056a4ac5a4d8102a84

Patch Set 1 #

Patch Set 2 : Test code accidentally left in #

Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -96 lines) Patch
M src/IceCfg.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/IceCfg.cpp View 2 chunks +27 lines, -1 line 0 comments Download
M src/IceClFlags.h View 2 chunks +7 lines, -0 lines 0 comments Download
M src/IceClFlags.cpp View 2 chunks +8 lines, -0 lines 0 comments Download
M src/IceGlobalContext.cpp View 3 chunks +4 lines, -3 lines 0 comments Download
M src/IceRegAlloc.h View 3 chunks +4 lines, -1 line 0 comments Download
M src/IceRegAlloc.cpp View 12 chunks +129 lines, -82 lines 0 comments Download
M src/IceTargetLowering.h View 1 chunk +7 lines, -0 lines 0 comments Download
M src/IceTargetLoweringARM32.h View 2 chunks +8 lines, -0 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 2 chunks +5 lines, -0 lines 0 comments Download
M src/IceTargetLoweringMIPS32.h View 2 chunks +7 lines, -0 lines 0 comments Download
M src/IceTargetLoweringMIPS32.cpp View 2 chunks +4 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8664.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX86Base.h View 2 chunks +9 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 4 chunks +5 lines, -3 lines 0 comments Download
M tests_lit/llvm2ice_tests/64bit.pnacl.ll View 3 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 9 (6 generated)
Jim Stichnoth
This enhancement could use better diagnostics to help find more places where register pressure could ...
4 years, 10 months ago (2016-01-28 00:50:02 UTC) #4
Karl
LGTM. Register allocation code looks ok, but I don't know enough to be sure.
4 years, 10 months ago (2016-01-28 21:10:56 UTC) #7
Jim Stichnoth
4 years, 10 months ago (2016-01-29 14:14:37 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
b40595a17b83cca5d11f8d056a4ac5a4d8102a84 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698