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

Issue 1548363002: Subzero. Code organization. (Closed)

Created:
4 years, 12 months ago by John
Modified:
4 years, 11 months ago
Reviewers:
Jim Stichnoth, Karl, sehr
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. Code organization. This CL does more than any CL should. First, it moves all target-specific classes (TargetLowering, Assembler, and Instructions) to a target-specific namespace. For example, the ::Ice::TargetX8632 class now lives in ::Ice::X8632::TargetX8632. Same goes for ARM32, X8664, and MIPS32. Now, we have a ton of redundant prefixes (it should be pretty obvious that ::Ice::X8632::TargetLowering is an X8632 target lowering), but this is definitively not something for this CL. Second, this CL gets rid of the excessive use of 'typename Foo::Bar' in the X86 templates. These changes appear more intimidating than they really are, and they were fairly mechanical. Third, the x86?? Traitses (gollum!) classes are no longer template instatiation. The previous X86 templates were parameterized with a X86 TargetLowering, and they assumed that a MachineTraits<Target> was defined for that TargetLowering. The X86 templates are now parameterized with a TraitsType, and different backends may have completely unrelated traits. Fourth, the X86 templates are no longer members of ::Ice::X86Internal. Instead, each file #include'ing a Ice*X86Base.h file need to #define X86NAMESPACE to the namespace where the backend is being defined. With this change, the template instantiation for X8632 live in ::Ice::X8632, and, for X8664, in ::Ice::X8664. BUG= R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=4a56686b5b56db6803f90ad53514bf2fa190d9f7

Patch Set 1 #

Patch Set 2 : replaces MachineTraits with Traits. #

Patch Set 3 : X86 Templates are now parameterized with the traits, not an X86 Target. #

Patch Set 4 : A lot of stuff to describe. Please accept as is. #

Patch Set 5 : Removes the 'typename Traits::' verbosity from the X86 Base Assembler. #

Patch Set 6 : moves the X86 base instructions into an InstImpl template struct. #

Patch Set 7 : Removes the typename Traits:: verbosity from X86 Inst Base. #

Patch Set 8 : Removes more X86 Inst gunk #

Patch Set 9 : git pull && git merge #

Patch Set 10 : Removes the typename Traits:: verbosity from IceTargetLoweringX86Base. #

Patch Set 11 : Eliminate the MachineTraits<> template. Each x86 Targets' traits class is unrelated to one another. #

Patch Set 12 : Moves X86?? related stuff to ::Ice::X86?? #

Patch Set 13 : Moves ARM32 related code to ::Ice::ARM32. #

Patch Set 14 : Moves MIPS32 related code to ::Ice::MIPS32 #

Patch Set 15 : Renames TempNameFoofr to TraitsType. #

Patch Set 16 : make format #

Patch Set 17 : Attempt to reflow comments. #

Patch Set 18 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+5993 lines, -6597 lines) Patch
M src/IceAssemblerX8632.h View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -29 lines 0 comments Download
M src/IceAssemblerX8664.h View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -29 lines 0 comments Download
M src/IceAssemblerX86Base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 20 chunks +456 lines, -637 lines 0 comments Download
M src/IceAssemblerX86BaseImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 201 chunks +804 lines, -933 lines 0 comments Download
M src/IceInstARM32.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M src/IceInstARM32.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M src/IceInstMIPS32.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M src/IceInstMIPS32.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M src/IceInstX8632.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M src/IceInstX8632.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 13 chunks +38 lines, -34 lines 0 comments Download
M src/IceInstX8664.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M src/IceInstX8664.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 12 chunks +33 lines, -32 lines 0 comments Download
M src/IceInstX86Base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3111 lines, -3076 lines 2 comments Download
M src/IceInstX86BaseImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 91 chunks +891 lines, -1183 lines 0 comments Download
M src/IceRegistersARM32.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M src/IceRegistersMIPS32.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M src/IceTargetLoweringARM32.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -4 lines 0 comments Download
M src/IceTargetLoweringMIPS32.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M src/IceTargetLoweringMIPS32.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -4 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -5 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +24 lines, -30 lines 0 comments Download
M src/IceTargetLoweringX8632Traits.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +15 lines, -16 lines 0 comments Download
M src/IceTargetLoweringX8664.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -5 lines 0 comments Download
M src/IceTargetLoweringX8664.cpp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +24 lines, -30 lines 0 comments Download
M src/IceTargetLoweringX8664Traits.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +16 lines, -17 lines 0 comments Download
M src/IceTargetLoweringX86Base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 20 chunks +73 lines, -60 lines 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 158 chunks +442 lines, -467 lines 1 comment Download
M src/IceTargetLoweringX86RegClass.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -2 lines 0 comments Download
M unittest/AssemblerX8632/TestUtil.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
M unittest/AssemblerX8664/TestUtil.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (4 generated)
John
And to end the year, how anout a nice 6k+ CL? :) This one was ...
4 years, 11 months ago (2015-12-30 22:07:53 UTC) #3
Jim Stichnoth
This will sadly wreak havoc on in-progress CLs, but it's definitely an improvement, so LGTM. ...
4 years, 11 months ago (2016-01-03 18:20:02 UTC) #5
John
4 years, 11 months ago (2016-01-04 17:33:46 UTC) #7
Message was sent while issue was closed.
Committed patchset #18 (id:340001) manually as
4a56686b5b56db6803f90ad53514bf2fa190d9f7 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698