Lines Matching refs:CHRScope
177 class CHRScope { class
179 CHRScope(RegInfo RI) : BranchInsertPoint(nullptr) { in CHRScope() function in __anon15e3d84c0211::CHRScope
201 bool appendable(CHRScope *Next) { in appendable()
218 void append(CHRScope *Next) { in append()
229 void addSub(CHRScope *SubIn) { in addSub()
244 CHRScope *split(Region *Boundary) { in split()
258 std::stable_partition(Subs.begin(), Subs.end(), [&](CHRScope *Sub) { in split()
270 ArrayRef<CHRScope *> TailSubs(TailIt, Subs.end()); in split()
273 auto *Scope = new CHRScope(TailRegInfos, TailSubs); in split()
290 SmallVector<CHRScope *, 8> Subs; // Subscopes.
314 CHRScope(ArrayRef<RegInfo> RegInfosIn, ArrayRef<CHRScope *> SubsIn) in CHRScope() function in __anon15e3d84c0211::CHRScope
327 for (CHRScope *Scope : Scopes) { in ~CHR()
338 void findScopes(SmallVectorImpl<CHRScope *> &Output) { in findScopes()
340 if (CHRScope *Scope = findScopes(R, nullptr, nullptr, Output)) { in findScopes()
344 CHRScope *findScopes(Region *R, Region *NextRegion, Region *ParentRegion,
345 SmallVectorImpl<CHRScope *> &Scopes);
346 CHRScope *findScope(Region *R);
347 void checkScopeHoistable(CHRScope *Scope);
349 void splitScopes(SmallVectorImpl<CHRScope *> &Input,
350 SmallVectorImpl<CHRScope *> &Output);
351 SmallVector<CHRScope *, 8> splitScope(CHRScope *Scope,
352 CHRScope *Outer,
355 SmallVectorImpl<CHRScope *> &Output,
358 void classifyBiasedScopes(SmallVectorImpl<CHRScope *> &Scopes);
359 void classifyBiasedScopes(CHRScope *Scope, CHRScope *OutermostScope);
361 void filterScopes(SmallVectorImpl<CHRScope *> &Input,
362 SmallVectorImpl<CHRScope *> &Output);
364 void setCHRRegions(SmallVectorImpl<CHRScope *> &Input,
365 SmallVectorImpl<CHRScope *> &Output);
366 void setCHRRegions(CHRScope *Scope, CHRScope *OutermostScope);
368 void sortScopes(SmallVectorImpl<CHRScope *> &Input,
369 SmallVectorImpl<CHRScope *> &Output);
371 void transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes);
372 void transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs);
373 void cloneScopeBlocks(CHRScope *Scope,
382 void fixupBranchesAndSelects(CHRScope *Scope,
387 CHRScope *Scope,
391 CHRScope *Scope,
396 CHRScope *Scope,
421 DenseSet<CHRScope *> Scopes;
434 raw_ostream &operator<<(raw_ostream &OS, const CHRScope &Scope) { in operator <<()
467 void CHRScope::print(raw_ostream &OS) const { in print()
486 for (CHRScope *Sub : Subs) { in print()
746 CHRScope * CHR::findScope(Region *R) { in findScope()
747 CHRScope *Result = nullptr; in findScope()
795 Result = new CHRScope(RI); in findScope()
855 Result = new CHRScope(RI); in findScope()
892 void CHR::checkScopeHoistable(CHRScope *Scope) { in checkScopeHoistable()
995 CHRScope * CHR::findScopes(Region *R, Region *NextRegion, Region *ParentRegion, in findScopes()
996 SmallVectorImpl<CHRScope *> &Scopes) { in findScopes()
998 CHRScope *Result = findScope(R); in findScopes()
1000 CHRScope *ConsecutiveSubscope = nullptr; in findScopes()
1001 SmallVector<CHRScope *, 8> Subscopes; in findScopes()
1008 CHRScope *SubCHRScope = findScopes(SubR.get(), NextSubR, R, Scopes); in findScopes()
1032 for (CHRScope *Sub : Subscopes) { in findScopes()
1125 static void getSelectsInScope(CHRScope *Scope, in getSelectsInScope()
1130 for (CHRScope *Sub : Scope->Subs) in getSelectsInScope()
1134 void CHR::splitScopes(SmallVectorImpl<CHRScope *> &Input, in splitScopes()
1135 SmallVectorImpl<CHRScope *> &Output) { in splitScopes()
1136 for (CHRScope *Scope : Input) { in splitScopes()
1144 for (CHRScope *Scope : Output) { in splitScopes()
1150 SmallVector<CHRScope *, 8> CHR::splitScope( in splitScope()
1151 CHRScope *Scope, in splitScope()
1152 CHRScope *Outer, in splitScope()
1155 SmallVectorImpl<CHRScope *> &Output, in splitScope()
1164 SmallVector<CHRScope *, 8> Splits; in splitScope()
1214 CHRScope *Tail = Scope->split(RI.R); in splitScope()
1246 CHRScope *Split = Splits[I]; in splitScope()
1249 SmallVector<CHRScope *, 8> NewSubs; in splitScope()
1252 for (CHRScope *Sub : Split->Subs) { in splitScope()
1253 SmallVector<CHRScope *, 8> SubSplits = splitScope( in splitScope()
1260 SmallVector<CHRScope *, 8> Result; in splitScope()
1262 CHRScope *Split = Splits[I]; in splitScope()
1280 void CHR::classifyBiasedScopes(SmallVectorImpl<CHRScope *> &Scopes) { in classifyBiasedScopes()
1281 for (CHRScope *Scope : Scopes) { in classifyBiasedScopes()
1309 void CHR::classifyBiasedScopes(CHRScope *Scope, CHRScope *OutermostScope) { in classifyBiasedScopes()
1329 for (CHRScope *Sub : Scope->Subs) { in classifyBiasedScopes()
1334 static bool hasAtLeastTwoBiasedBranches(CHRScope *Scope) { in hasAtLeastTwoBiasedBranches()
1342 void CHR::filterScopes(SmallVectorImpl<CHRScope *> &Input, in filterScopes()
1343 SmallVectorImpl<CHRScope *> &Output) { in filterScopes()
1344 for (CHRScope *Scope : Input) { in filterScopes()
1367 void CHR::setCHRRegions(SmallVectorImpl<CHRScope *> &Input, in setCHRRegions()
1368 SmallVectorImpl<CHRScope *> &Output) { in setCHRRegions()
1369 for (CHRScope *Scope : Input) { in setCHRRegions()
1390 void CHR::setCHRRegions(CHRScope *Scope, CHRScope *OutermostScope) { in setCHRRegions()
1435 for (CHRScope *Sub : Scope->Subs) in setCHRRegions()
1439 static bool CHRScopeSorter(CHRScope *Scope1, CHRScope *Scope2) { in CHRScopeSorter()
1443 void CHR::sortScopes(SmallVectorImpl<CHRScope *> &Input, in sortScopes()
1444 SmallVectorImpl<CHRScope *> &Output) { in sortScopes()
1500 static void hoistScopeConditions(CHRScope *Scope, Instruction *HoistPoint, in hoistScopeConditions()
1528 CHRScope *Scope) { in negateICmpIfUsedByBranchOrSelectOnly()
1575 static void insertTrivialPHIs(CHRScope *Scope, in insertTrivialPHIs()
1638 assertCHRRegionsHaveBiasedBranchOrSelect(CHRScope *Scope) { in assertCHRRegionsHaveBiasedBranchOrSelect()
1640 auto HasBiasedBranchOrSelect = [](RegInfo &RI, CHRScope *Scope) { in assertCHRRegionsHaveBiasedBranchOrSelect()
1660 CHRScope *Scope, BasicBlock *PreEntryBlock) { in assertBranchOrSelectConditionHoisted()
1694 void CHR::transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs) { in transformScopes()
1761 void CHR::cloneScopeBlocks(CHRScope *Scope, in cloneScopeBlocks()
1840 void CHR::fixupBranchesAndSelects(CHRScope *Scope, in fixupBranchesAndSelects()
1882 void CHR::fixupBranch(Region *R, CHRScope *Scope, in fixupBranch()
1926 void CHR::fixupSelect(SelectInst *SI, CHRScope *Scope, in fixupSelect()
1953 CHRScope *Scope, in addToMergedCondition()
1976 void CHR::transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes) { in transformScopes()
1979 for (CHRScope *Scope : CHRScopes) { in transformScopes()
1990 dumpScopes(SmallVectorImpl<CHRScope *> &Scopes, const char *Label) { in dumpScopes()
1992 for (CHRScope *Scope : Scopes) { in dumpScopes()
2011 SmallVector<CHRScope *, 8> AllScopes; in run()
2020 SmallVector<CHRScope *, 8> SplitScopes; in run()
2031 SmallVector<CHRScope *, 8> FilteredScopes; in run()
2036 SmallVector<CHRScope *, 8> SetScopes; in run()
2043 SmallVector<CHRScope *, 8> SortedScopes; in run()