Lines Matching refs:CHRScope
146 class CHRScope { class
148 CHRScope(RegInfo RI) : BranchInsertPoint(nullptr) { in CHRScope() function in __anone1ce48180111::CHRScope
170 bool appendable(CHRScope *Next) { in appendable()
187 void append(CHRScope *Next) { in append()
198 void addSub(CHRScope *SubIn) { in addSub()
213 CHRScope *split(Region *Boundary) { in split()
227 std::stable_partition(Subs.begin(), Subs.end(), [&](CHRScope *Sub) { in split()
239 ArrayRef<CHRScope *> TailSubs(TailIt, Subs.end()); in split()
242 auto *Scope = new CHRScope(TailRegInfos, TailSubs); in split()
259 SmallVector<CHRScope *, 8> Subs; // Subscopes.
283 CHRScope(ArrayRef<RegInfo> RegInfosIn, ArrayRef<CHRScope *> SubsIn) in CHRScope() function in __anone1ce48180111::CHRScope
296 for (CHRScope *Scope : Scopes) { in ~CHR()
307 void findScopes(SmallVectorImpl<CHRScope *> &Output) { in findScopes()
309 if (CHRScope *Scope = findScopes(R, nullptr, nullptr, Output)) { in findScopes()
313 CHRScope *findScopes(Region *R, Region *NextRegion, Region *ParentRegion,
314 SmallVectorImpl<CHRScope *> &Scopes);
315 CHRScope *findScope(Region *R);
316 void checkScopeHoistable(CHRScope *Scope);
318 void splitScopes(SmallVectorImpl<CHRScope *> &Input,
319 SmallVectorImpl<CHRScope *> &Output);
320 SmallVector<CHRScope *, 8> splitScope(CHRScope *Scope,
321 CHRScope *Outer,
324 SmallVectorImpl<CHRScope *> &Output,
327 void classifyBiasedScopes(SmallVectorImpl<CHRScope *> &Scopes);
328 void classifyBiasedScopes(CHRScope *Scope, CHRScope *OutermostScope);
330 void filterScopes(SmallVectorImpl<CHRScope *> &Input,
331 SmallVectorImpl<CHRScope *> &Output);
333 void setCHRRegions(SmallVectorImpl<CHRScope *> &Input,
334 SmallVectorImpl<CHRScope *> &Output);
335 void setCHRRegions(CHRScope *Scope, CHRScope *OutermostScope);
337 void sortScopes(SmallVectorImpl<CHRScope *> &Input,
338 SmallVectorImpl<CHRScope *> &Output);
340 void transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes);
341 void transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs);
342 void cloneScopeBlocks(CHRScope *Scope,
351 void fixupBranchesAndSelects(CHRScope *Scope, BasicBlock *PreEntryBlock,
353 void fixupBranch(Region *R, CHRScope *Scope, IRBuilder<> &IRB,
355 void fixupSelect(SelectInst *SI, CHRScope *Scope, IRBuilder<> &IRB,
358 Instruction *BranchOrSelect, CHRScope *Scope,
394 DenseSet<CHRScope *> Scopes;
409 raw_ostream &operator<<(raw_ostream &OS, const CHRScope &Scope) { in operator <<()
444 void CHRScope::print(raw_ostream &OS) const { in print()
463 for (CHRScope *Sub : Subs) { in print()
715 CHRScope * CHR::findScope(Region *R) { in findScope()
716 CHRScope *Result = nullptr; in findScope()
776 Result = new CHRScope(RI); in findScope()
836 Result = new CHRScope(RI); in findScope()
873 void CHR::checkScopeHoistable(CHRScope *Scope) { in checkScopeHoistable()
976 CHRScope * CHR::findScopes(Region *R, Region *NextRegion, Region *ParentRegion, in findScopes()
977 SmallVectorImpl<CHRScope *> &Scopes) { in findScopes()
979 CHRScope *Result = findScope(R); in findScopes()
981 CHRScope *ConsecutiveSubscope = nullptr; in findScopes()
982 SmallVector<CHRScope *, 8> Subscopes; in findScopes()
989 CHRScope *SubCHRScope = findScopes(SubR.get(), NextSubR, R, Scopes); in findScopes()
1013 for (CHRScope *Sub : Subscopes) { in findScopes()
1106 static void getSelectsInScope(CHRScope *Scope, in getSelectsInScope()
1111 for (CHRScope *Sub : Scope->Subs) in getSelectsInScope()
1115 void CHR::splitScopes(SmallVectorImpl<CHRScope *> &Input, in splitScopes()
1116 SmallVectorImpl<CHRScope *> &Output) { in splitScopes()
1117 for (CHRScope *Scope : Input) { in splitScopes()
1125 for (CHRScope *Scope : Output) { in splitScopes()
1131 SmallVector<CHRScope *, 8> CHR::splitScope( in splitScope()
1132 CHRScope *Scope, in splitScope()
1133 CHRScope *Outer, in splitScope()
1136 SmallVectorImpl<CHRScope *> &Output, in splitScope()
1145 SmallVector<CHRScope *, 8> Splits; in splitScope()
1195 CHRScope *Tail = Scope->split(RI.R); in splitScope()
1227 CHRScope *Split = Splits[I]; in splitScope()
1230 SmallVector<CHRScope *, 8> NewSubs; in splitScope()
1233 for (CHRScope *Sub : Split->Subs) { in splitScope()
1234 SmallVector<CHRScope *, 8> SubSplits = splitScope( in splitScope()
1241 SmallVector<CHRScope *, 8> Result; in splitScope()
1243 CHRScope *Split = Splits[I]; in splitScope()
1261 void CHR::classifyBiasedScopes(SmallVectorImpl<CHRScope *> &Scopes) { in classifyBiasedScopes()
1262 for (CHRScope *Scope : Scopes) { in classifyBiasedScopes()
1290 void CHR::classifyBiasedScopes(CHRScope *Scope, CHRScope *OutermostScope) { in classifyBiasedScopes()
1310 for (CHRScope *Sub : Scope->Subs) { in classifyBiasedScopes()
1315 static bool hasAtLeastTwoBiasedBranches(CHRScope *Scope) { in hasAtLeastTwoBiasedBranches()
1323 void CHR::filterScopes(SmallVectorImpl<CHRScope *> &Input, in filterScopes()
1324 SmallVectorImpl<CHRScope *> &Output) { in filterScopes()
1325 for (CHRScope *Scope : Input) { in filterScopes()
1348 void CHR::setCHRRegions(SmallVectorImpl<CHRScope *> &Input, in setCHRRegions()
1349 SmallVectorImpl<CHRScope *> &Output) { in setCHRRegions()
1350 for (CHRScope *Scope : Input) { in setCHRRegions()
1371 void CHR::setCHRRegions(CHRScope *Scope, CHRScope *OutermostScope) { in setCHRRegions()
1416 for (CHRScope *Sub : Scope->Subs) in setCHRRegions()
1420 static bool CHRScopeSorter(CHRScope *Scope1, CHRScope *Scope2) { in CHRScopeSorter()
1424 void CHR::sortScopes(SmallVectorImpl<CHRScope *> &Input, in sortScopes()
1425 SmallVectorImpl<CHRScope *> &Output) { in sortScopes()
1481 static void hoistScopeConditions(CHRScope *Scope, Instruction *HoistPoint, in hoistScopeConditions()
1509 CHRScope *Scope) { in negateICmpIfUsedByBranchOrSelectOnly()
1556 static void insertTrivialPHIs(CHRScope *Scope, in insertTrivialPHIs()
1619 assertCHRRegionsHaveBiasedBranchOrSelect(CHRScope *Scope) { in assertCHRRegionsHaveBiasedBranchOrSelect()
1621 auto HasBiasedBranchOrSelect = [](RegInfo &RI, CHRScope *Scope) { in assertCHRRegionsHaveBiasedBranchOrSelect()
1641 CHRScope *Scope, BasicBlock *PreEntryBlock) { in assertBranchOrSelectConditionHoisted()
1675 void CHR::transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs) { in transformScopes()
1763 void CHR::cloneScopeBlocks(CHRScope *Scope, in cloneScopeBlocks()
1848 void CHR::fixupBranchesAndSelects(CHRScope *Scope, in fixupBranchesAndSelects()
1889 void CHR::fixupBranch(Region *R, CHRScope *Scope, in fixupBranch()
1932 void CHR::fixupSelect(SelectInst *SI, CHRScope *Scope, in fixupSelect()
1957 Instruction *BranchOrSelect, CHRScope *Scope, in addToMergedCondition()
1977 void CHR::transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes) { in transformScopes()
1980 for (CHRScope *Scope : CHRScopes) { in transformScopes()
1991 dumpScopes(SmallVectorImpl<CHRScope *> &Scopes, const char *Label) { in dumpScopes()
1993 for (CHRScope *Scope : Scopes) { in dumpScopes()
2012 SmallVector<CHRScope *, 8> AllScopes; in run()
2021 SmallVector<CHRScope *, 8> SplitScopes; in run()
2032 SmallVector<CHRScope *, 8> FilteredScopes; in run()
2037 SmallVector<CHRScope *, 8> SetScopes; in run()
2044 SmallVector<CHRScope *, 8> SortedScopes; in run()