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

Unified Diff: src/IceGlobalContext.h

Issue 905463003: Adds accessor methods to class ClFlags. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits in patchset 2. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceELFObjectWriter.cpp ('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 e3e0810cb02824af79d25403db76e50e9aedcc9b..280bbd0e399e7ea15965ed4074fbd98e38bac500 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -202,7 +202,7 @@ public:
const ClFlags &getFlags() const { return Flags; }
bool isIRGenerationDisabled() const {
- return ALLOW_DISABLE_IR_GEN ? getFlags().DisableIRGeneration : false;
+ return getFlags().getDisableIRGeneration();
}
// Allocate data of type T using the global allocator.
@@ -223,35 +223,35 @@ public:
}
void dumpStats(const IceString &Name, bool Final = false);
void statsUpdateEmitted(uint32_t InstCount) {
- if (!ALLOW_DUMP || !getFlags().DumpStats)
+ if (!getFlags().getDumpStats())
return;
ThreadContext *TLS = ICE_TLS_GET_FIELD(TLS);
TLS->StatsFunction.update(CodeStats::CS_InstCount, InstCount);
TLS->StatsCumulative.update(CodeStats::CS_InstCount, InstCount);
}
void statsUpdateRegistersSaved(uint32_t Num) {
- if (!ALLOW_DUMP || !getFlags().DumpStats)
+ if (!getFlags().getDumpStats())
return;
ThreadContext *TLS = ICE_TLS_GET_FIELD(TLS);
TLS->StatsFunction.update(CodeStats::CS_RegsSaved, Num);
TLS->StatsCumulative.update(CodeStats::CS_RegsSaved, Num);
}
void statsUpdateFrameBytes(uint32_t Bytes) {
- if (!ALLOW_DUMP || !getFlags().DumpStats)
+ if (!getFlags().getDumpStats())
return;
ThreadContext *TLS = ICE_TLS_GET_FIELD(TLS);
TLS->StatsFunction.update(CodeStats::CS_FrameByte, Bytes);
TLS->StatsCumulative.update(CodeStats::CS_FrameByte, Bytes);
}
void statsUpdateSpills() {
- if (!ALLOW_DUMP || !getFlags().DumpStats)
+ if (!getFlags().getDumpStats())
return;
ThreadContext *TLS = ICE_TLS_GET_FIELD(TLS);
TLS->StatsFunction.update(CodeStats::CS_NumSpills);
TLS->StatsCumulative.update(CodeStats::CS_NumSpills);
}
void statsUpdateFills() {
- if (!ALLOW_DUMP || !getFlags().DumpStats)
+ if (!getFlags().getDumpStats())
return;
ThreadContext *TLS = ICE_TLS_GET_FIELD(TLS);
TLS->StatsFunction.update(CodeStats::CS_NumFills);
@@ -290,7 +290,7 @@ public:
void cfgQueueNotifyEnd() { CfgQ.notifyEnd(); }
void startWorkerThreads() {
- size_t NumWorkers = getFlags().NumTranslationThreads;
+ size_t NumWorkers = getFlags().getNumTranslationThreads();
auto Timers = getTimers();
for (size_t i = 0; i < NumWorkers; ++i) {
ThreadContext *WorkerTLS = new ThreadContext();
« no previous file with comments | « src/IceELFObjectWriter.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698