|
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
Total comments: 24
Total comments: 17
|
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
|
Total messages: 9 (1 generated)
|