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

Unified Diff: src/IceCfg.h

Issue 870653002: Subzero: Initial implementation of multithreaded translation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Makefile.standalone ('k') | src/IceCfg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.h
diff --git a/src/IceCfg.h b/src/IceCfg.h
index 472ba799d5d8cf92faa25438a938efd1a56c2965..5f827f5473ec7a0166cf3675226a0097309d5ca9 100644
--- a/src/IceCfg.h
+++ b/src/IceCfg.h
@@ -15,8 +15,6 @@
#ifndef SUBZERO_SRC_ICECFG_H
#define SUBZERO_SRC_ICECFG_H
-#include <memory>
-
#include "assembler.h"
#include "IceClFlags.h"
#include "IceDefs.h"
@@ -42,6 +40,7 @@ public:
}
// Gets a pointer to the current thread's Cfg.
static const Cfg *getCurrentCfg() { return ICE_TLS_GET_FIELD(CurrentCfg); }
+ void updateTLS() const { ICE_TLS_SET_FIELD(CurrentCfg, this); }
// Gets a pointer to the current thread's Cfg's allocator.
static ArenaAllocator<> *getCurrentCfgAllocator() {
assert(ICE_TLS_GET_FIELD(CurrentCfg));
@@ -50,6 +49,12 @@ public:
GlobalContext *getContext() const { return Ctx; }
+ // Returns true if any of the specified options in the verbose mask
+ // are set. If the argument is omitted, it checks if any verbose
+ // options at all are set.
+ bool isVerbose(VerboseMask Mask = IceV_All) const { return VMask & Mask; }
+ void setVerbose(VerboseMask Mask) { VMask = Mask; }
+
// Manage the name and return type of the function being translated.
void setFunctionName(const IceString &Name) { FunctionName = Name; }
IceString getFunctionName() const { return FunctionName; }
@@ -184,6 +189,7 @@ private:
Cfg(GlobalContext *Ctx);
GlobalContext *Ctx;
+ VerboseMask VMask;
IceString FunctionName;
Type ReturnType;
bool IsInternalLinkage;
« no previous file with comments | « Makefile.standalone ('k') | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698