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

Issue 1418853005: Subzero: Refactor some common TargetLowering initializations. (Closed)

Created:
5 years, 1 month ago by Jim Stichnoth
Modified:
5 years, 1 month 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: Refactor some common TargetLowering initializations. Each TargetLowering subclass has several fields (generally register allocation related) that are initialized to the same values every time a TargetLowering object is created. These fields are essentially const once initialized, so there is no reason to repeatedly initialize them. The solution is to make them static fields, and statically initialize them at program startup. This also makes it practical to access such fields without needing a TargetLowering object. There are likely more items that should also get this treatment, but those can be changed later. The staticInit() method needs a run-once guard because the unit tests actually cause it to be called more than once. BUG= none R=kschimpf@google.com Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=94844f1290d7fae68ad4f9e9b9e3543639e44a15

Patch Set 1 #

Patch Set 2 : Move static field definitions into .cpp files #

Total comments: 6

Patch Set 3 : Code review changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -17 lines) Patch
M src/IceGlobalContext.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M src/IceTargetLowering.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
M src/IceTargetLoweringARM32.h View 1 2 chunks +4 lines, -3 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 1 2 chunks +7 lines, -3 lines 0 comments Download
M src/IceTargetLoweringMIPS32.h View 2 chunks +4 lines, -3 lines 0 comments Download
M src/IceTargetLoweringMIPS32.cpp View 2 chunks +6 lines, -3 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 1 chunk +13 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8664.cpp View 1 1 chunk +13 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX86Base.h View 2 chunks +4 lines, -3 lines 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Jim Stichnoth
5 years, 1 month ago (2015-11-02 23:10:26 UTC) #4
Jim Stichnoth
Ping. The rest of the x86 register refactoring builds on this, so I'd like to ...
5 years, 1 month ago (2015-11-04 14:51:08 UTC) #5
Karl
lgtm
5 years, 1 month ago (2015-11-04 16:26:58 UTC) #6
John
https://codereview.chromium.org/1418853005/diff/20001/src/IceTargetLowering.cpp File src/IceTargetLowering.cpp (right): https://codereview.chromium.org/1418853005/diff/20001/src/IceTargetLowering.cpp#newcode109 src/IceTargetLowering.cpp:109: static bool InitGuard = false; Not that this matter, ...
5 years, 1 month ago (2015-11-04 21:35:23 UTC) #7
Jim Stichnoth
https://codereview.chromium.org/1418853005/diff/20001/src/IceTargetLowering.cpp File src/IceTargetLowering.cpp (right): https://codereview.chromium.org/1418853005/diff/20001/src/IceTargetLowering.cpp#newcode109 src/IceTargetLowering.cpp:109: static bool InitGuard = false; On 2015/11/04 21:35:23, John ...
5 years, 1 month ago (2015-11-04 23:51:39 UTC) #8
Jim Stichnoth
5 years, 1 month ago (2015-11-05 00:06:22 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
94844f1290d7fae68ad4f9e9b9e3543639e44a15 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698