| OLD | NEW |
| 1 //===- subzero/src/IceGlobalContext.cpp - Global context defs -------------===// | 1 //===- subzero/src/IceGlobalContext.cpp - Global context defs -------------===// |
| 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 /// \file | 10 /// \file |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 // If we need to shuffle the layout of global variables, shuffle them now. | 481 // If we need to shuffle the layout of global variables, shuffle them now. |
| 482 if (getFlags().getReorderGlobalVariables()) { | 482 if (getFlags().getReorderGlobalVariables()) { |
| 483 // Create a random number generator for global variable reordering. | 483 // Create a random number generator for global variable reordering. |
| 484 RandomNumberGenerator RNG(getFlags().getRandomSeed(), | 484 RandomNumberGenerator RNG(getFlags().getRandomSeed(), |
| 485 RPE_GlobalVariableReordering); | 485 RPE_GlobalVariableReordering); |
| 486 RandomShuffle(Globals.begin(), Globals.end(), | 486 RandomShuffle(Globals.begin(), Globals.end(), |
| 487 [&RNG](int N) { return (uint32_t)RNG.next(N); }); | 487 [&RNG](int N) { return (uint32_t)RNG.next(N); }); |
| 488 } | 488 } |
| 489 | 489 |
| 490 if (!BuildDefs::minimal() && Instrumentor) | 490 if (!BuildDefs::minimal() && Instrumentor) |
| 491 Instrumentor->instrumentGlobals(); | 491 Instrumentor->instrumentGlobals(Globals); |
| 492 | 492 |
| 493 DataLowering->lowerGlobals(Globals, SectionSuffix); | 493 DataLowering->lowerGlobals(Globals, SectionSuffix); |
| 494 if (ProfileBlockInfos.empty() && DisposeGlobalVariablesAfterLowering) { | 494 if (ProfileBlockInfos.empty() && DisposeGlobalVariablesAfterLowering) { |
| 495 Globals.clearAndPurge(); | 495 Globals.clearAndPurge(); |
| 496 } else { | 496 } else { |
| 497 Globals.clear(); | 497 Globals.clear(); |
| 498 } | 498 } |
| 499 } | 499 } |
| 500 | 500 |
| 501 void GlobalContext::lowerProfileData() { | 501 void GlobalContext::lowerProfileData() { |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 void TimerMarker::pushCfg(const Cfg *Func) { | 1037 void TimerMarker::pushCfg(const Cfg *Func) { |
| 1038 Ctx = Func->getContext(); | 1038 Ctx = Func->getContext(); |
| 1039 Active = Func->getFocusedTiming() || getFlags().getSubzeroTimingEnabled(); | 1039 Active = Func->getFocusedTiming() || getFlags().getSubzeroTimingEnabled(); |
| 1040 if (Active) | 1040 if (Active) |
| 1041 Ctx->pushTimer(ID, StackID); | 1041 Ctx->pushTimer(ID, StackID); |
| 1042 } | 1042 } |
| 1043 | 1043 |
| 1044 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); | 1044 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); |
| 1045 | 1045 |
| 1046 } // end of namespace Ice | 1046 } // end of namespace Ice |
| OLD | NEW |