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

Side by Side Diff: src/IceThreading.cpp

Issue 916653004: Subzero: Emit functions and global initializers in a separate thread. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Const change Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceThreading.h ('k') | src/IceTranslator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 //===- subzero/src/IceThreading.cpp - Threading function definitions ------===//
2 //
3 // The Subzero Code Generator
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines threading-related functions.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "IceCfg.h"
15 #include "IceDefs.h"
16 #include "IceThreading.h"
17
18 namespace Ice {
19
20 EmitterWorkItem::EmitterWorkItem(uint32_t Seq)
21 : Sequence(Seq), Kind(WI_Nop), GlobalInits(nullptr), Function(nullptr),
22 RawFunc(nullptr) {}
23 EmitterWorkItem::EmitterWorkItem(uint32_t Seq, VariableDeclarationList *D)
24 : Sequence(Seq), Kind(WI_GlobalInits), GlobalInits(D), Function(nullptr),
25 RawFunc(nullptr) {}
26 EmitterWorkItem::EmitterWorkItem(uint32_t Seq, Assembler *A)
27 : Sequence(Seq), Kind(WI_Asm), GlobalInits(nullptr), Function(A),
28 RawFunc(nullptr) {}
29 EmitterWorkItem::EmitterWorkItem(uint32_t Seq, Cfg *F)
30 : Sequence(Seq), Kind(WI_Cfg), GlobalInits(nullptr), Function(nullptr),
31 RawFunc(F) {}
32
33 std::unique_ptr<VariableDeclarationList> EmitterWorkItem::getGlobalInits() {
34 assert(getKind() == WI_GlobalInits);
35 return std::move(GlobalInits);
36 }
37
38 std::unique_ptr<Assembler> EmitterWorkItem::getAsm() {
39 assert(getKind() == WI_Asm);
40 return std::move(Function);
41 }
42
43 std::unique_ptr<Cfg> EmitterWorkItem::getCfg() {
44 assert(getKind() == WI_Cfg);
45 return std::move(RawFunc);
46 }
47
48 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceThreading.h ('k') | src/IceTranslator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698