| Index: src/IceGlobalContext.cpp
|
| diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
|
| index 9d5b25c7cf59d225b33bc2a5469c0bdd205ee90c..4d7519cfecfeeb7c14cf3cfcc49e479613629f01 100644
|
| --- a/src/IceGlobalContext.cpp
|
| +++ b/src/IceGlobalContext.cpp
|
| @@ -287,13 +287,13 @@ GlobalContext::GlobalContext(Ostream *OsDump, Ostream *OsEmit, Ostream *OsError,
|
| ELFStreamer *ELFStr)
|
| : Strings(new StringPool()), ConstPool(new ConstantPool()), ErrorStatus(),
|
| StrDump(OsDump), StrEmit(OsEmit), StrError(OsError), IntrinsicsInfo(this),
|
| - ObjectWriter(),
|
| - OptQ(/*Sequential=*/Flags.isSequential(),
|
| - /*MaxSize=*/
|
| - Flags.isParseParallel() ? MaxOptQSize
|
| - : Flags.getNumTranslationThreads()),
|
| + ObjectWriter(), OptQ(/*Sequential=*/getFlags().isSequential(),
|
| + /*MaxSize=*/
|
| + getFlags().isParseParallel()
|
| + ? MaxOptQSize
|
| + : getFlags().getNumTranslationThreads()),
|
| // EmitQ is allowed unlimited size.
|
| - EmitQ(/*Sequential=*/Flags.isSequential()),
|
| + EmitQ(/*Sequential=*/getFlags().isSequential()),
|
| DataLowering(TargetDataLowering::createLowering(this)) {
|
| assert(OsDump && "OsDump is not defined for GlobalContext");
|
| assert(OsEmit && "OsEmit is not defined for GlobalContext");
|
| @@ -318,7 +318,7 @@ GlobalContext::GlobalContext(Ostream *OsDump, Ostream *OsEmit, Ostream *OsError,
|
| newTimerStackID("Per-function summary");
|
| }
|
| Timers.initInto(MyTLS->Timers);
|
| - switch (Flags.getOutFileType()) {
|
| + switch (getFlags().getOutFileType()) {
|
| case FT_Elf:
|
| ObjectWriter.reset(new ELFObjectWriter(*this, *ELFStr));
|
| break;
|
| @@ -448,9 +448,9 @@ void GlobalContext::saveBlockInfoPtrs() {
|
|
|
| void GlobalContext::lowerGlobals(const std::string &SectionSuffix) {
|
| TimerMarker T(TimerStack::TT_emitGlobalInitializers, this);
|
| - const bool DumpGlobalVariables = BuildDefs::dump() &&
|
| - (Flags.getVerbose() & IceV_GlobalInit) &&
|
| - Flags.getVerboseFocusOn().empty();
|
| + const bool DumpGlobalVariables =
|
| + BuildDefs::dump() && (getFlags().getVerbose() & IceV_GlobalInit) &&
|
| + getFlags().getVerboseFocusOn().empty();
|
| if (DumpGlobalVariables) {
|
| OstreamLocker L(this);
|
| Ostream &Stream = getStrDump();
|
| @@ -458,7 +458,7 @@ void GlobalContext::lowerGlobals(const std::string &SectionSuffix) {
|
| Global->dump(Stream);
|
| }
|
| }
|
| - if (Flags.getDisableTranslation())
|
| + if (getFlags().getDisableTranslation())
|
| return;
|
|
|
| saveBlockInfoPtrs();
|
| @@ -672,8 +672,8 @@ void GlobalContext::dumpStrings() {
|
| void GlobalContext::dumpConstantLookupCounts() {
|
| if (!BuildDefs::dump())
|
| return;
|
| - const bool DumpCounts = (Flags.getVerbose() & IceV_ConstPoolStats) &&
|
| - Flags.getVerboseFocusOn().empty();
|
| + const bool DumpCounts = (getFlags().getVerbose() & IceV_ConstPoolStats) &&
|
| + getFlags().getVerboseFocusOn().empty();
|
| if (!DumpCounts)
|
| return;
|
|
|
| @@ -973,13 +973,11 @@ GlobalStringPoolTraits::getStrings(const GlobalContext *PoolOwner) {
|
| return PoolOwner->getStrings();
|
| }
|
|
|
| -ClFlags GlobalContext::Flags;
|
| -
|
| TimerIdT TimerMarker::getTimerIdFromFuncName(GlobalContext *Ctx,
|
| const std::string &FuncName) {
|
| if (!BuildDefs::timers())
|
| return 0;
|
| - if (!Ctx->getFlags().getTimeEachFunction())
|
| + if (!getFlags().getTimeEachFunction())
|
| return 0;
|
| return Ctx->getTimerID(GlobalContext::TSK_Funcs, FuncName);
|
| }
|
| @@ -987,10 +985,10 @@ TimerIdT TimerMarker::getTimerIdFromFuncName(GlobalContext *Ctx,
|
| void TimerMarker::push() {
|
| switch (StackID) {
|
| case GlobalContext::TSK_Default:
|
| - Active = Ctx->getFlags().getSubzeroTimingEnabled();
|
| + Active = getFlags().getSubzeroTimingEnabled();
|
| break;
|
| case GlobalContext::TSK_Funcs:
|
| - Active = Ctx->getFlags().getTimeEachFunction();
|
| + Active = getFlags().getTimeEachFunction();
|
| break;
|
| default:
|
| break;
|
| @@ -1001,8 +999,7 @@ void TimerMarker::push() {
|
|
|
| void TimerMarker::pushCfg(const Cfg *Func) {
|
| Ctx = Func->getContext();
|
| - Active =
|
| - Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled();
|
| + Active = Func->getFocusedTiming() || getFlags().getSubzeroTimingEnabled();
|
| if (Active)
|
| Ctx->pushTimer(ID, StackID);
|
| }
|
|
|