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

Side by Side Diff: src/IceTargetLowering.h

Issue 876083007: 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: More code review changes 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/IceGlobalContext.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file declares the TargetLowering and LoweringContext 10 // This file declares the TargetLowering, LoweringContext, and
11 // classes. TargetLowering is an abstract class used to drive the 11 // TargetDataLowering classes. TargetLowering is an abstract class
12 // translation/lowering process. LoweringContext maintains a 12 // used to drive the translation/lowering process. LoweringContext
13 // context for lowering each instruction, offering conveniences such 13 // maintains a context for lowering each instruction, offering
14 // as iterating over non-deleted instructions. 14 // conveniences such as iterating over non-deleted instructions.
15 // TargetDataLowering is an abstract class used to drive the
16 // lowering/emission of global initializers.
15 // 17 //
16 //===----------------------------------------------------------------------===// 18 //===----------------------------------------------------------------------===//
17 19
18 #ifndef SUBZERO_SRC_ICETARGETLOWERING_H 20 #ifndef SUBZERO_SRC_ICETARGETLOWERING_H
19 #define SUBZERO_SRC_ICETARGETLOWERING_H 21 #define SUBZERO_SRC_ICETARGETLOWERING_H
20 22
21 #include "IceDefs.h" 23 #include "IceDefs.h"
22 #include "IceInst.h" // for the names of the Inst subtypes 24 #include "IceInst.h" // for the names of the Inst subtypes
23 #include "IceTypes.h" 25 #include "IceTypes.h"
24 26
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 242
241 // TargetDataLowering is used for "lowering" data including initializers 243 // TargetDataLowering is used for "lowering" data including initializers
242 // for global variables, and the internal constant pools. It is separated 244 // for global variables, and the internal constant pools. It is separated
243 // out from TargetLowering because it does not require a Cfg. 245 // out from TargetLowering because it does not require a Cfg.
244 class TargetDataLowering { 246 class TargetDataLowering {
245 TargetDataLowering() = delete; 247 TargetDataLowering() = delete;
246 TargetDataLowering(const TargetDataLowering &) = delete; 248 TargetDataLowering(const TargetDataLowering &) = delete;
247 TargetDataLowering &operator=(const TargetDataLowering &) = delete; 249 TargetDataLowering &operator=(const TargetDataLowering &) = delete;
248 250
249 public: 251 public:
250 static TargetDataLowering *createLowering(GlobalContext *Ctx); 252 static std::unique_ptr<TargetDataLowering> createLowering(GlobalContext *Ctx);
251 virtual ~TargetDataLowering(); 253 virtual ~TargetDataLowering();
252 254
253 virtual void lowerGlobal(const VariableDeclaration &Var) const = 0; 255 virtual void lowerGlobal(const VariableDeclaration &Var) const = 0;
254 virtual void lowerGlobalsELF(const VariableDeclarationList &Vars) const = 0; 256 virtual void lowerGlobalsELF(const VariableDeclarationList &Vars) const = 0;
255 virtual void lowerConstants(GlobalContext *Ctx) const = 0; 257 virtual void lowerConstants() const = 0;
256 258
257 protected: 259 protected:
258 TargetDataLowering(GlobalContext *Ctx) : Ctx(Ctx) {} 260 TargetDataLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
259 GlobalContext *Ctx; 261 GlobalContext *Ctx;
260 }; 262 };
261 263
262 } // end of namespace Ice 264 } // end of namespace Ice
263 265
264 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 266 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698