Lines Matching refs:CHRScope

137 class CHRScope {  class
139 CHRScope(RegInfo RI) : BranchInsertPoint(nullptr) { in CHRScope() function in __anonfd3f65480111::CHRScope
161 bool appendable(CHRScope *Next) { in appendable()
178 void append(CHRScope *Next) { in append()
189 void addSub(CHRScope *SubIn) { in addSub()
204 CHRScope *split(Region *Boundary) { in split()
218 std::stable_partition(Subs.begin(), Subs.end(), [&](CHRScope *Sub) { in split()
230 ArrayRef<CHRScope *> TailSubs(TailIt, Subs.end()); in split()
233 auto *Scope = new CHRScope(TailRegInfos, TailSubs); in split()
250 SmallVector<CHRScope *, 8> Subs; // Subscopes.
274 CHRScope(ArrayRef<RegInfo> RegInfosIn, ArrayRef<CHRScope *> SubsIn) in CHRScope() function in __anonfd3f65480111::CHRScope
287 for (CHRScope *Scope : Scopes) { in ~CHR()
298 void findScopes(SmallVectorImpl<CHRScope *> &Output) { in findScopes()
300 if (CHRScope *Scope = findScopes(R, nullptr, nullptr, Output)) { in findScopes()
304 CHRScope *findScopes(Region *R, Region *NextRegion, Region *ParentRegion,
305 SmallVectorImpl<CHRScope *> &Scopes);
306 CHRScope *findScope(Region *R);
307 void checkScopeHoistable(CHRScope *Scope);
309 void splitScopes(SmallVectorImpl<CHRScope *> &Input,
310 SmallVectorImpl<CHRScope *> &Output);
311 SmallVector<CHRScope *, 8> splitScope(CHRScope *Scope,
312 CHRScope *Outer,
315 SmallVectorImpl<CHRScope *> &Output,
318 void classifyBiasedScopes(SmallVectorImpl<CHRScope *> &Scopes);
319 void classifyBiasedScopes(CHRScope *Scope, CHRScope *OutermostScope);
321 void filterScopes(SmallVectorImpl<CHRScope *> &Input,
322 SmallVectorImpl<CHRScope *> &Output);
324 void setCHRRegions(SmallVectorImpl<CHRScope *> &Input,
325 SmallVectorImpl<CHRScope *> &Output);
326 void setCHRRegions(CHRScope *Scope, CHRScope *OutermostScope);
328 void sortScopes(SmallVectorImpl<CHRScope *> &Input,
329 SmallVectorImpl<CHRScope *> &Output);
331 void transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes);
332 void transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs);
333 void cloneScopeBlocks(CHRScope *Scope,
342 void fixupBranchesAndSelects(CHRScope *Scope,
347 CHRScope *Scope,
351 CHRScope *Scope,
356 CHRScope *Scope,
381 DenseSet<CHRScope *> Scopes;
394 raw_ostream &operator<<(raw_ostream &OS, const CHRScope &Scope) { in operator <<()
427 void CHRScope::print(raw_ostream &OS) const { in print()
446 for (CHRScope *Sub : Subs) { in print()
706 CHRScope * CHR::findScope(Region *R) { in findScope()
707 CHRScope *Result = nullptr; in findScope()
767 Result = new CHRScope(RI); in findScope()
827 Result = new CHRScope(RI); in findScope()
864 void CHR::checkScopeHoistable(CHRScope *Scope) { in checkScopeHoistable()
967 CHRScope * CHR::findScopes(Region *R, Region *NextRegion, Region *ParentRegion, in findScopes()
968 SmallVectorImpl<CHRScope *> &Scopes) { in findScopes()
970 CHRScope *Result = findScope(R); in findScopes()
972 CHRScope *ConsecutiveSubscope = nullptr; in findScopes()
973 SmallVector<CHRScope *, 8> Subscopes; in findScopes()
980 CHRScope *SubCHRScope = findScopes(SubR.get(), NextSubR, R, Scopes); in findScopes()
1004 for (CHRScope *Sub : Subscopes) { in findScopes()
1097 static void getSelectsInScope(CHRScope *Scope, in getSelectsInScope()
1102 for (CHRScope *Sub : Scope->Subs) in getSelectsInScope()
1106 void CHR::splitScopes(SmallVectorImpl<CHRScope *> &Input, in splitScopes()
1107 SmallVectorImpl<CHRScope *> &Output) { in splitScopes()
1108 for (CHRScope *Scope : Input) { in splitScopes()
1116 for (CHRScope *Scope : Output) { in splitScopes()
1122 SmallVector<CHRScope *, 8> CHR::splitScope( in splitScope()
1123 CHRScope *Scope, in splitScope()
1124 CHRScope *Outer, in splitScope()
1127 SmallVectorImpl<CHRScope *> &Output, in splitScope()
1136 SmallVector<CHRScope *, 8> Splits; in splitScope()
1186 CHRScope *Tail = Scope->split(RI.R); in splitScope()
1218 CHRScope *Split = Splits[I]; in splitScope()
1221 SmallVector<CHRScope *, 8> NewSubs; in splitScope()
1224 for (CHRScope *Sub : Split->Subs) { in splitScope()
1225 SmallVector<CHRScope *, 8> SubSplits = splitScope( in splitScope()
1232 SmallVector<CHRScope *, 8> Result; in splitScope()
1234 CHRScope *Split = Splits[I]; in splitScope()
1252 void CHR::classifyBiasedScopes(SmallVectorImpl<CHRScope *> &Scopes) { in classifyBiasedScopes()
1253 for (CHRScope *Scope : Scopes) { in classifyBiasedScopes()
1281 void CHR::classifyBiasedScopes(CHRScope *Scope, CHRScope *OutermostScope) { in classifyBiasedScopes()
1301 for (CHRScope *Sub : Scope->Subs) { in classifyBiasedScopes()
1306 static bool hasAtLeastTwoBiasedBranches(CHRScope *Scope) { in hasAtLeastTwoBiasedBranches()
1314 void CHR::filterScopes(SmallVectorImpl<CHRScope *> &Input, in filterScopes()
1315 SmallVectorImpl<CHRScope *> &Output) { in filterScopes()
1316 for (CHRScope *Scope : Input) { in filterScopes()
1339 void CHR::setCHRRegions(SmallVectorImpl<CHRScope *> &Input, in setCHRRegions()
1340 SmallVectorImpl<CHRScope *> &Output) { in setCHRRegions()
1341 for (CHRScope *Scope : Input) { in setCHRRegions()
1362 void CHR::setCHRRegions(CHRScope *Scope, CHRScope *OutermostScope) { in setCHRRegions()
1407 for (CHRScope *Sub : Scope->Subs) in setCHRRegions()
1411 static bool CHRScopeSorter(CHRScope *Scope1, CHRScope *Scope2) { in CHRScopeSorter()
1415 void CHR::sortScopes(SmallVectorImpl<CHRScope *> &Input, in sortScopes()
1416 SmallVectorImpl<CHRScope *> &Output) { in sortScopes()
1472 static void hoistScopeConditions(CHRScope *Scope, Instruction *HoistPoint, in hoistScopeConditions()
1500 CHRScope *Scope) { in negateICmpIfUsedByBranchOrSelectOnly()
1547 static void insertTrivialPHIs(CHRScope *Scope, in insertTrivialPHIs()
1610 assertCHRRegionsHaveBiasedBranchOrSelect(CHRScope *Scope) { in assertCHRRegionsHaveBiasedBranchOrSelect()
1612 auto HasBiasedBranchOrSelect = [](RegInfo &RI, CHRScope *Scope) { in assertCHRRegionsHaveBiasedBranchOrSelect()
1632 CHRScope *Scope, BasicBlock *PreEntryBlock) { in assertBranchOrSelectConditionHoisted()
1666 void CHR::transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs) { in transformScopes()
1733 void CHR::cloneScopeBlocks(CHRScope *Scope, in cloneScopeBlocks()
1812 void CHR::fixupBranchesAndSelects(CHRScope *Scope, in fixupBranchesAndSelects()
1854 void CHR::fixupBranch(Region *R, CHRScope *Scope, in fixupBranch()
1898 void CHR::fixupSelect(SelectInst *SI, CHRScope *Scope, in fixupSelect()
1924 Instruction *BranchOrSelect, CHRScope *Scope, in addToMergedCondition()
1947 void CHR::transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes) { in transformScopes()
1950 for (CHRScope *Scope : CHRScopes) { in transformScopes()
1961 dumpScopes(SmallVectorImpl<CHRScope *> &Scopes, const char *Label) { in dumpScopes()
1963 for (CHRScope *Scope : Scopes) { in dumpScopes()
1982 SmallVector<CHRScope *, 8> AllScopes; in run()
1991 SmallVector<CHRScope *, 8> SplitScopes; in run()
2002 SmallVector<CHRScope *, 8> FilteredScopes; in run()
2007 SmallVector<CHRScope *, 8> SetScopes; in run()
2014 SmallVector<CHRScope *, 8> SortedScopes; in run()