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

Issue 916653004: Subzero: Emit functions and global initializers in a separate thread. (Closed)

Created:
5 years, 10 months ago by Jim Stichnoth
Modified:
5 years, 10 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: Emit functions and global initializers in a separate thread. (This is a continuation of https://codereview.chromium.org/876083007/ .) Emission is done in a separate thread when -threads=N with N>0 is specified. This includes both functions and global initializers. Emission is deterministic. The parser assigns sequence numbers, and the emitter thread reassembles work units into their original order, regardless of the number of threads. Dump output, however, is not intended to be in deterministic, reassembled order. As such, lit tests that test dump output (i.e., '-verbose inst') are explicitly run with -threads=0. For -elf-writer and -ias=1, the translator thread invokes Cfg::emitIAS() and the assembler buffer is passed to the emitter thread. For -ias=0, the translator thread passed the Cfg to the emitter thread which then invokes Cfg::emit() to produce the textual asm. Minor cleanup along the way: * Removed Flags from the Ice::Translator object and ctor, since it was redundant with Ctx->getFlags(). * Cfg::getAssembler<> is the same as Cfg::getAssembler<Assembler> and is useful for just passing the assembler around. * Removed the redundant Ctx argument from TargetDataLowering::lowerConstants() . BUG= https://code.google.com/p/nativeclient/issues/detail?id=4075 R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=bbca754a63fb1e80b4d0f034aa26538f3a8a2a26

Patch Set 1 #

Patch Set 2 : Add IceThreading.cpp #

Patch Set 3 : Add ClFlags::isSequential() #

Patch Set 4 : Remove TODO. Cleanup. #

Patch Set 5 : Set ias=1 for unit tests to avoid failure in the MINIMAL build #

Total comments: 10

Patch Set 6 : Code review changes #

Patch Set 7 : Change some *Foo.get() to *Foo #

Total comments: 2

Patch Set 8 : Const change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+460 lines, -367 lines) Patch
M Makefile.standalone View 1 chunk +1 line, -0 lines 0 comments Download
M pydir/run-llvm2ice.py View 1 chunk +4 lines, -1 line 0 comments Download
M src/IceCfg.h View 1 2 3 4 5 6 7 5 chunks +10 lines, -5 lines 0 comments Download
M src/IceCfg.cpp View 1 2 3 4 5 6 7 4 chunks +12 lines, -21 lines 0 comments Download
M src/IceCfgNode.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/IceClFlags.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/IceConverter.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/IceConverter.cpp View 1 2 3 8 chunks +16 lines, -14 lines 0 comments Download
M src/IceGlobalContext.h View 7 chunks +44 lines, -10 lines 0 comments Download
M src/IceGlobalContext.cpp View 1 2 3 4 5 6 4 chunks +142 lines, -19 lines 0 comments Download
M src/IceTargetLowering.h View 1 2 3 4 5 2 chunks +12 lines, -9 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 chunk +6 lines, -5 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 6 2 chunks +15 lines, -5 lines 0 comments Download
A + src/IceThreading.h View 4 chunks +63 lines, -51 lines 0 comments Download
A src/IceThreading.cpp View 1 1 chunk +48 lines, -0 lines 0 comments Download
M src/IceTranslator.h View 3 chunks +7 lines, -5 lines 0 comments Download
M src/IceTranslator.cpp View 1 2 3 3 chunks +10 lines, -37 lines 0 comments Download
M src/IceUtils.h View 2 chunks +0 lines, -129 lines 0 comments Download
M src/PNaClTranslator.h View 1 chunk +1 line, -2 lines 0 comments Download
M src/PNaClTranslator.cpp View 3 chunks +4 lines, -6 lines 0 comments Download
M src/assembler.h View 2 chunks +10 lines, -1 line 0 comments Download
M src/llvm2ice.cpp View 2 chunks +2 lines, -3 lines 0 comments Download
M tests_lit/llvm2ice_tests/arith-opt.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/branch-simple.ll View 1 chunk +2 lines, -2 lines 0 comments Download
M tests_lit/llvm2ice_tests/globalrelocs.ll View 1 2 3 4 5 28 chunks +36 lines, -30 lines 0 comments Download
M tests_lit/llvm2ice_tests/load.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/nacl-atomic-errors.ll View 1 chunk +2 lines, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/store.ll View 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/struct-arith.pnacl.ll View 1 chunk +1 line, -1 line 0 comments Download
M unittest/BitcodeMunge.cpp View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 13 (2 generated)
Jim Stichnoth
This new CL is a continuation of the previous one after addressing all comments and ...
5 years, 10 months ago (2015-02-11 05:45:41 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/916653004/diff/80001/src/IceGlobalContext.cpp File src/IceGlobalContext.cpp (right): https://codereview.chromium.org/916653004/diff/80001/src/IceGlobalContext.cpp#newcode185 src/IceGlobalContext.cpp:185: Cfg::setCurrentCfg(nullptr); Could add a "continue;" here, and not have ...
5 years, 10 months ago (2015-02-11 16:56:01 UTC) #3
Karl
Unable to find any other issues than brought up by Jan.
5 years, 10 months ago (2015-02-11 17:52:20 UTC) #4
Jim Stichnoth
https://codereview.chromium.org/916653004/diff/80001/src/IceGlobalContext.cpp File src/IceGlobalContext.cpp (right): https://codereview.chromium.org/916653004/diff/80001/src/IceGlobalContext.cpp#newcode185 src/IceGlobalContext.cpp:185: Cfg::setCurrentCfg(nullptr); On 2015/02/11 16:56:01, jvoung wrote: > Could add ...
5 years, 10 months ago (2015-02-11 21:52:58 UTC) #5
Karl
https://codereview.chromium.org/916653004/diff/80001/src/IceGlobalContext.cpp File src/IceGlobalContext.cpp (right): https://codereview.chromium.org/916653004/diff/80001/src/IceGlobalContext.cpp#newcode235 src/IceGlobalContext.cpp:235: *VariableDeclarations.get()) { On 2015/02/11 21:52:58, stichnot wrote: > On ...
5 years, 10 months ago (2015-02-11 21:58:19 UTC) #6
Karl
https://codereview.chromium.org/916653004/diff/80001/src/IceGlobalContext.cpp File src/IceGlobalContext.cpp (right): https://codereview.chromium.org/916653004/diff/80001/src/IceGlobalContext.cpp#newcode235 src/IceGlobalContext.cpp:235: *VariableDeclarations.get()) { On 2015/02/11 21:52:58, stichnot wrote: > On ...
5 years, 10 months ago (2015-02-11 21:58:20 UTC) #7
Jim Stichnoth
https://codereview.chromium.org/916653004/diff/80001/src/IceGlobalContext.cpp File src/IceGlobalContext.cpp (right): https://codereview.chromium.org/916653004/diff/80001/src/IceGlobalContext.cpp#newcode235 src/IceGlobalContext.cpp:235: *VariableDeclarations.get()) { On 2015/02/11 21:58:20, Karl wrote: > On ...
5 years, 10 months ago (2015-02-11 23:01:07 UTC) #8
Karl
Looks good to me.
5 years, 10 months ago (2015-02-11 23:03:04 UTC) #9
jvoung (off chromium)
LGTM https://codereview.chromium.org/916653004/diff/120001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/916653004/diff/120001/src/IceCfg.cpp#newcode425 src/IceCfg.cpp:425: Assembler *Asm) { Asm could probably be a ...
5 years, 10 months ago (2015-02-11 23:24:15 UTC) #10
Jim Stichnoth
https://codereview.chromium.org/916653004/diff/120001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/916653004/diff/120001/src/IceCfg.cpp#newcode425 src/IceCfg.cpp:425: Assembler *Asm) { On 2015/02/11 23:24:15, jvoung wrote: > ...
5 years, 10 months ago (2015-02-12 00:08:26 UTC) #12
Jim Stichnoth
5 years, 10 months ago (2015-02-12 00:08:35 UTC) #13
Message was sent while issue was closed.
Committed patchset #8 (id:140001) manually as
bbca754a63fb1e80b4d0f034aa26538f3a8a2a26 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698