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

Issue 876083007: 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. 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

Patch Set 1 #

Patch Set 2 : Add comments #

Total comments: 24

Patch Set 3 : Code review changes. #

Total comments: 17

Patch Set 4 : More code review changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+404 lines, -330 lines) Patch
M pydir/run-llvm2ice.py View 1 chunk +4 lines, -1 line 0 comments Download
M src/IceCfg.h View 1 2 3 5 chunks +10 lines, -5 lines 0 comments Download
M src/IceCfg.cpp View 1 2 3 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/IceConverter.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/IceConverter.cpp View 4 chunks +7 lines, -5 lines 0 comments Download
M src/IceGlobalContext.h View 1 2 7 chunks +44 lines, -10 lines 0 comments Download
M src/IceGlobalContext.cpp View 1 2 3 5 chunks +160 lines, -14 lines 0 comments Download
M src/IceTargetLowering.h View 2 chunks +9 lines, -7 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 chunk +6 lines, -5 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 chunk +1 line, -1 line 0 comments Download
A + src/IceThreading.h View 1 2 3 4 chunks +81 lines, -51 lines 0 comments Download
M src/IceTranslator.h View 3 chunks +6 lines, -5 lines 0 comments Download
M src/IceTranslator.cpp View 1 2 3 chunks +14 lines, -38 lines 0 comments Download
M src/IceUtils.h View 1 2 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 11 chunks +22 lines, -18 lines 0 comments Download
M src/assembler.h View 1 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 chunk +2 lines, -2 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 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 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (1 generated)
Jim Stichnoth
https://codereview.chromium.org/876083007/diff/20001/src/IceGlobalContext.cpp File src/IceGlobalContext.cpp (right): https://codereview.chromium.org/876083007/diff/20001/src/IceGlobalContext.cpp#newcode220 src/IceGlobalContext.cpp:220: void lowerGlobals(GlobalContext *Ctx, This is moved largely unchanged from ...
5 years, 10 months ago (2015-02-07 14:53:08 UTC) #2
JF
https://codereview.chromium.org/876083007/diff/20001/src/IceConverter.cpp File src/IceConverter.cpp (right): https://codereview.chromium.org/876083007/diff/20001/src/IceConverter.cpp#newcode888 src/IceConverter.cpp:888: VariableDeclarationList *VariableDeclarations = new VariableDeclarationList; unique_ptr? https://codereview.chromium.org/876083007/diff/20001/src/IceGlobalContext.cpp File src/IceGlobalContext.cpp ...
5 years, 10 months ago (2015-02-08 00:29:47 UTC) #3
Jim Stichnoth
I haven't yet addressed to unique_ptr related comments. The issue is that for emitting global ...
5 years, 10 months ago (2015-02-08 17:11:23 UTC) #4
Karl
https://codereview.chromium.org/876083007/diff/40001/src/IceCfg.h File src/IceCfg.h (right): https://codereview.chromium.org/876083007/diff/40001/src/IceCfg.h#newcode32 src/IceCfg.h:32: Why not SequenceNumber? https://codereview.chromium.org/876083007/diff/40001/src/IceGlobalContext.cpp File src/IceGlobalContext.cpp (right): https://codereview.chromium.org/876083007/diff/40001/src/IceGlobalContext.cpp#newcode221 src/IceGlobalContext.cpp:221: ...
5 years, 10 months ago (2015-02-08 21:11:58 UTC) #5
JF
https://codereview.chromium.org/876083007/diff/20001/src/IceGlobalContext.h File src/IceGlobalContext.h (right): https://codereview.chromium.org/876083007/diff/20001/src/IceGlobalContext.h#newcode518 src/IceGlobalContext.h:518: WI_Cfg // A Cfg that needs to be emitted ...
5 years, 10 months ago (2015-02-08 21:15:05 UTC) #6
Jim Stichnoth
https://codereview.chromium.org/876083007/diff/20001/src/IceConverter.cpp File src/IceConverter.cpp (right): https://codereview.chromium.org/876083007/diff/20001/src/IceConverter.cpp#newcode888 src/IceConverter.cpp:888: VariableDeclarationList *VariableDeclarations = new VariableDeclarationList; On 2015/02/08 00:29:47, JF ...
5 years, 10 months ago (2015-02-10 07:51:47 UTC) #7
Jim Stichnoth
After Karl's global initializer CL lands, and also given the recent Flags change, I'm pretty ...
5 years, 10 months ago (2015-02-10 07:55:00 UTC) #8
Jim Stichnoth
5 years, 10 months ago (2015-02-11 05:46:37 UTC) #9
Message was sent while issue was closed.
Closing this CL, continuing in https://codereview.chromium.org/916653004/ .

Powered by Google App Engine
This is Rietveld 408576698