Lines Matching refs:CHRScope
175 class CHRScope { class
177 CHRScope(RegInfo RI) : BranchInsertPoint(nullptr) { in CHRScope() function in __anon5bb62add0211::CHRScope
199 bool appendable(CHRScope *Next) { in appendable()
216 void append(CHRScope *Next) { in append()
225 for (CHRScope *Sub : Next->Subs) in append()
229 void addSub(CHRScope *SubIn) { in addSub()
244 CHRScope *split(Region *Boundary) { in split()
255 SmallVector<CHRScope *, 8> TailSubs; in split()
262 CHRScope *Sub = *It; in split()
278 return new CHRScope(TailRegInfos, TailSubs); in split()
292 SmallVector<CHRScope *, 8> Subs; // Subscopes.
316 CHRScope(SmallVector<RegInfo, 8> &RegInfosIn, in CHRScope() function in __anon5bb62add0211::CHRScope
317 SmallVector<CHRScope *, 8> &SubsIn) in CHRScope() argument
329 for (CHRScope *Scope : Scopes) { in ~CHR()
340 void findScopes(SmallVectorImpl<CHRScope *> &Output) { in findScopes()
342 CHRScope *Scope = findScopes(R, nullptr, nullptr, Output); in findScopes()
347 CHRScope *findScopes(Region *R, Region *NextRegion, Region *ParentRegion,
348 SmallVectorImpl<CHRScope *> &Scopes);
349 CHRScope *findScope(Region *R);
350 void checkScopeHoistable(CHRScope *Scope);
352 void splitScopes(SmallVectorImpl<CHRScope *> &Input,
353 SmallVectorImpl<CHRScope *> &Output);
354 SmallVector<CHRScope *, 8> splitScope(CHRScope *Scope,
355 CHRScope *Outer,
358 SmallVectorImpl<CHRScope *> &Output,
361 void classifyBiasedScopes(SmallVectorImpl<CHRScope *> &Scopes);
362 void classifyBiasedScopes(CHRScope *Scope, CHRScope *OutermostScope);
364 void filterScopes(SmallVectorImpl<CHRScope *> &Input,
365 SmallVectorImpl<CHRScope *> &Output);
367 void setCHRRegions(SmallVectorImpl<CHRScope *> &Input,
368 SmallVectorImpl<CHRScope *> &Output);
369 void setCHRRegions(CHRScope *Scope, CHRScope *OutermostScope);
371 void sortScopes(SmallVectorImpl<CHRScope *> &Input,
372 SmallVectorImpl<CHRScope *> &Output);
374 void transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes);
375 void transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs);
376 void cloneScopeBlocks(CHRScope *Scope,
385 void fixupBranchesAndSelects(CHRScope *Scope,
390 CHRScope *Scope,
394 CHRScope *Scope,
399 CHRScope *Scope,
424 DenseSet<CHRScope *> Scopes;
437 raw_ostream &operator<<(raw_ostream &OS, const CHRScope &Scope) { in operator <<()
470 void CHRScope::print(raw_ostream &OS) const { in print()
489 for (CHRScope *Sub : Subs) { in print()
730 CHRScope * CHR::findScope(Region *R) { in findScope()
731 CHRScope *Result = nullptr; in findScope()
774 Result = new CHRScope(RI); in findScope()
834 Result = new CHRScope(RI); in findScope()
871 void CHR::checkScopeHoistable(CHRScope *Scope) { in checkScopeHoistable()
971 CHRScope * CHR::findScopes(Region *R, Region *NextRegion, Region *ParentRegion, in findScopes()
972 SmallVectorImpl<CHRScope *> &Scopes) { in findScopes()
974 CHRScope *Result = findScope(R); in findScopes()
976 CHRScope *ConsecutiveSubscope = nullptr; in findScopes()
977 SmallVector<CHRScope *, 8> Subscopes; in findScopes()
984 CHRScope *SubCHRScope = findScopes(SubR.get(), NextSubR, R, Scopes); in findScopes()
1008 for (CHRScope *Sub : Subscopes) { in findScopes()
1100 static void getSelectsInScope(CHRScope *Scope, in getSelectsInScope()
1105 for (CHRScope *Sub : Scope->Subs) in getSelectsInScope()
1109 void CHR::splitScopes(SmallVectorImpl<CHRScope *> &Input, in splitScopes()
1110 SmallVectorImpl<CHRScope *> &Output) { in splitScopes()
1111 for (CHRScope *Scope : Input) { in splitScopes()
1119 for (CHRScope *Scope : Output) { in splitScopes()
1125 SmallVector<CHRScope *, 8> CHR::splitScope( in splitScope()
1126 CHRScope *Scope, in splitScope()
1127 CHRScope *Outer, in splitScope()
1130 SmallVectorImpl<CHRScope *> &Output, in splitScope()
1139 SmallVector<CHRScope *, 8> Splits; in splitScope()
1189 CHRScope *Tail = Scope->split(RI.R); in splitScope()
1221 CHRScope *Split = Splits[I]; in splitScope()
1224 SmallVector<CHRScope *, 8> NewSubs; in splitScope()
1227 for (CHRScope *Sub : Split->Subs) { in splitScope()
1228 SmallVector<CHRScope *, 8> SubSplits = splitScope( in splitScope()
1235 SmallVector<CHRScope *, 8> Result; in splitScope()
1237 CHRScope *Split = Splits[I]; in splitScope()
1255 void CHR::classifyBiasedScopes(SmallVectorImpl<CHRScope *> &Scopes) { in classifyBiasedScopes()
1256 for (CHRScope *Scope : Scopes) { in classifyBiasedScopes()
1284 void CHR::classifyBiasedScopes(CHRScope *Scope, CHRScope *OutermostScope) { in classifyBiasedScopes()
1304 for (CHRScope *Sub : Scope->Subs) { in classifyBiasedScopes()
1309 static bool hasAtLeastTwoBiasedBranches(CHRScope *Scope) { in hasAtLeastTwoBiasedBranches()
1317 void CHR::filterScopes(SmallVectorImpl<CHRScope *> &Input, in filterScopes()
1318 SmallVectorImpl<CHRScope *> &Output) { in filterScopes()
1319 for (CHRScope *Scope : Input) { in filterScopes()
1342 void CHR::setCHRRegions(SmallVectorImpl<CHRScope *> &Input, in setCHRRegions()
1343 SmallVectorImpl<CHRScope *> &Output) { in setCHRRegions()
1344 for (CHRScope *Scope : Input) { in setCHRRegions()
1365 void CHR::setCHRRegions(CHRScope *Scope, CHRScope *OutermostScope) { in setCHRRegions()
1408 for (CHRScope *Sub : Scope->Subs) in setCHRRegions()
1412 bool CHRScopeSorter(CHRScope *Scope1, CHRScope *Scope2) { in CHRScopeSorter()
1416 void CHR::sortScopes(SmallVectorImpl<CHRScope *> &Input, in sortScopes()
1417 SmallVectorImpl<CHRScope *> &Output) { in sortScopes()
1459 static void hoistScopeConditions(CHRScope *Scope, Instruction *HoistPoint, in hoistScopeConditions()
1486 CHRScope *Scope) { in negateICmpIfUsedByBranchOrSelectOnly()
1536 static void insertTrivialPHIs(CHRScope *Scope, in insertTrivialPHIs()
1603 assertCHRRegionsHaveBiasedBranchOrSelect(CHRScope *Scope) { in assertCHRRegionsHaveBiasedBranchOrSelect()
1605 auto HasBiasedBranchOrSelect = [](RegInfo &RI, CHRScope *Scope) { in assertCHRRegionsHaveBiasedBranchOrSelect()
1625 CHRScope *Scope, BasicBlock *PreEntryBlock) { in assertBranchOrSelectConditionHoisted()
1659 void CHR::transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs) { in transformScopes()
1726 void CHR::cloneScopeBlocks(CHRScope *Scope, in cloneScopeBlocks()
1805 void CHR::fixupBranchesAndSelects(CHRScope *Scope, in fixupBranchesAndSelects()
1846 void CHR::fixupBranch(Region *R, CHRScope *Scope, in fixupBranch()
1890 void CHR::fixupSelect(SelectInst *SI, CHRScope *Scope, in fixupSelect()
1917 CHRScope *Scope, in addToMergedCondition()
1940 void CHR::transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes) { in transformScopes()
1943 for (CHRScope *Scope : CHRScopes) { in transformScopes()
1954 dumpScopes(SmallVectorImpl<CHRScope *> &Scopes, const char *Label) { in dumpScopes()
1956 for (CHRScope *Scope : Scopes) { in dumpScopes()
1975 SmallVector<CHRScope *, 8> AllScopes; in run()
1984 SmallVector<CHRScope *, 8> SplitScopes; in run()
1995 SmallVector<CHRScope *, 8> FilteredScopes; in run()
2000 SmallVector<CHRScope *, 8> SetScopes; in run()
2007 SmallVector<CHRScope *, 8> SortedScopes; in run()