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

Unified Diff: src/IceGlobalContext.h

Issue 872933002: Subzero: Second attempt at fixing MacOS 10.6 build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add llvm:: prefix 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 | « src/IceDefs.h ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.h
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index 1f0a600d485fa8dcba7d3c5915d0bdc936e0428d..35d5493e9d6133a7b4493c70fce01de26b3688bf 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -179,37 +179,37 @@ public:
// Reset stats at the beginning of a function.
void resetStats() {
if (ALLOW_DUMP)
- TLS->StatsFunction.reset();
+ ICE_TLS_GET_FIELD(TLS)->StatsFunction.reset();
}
void dumpStats(const IceString &Name, bool Final = false);
void statsUpdateEmitted(uint32_t InstCount) {
if (!ALLOW_DUMP || !getFlags().DumpStats)
return;
- TLS->StatsFunction.updateEmitted(InstCount);
+ ICE_TLS_GET_FIELD(TLS)->StatsFunction.updateEmitted(InstCount);
getStatsCumulative()->updateEmitted(InstCount);
}
void statsUpdateRegistersSaved(uint32_t Num) {
if (!ALLOW_DUMP || !getFlags().DumpStats)
return;
- TLS->StatsFunction.updateRegistersSaved(Num);
+ ICE_TLS_GET_FIELD(TLS)->StatsFunction.updateRegistersSaved(Num);
getStatsCumulative()->updateRegistersSaved(Num);
}
void statsUpdateFrameBytes(uint32_t Bytes) {
if (!ALLOW_DUMP || !getFlags().DumpStats)
return;
- TLS->StatsFunction.updateFrameBytes(Bytes);
+ ICE_TLS_GET_FIELD(TLS)->StatsFunction.updateFrameBytes(Bytes);
getStatsCumulative()->updateFrameBytes(Bytes);
}
void statsUpdateSpills() {
if (!ALLOW_DUMP || !getFlags().DumpStats)
return;
- TLS->StatsFunction.updateSpills();
+ ICE_TLS_GET_FIELD(TLS)->StatsFunction.updateSpills();
getStatsCumulative()->updateSpills();
}
void statsUpdateFills() {
if (!ALLOW_DUMP || !getFlags().DumpStats)
return;
- TLS->StatsFunction.updateFills();
+ ICE_TLS_GET_FIELD(TLS)->StatsFunction.updateFills();
getStatsCumulative()->updateFills();
}
@@ -274,11 +274,14 @@ private:
std::vector<ThreadContext *> AllThreadContexts;
// Each thread has its own TLS pointer which is also held in
// AllThreadContexts.
- ICE_ATTRIBUTE_TLS static ThreadContext *TLS;
+ ICE_TLS_DECLARE_FIELD(ThreadContext *, TLS);
// Private helpers for mangleName()
typedef llvm::SmallVector<char, 32> ManglerVector;
void incrementSubstitutions(ManglerVector &OldName) const;
+
+public:
+ static void TlsInit() { ICE_TLS_INIT_FIELD(TLS); }
};
// Helper class to push and pop a timer marker. The constructor
« no previous file with comments | « src/IceDefs.h ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698