Lines Matching refs:CHRScope
145 class CHRScope { class
147 CHRScope(RegInfo RI) : BranchInsertPoint(nullptr) { in CHRScope() function in __anon784f818e0111::CHRScope
169 bool appendable(CHRScope *Next) { in appendable()
186 void append(CHRScope *Next) { in append()
197 void addSub(CHRScope *SubIn) { in addSub()
212 CHRScope *split(Region *Boundary) { in split()
226 std::stable_partition(Subs.begin(), Subs.end(), [&](CHRScope *Sub) { in split()
238 ArrayRef<CHRScope *> TailSubs(TailIt, Subs.end()); in split()
241 auto *Scope = new CHRScope(TailRegInfos, TailSubs); in split()
258 SmallVector<CHRScope *, 8> Subs; // Subscopes.
282 CHRScope(ArrayRef<RegInfo> RegInfosIn, ArrayRef<CHRScope *> SubsIn) in CHRScope() function in __anon784f818e0111::CHRScope
295 for (CHRScope *Scope : Scopes) { in ~CHR()
306 void findScopes(SmallVectorImpl<CHRScope *> &Output) { in findScopes()
308 if (CHRScope *Scope = findScopes(R, nullptr, nullptr, Output)) { in findScopes()
312 CHRScope *findScopes(Region *R, Region *NextRegion, Region *ParentRegion,
313 SmallVectorImpl<CHRScope *> &Scopes);
314 CHRScope *findScope(Region *R);
315 void checkScopeHoistable(CHRScope *Scope);
317 void splitScopes(SmallVectorImpl<CHRScope *> &Input,
318 SmallVectorImpl<CHRScope *> &Output);
319 SmallVector<CHRScope *, 8> splitScope(CHRScope *Scope,
320 CHRScope *Outer,
323 SmallVectorImpl<CHRScope *> &Output,
326 void classifyBiasedScopes(SmallVectorImpl<CHRScope *> &Scopes);
327 void classifyBiasedScopes(CHRScope *Scope, CHRScope *OutermostScope);
329 void filterScopes(SmallVectorImpl<CHRScope *> &Input,
330 SmallVectorImpl<CHRScope *> &Output);
332 void setCHRRegions(SmallVectorImpl<CHRScope *> &Input,
333 SmallVectorImpl<CHRScope *> &Output);
334 void setCHRRegions(CHRScope *Scope, CHRScope *OutermostScope);
336 void sortScopes(SmallVectorImpl<CHRScope *> &Input,
337 SmallVectorImpl<CHRScope *> &Output);
339 void transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes);
340 void transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs);
341 void cloneScopeBlocks(CHRScope *Scope,
350 void fixupBranchesAndSelects(CHRScope *Scope, BasicBlock *PreEntryBlock,
352 void fixupBranch(Region *R, CHRScope *Scope, IRBuilder<> &IRB,
354 void fixupSelect(SelectInst *SI, CHRScope *Scope, IRBuilder<> &IRB,
357 Instruction *BranchOrSelect, CHRScope *Scope,
393 DenseSet<CHRScope *> Scopes;
408 raw_ostream &operator<<(raw_ostream &OS, const CHRScope &Scope) { in operator <<()
443 void CHRScope::print(raw_ostream &OS) const { in print()
462 for (CHRScope *Sub : Subs) { in print()
714 CHRScope * CHR::findScope(Region *R) { in findScope()
715 CHRScope *Result = nullptr; in findScope()
775 Result = new CHRScope(RI); in findScope()
835 Result = new CHRScope(RI); in findScope()
872 void CHR::checkScopeHoistable(CHRScope *Scope) { in checkScopeHoistable()
975 CHRScope * CHR::findScopes(Region *R, Region *NextRegion, Region *ParentRegion, in findScopes()
976 SmallVectorImpl<CHRScope *> &Scopes) { in findScopes()
978 CHRScope *Result = findScope(R); in findScopes()
980 CHRScope *ConsecutiveSubscope = nullptr; in findScopes()
981 SmallVector<CHRScope *, 8> Subscopes; in findScopes()
988 CHRScope *SubCHRScope = findScopes(SubR.get(), NextSubR, R, Scopes); in findScopes()
1012 for (CHRScope *Sub : Subscopes) { in findScopes()
1105 static void getSelectsInScope(CHRScope *Scope, in getSelectsInScope()
1110 for (CHRScope *Sub : Scope->Subs) in getSelectsInScope()
1114 void CHR::splitScopes(SmallVectorImpl<CHRScope *> &Input, in splitScopes()
1115 SmallVectorImpl<CHRScope *> &Output) { in splitScopes()
1116 for (CHRScope *Scope : Input) { in splitScopes()
1124 for (CHRScope *Scope : Output) { in splitScopes()
1130 SmallVector<CHRScope *, 8> CHR::splitScope( in splitScope()
1131 CHRScope *Scope, in splitScope()
1132 CHRScope *Outer, in splitScope()
1135 SmallVectorImpl<CHRScope *> &Output, in splitScope()
1144 SmallVector<CHRScope *, 8> Splits; in splitScope()
1194 CHRScope *Tail = Scope->split(RI.R); in splitScope()
1226 CHRScope *Split = Splits[I]; in splitScope()
1229 SmallVector<CHRScope *, 8> NewSubs; in splitScope()
1232 for (CHRScope *Sub : Split->Subs) { in splitScope()
1233 SmallVector<CHRScope *, 8> SubSplits = splitScope( in splitScope()
1240 SmallVector<CHRScope *, 8> Result; in splitScope()
1242 CHRScope *Split = Splits[I]; in splitScope()
1260 void CHR::classifyBiasedScopes(SmallVectorImpl<CHRScope *> &Scopes) { in classifyBiasedScopes()
1261 for (CHRScope *Scope : Scopes) { in classifyBiasedScopes()
1289 void CHR::classifyBiasedScopes(CHRScope *Scope, CHRScope *OutermostScope) { in classifyBiasedScopes()
1309 for (CHRScope *Sub : Scope->Subs) { in classifyBiasedScopes()
1314 static bool hasAtLeastTwoBiasedBranches(CHRScope *Scope) { in hasAtLeastTwoBiasedBranches()
1322 void CHR::filterScopes(SmallVectorImpl<CHRScope *> &Input, in filterScopes()
1323 SmallVectorImpl<CHRScope *> &Output) { in filterScopes()
1324 for (CHRScope *Scope : Input) { in filterScopes()
1347 void CHR::setCHRRegions(SmallVectorImpl<CHRScope *> &Input, in setCHRRegions()
1348 SmallVectorImpl<CHRScope *> &Output) { in setCHRRegions()
1349 for (CHRScope *Scope : Input) { in setCHRRegions()
1370 void CHR::setCHRRegions(CHRScope *Scope, CHRScope *OutermostScope) { in setCHRRegions()
1415 for (CHRScope *Sub : Scope->Subs) in setCHRRegions()
1419 static bool CHRScopeSorter(CHRScope *Scope1, CHRScope *Scope2) { in CHRScopeSorter()
1423 void CHR::sortScopes(SmallVectorImpl<CHRScope *> &Input, in sortScopes()
1424 SmallVectorImpl<CHRScope *> &Output) { in sortScopes()
1480 static void hoistScopeConditions(CHRScope *Scope, Instruction *HoistPoint, in hoistScopeConditions()
1508 CHRScope *Scope) { in negateICmpIfUsedByBranchOrSelectOnly()
1555 static void insertTrivialPHIs(CHRScope *Scope, in insertTrivialPHIs()
1618 assertCHRRegionsHaveBiasedBranchOrSelect(CHRScope *Scope) { in assertCHRRegionsHaveBiasedBranchOrSelect()
1620 auto HasBiasedBranchOrSelect = [](RegInfo &RI, CHRScope *Scope) { in assertCHRRegionsHaveBiasedBranchOrSelect()
1640 CHRScope *Scope, BasicBlock *PreEntryBlock) { in assertBranchOrSelectConditionHoisted()
1674 void CHR::transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs) { in transformScopes()
1762 void CHR::cloneScopeBlocks(CHRScope *Scope, in cloneScopeBlocks()
1847 void CHR::fixupBranchesAndSelects(CHRScope *Scope, in fixupBranchesAndSelects()
1888 void CHR::fixupBranch(Region *R, CHRScope *Scope, in fixupBranch()
1931 void CHR::fixupSelect(SelectInst *SI, CHRScope *Scope, in fixupSelect()
1956 Instruction *BranchOrSelect, 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()