• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/

Lines Matching refs:CHR

49                               cl::desc("Apply CHR for all functions"));
53 cl::desc("CHR considers a branch bias greater than this ratio as biased"));
57 cl::desc("CHR merges a group of N branches/selects where N >= this value"));
61 cl::desc("Specify file to retrieve the list of modules to apply CHR to"));
65 cl::desc("Specify file to retrieve the list of functions to apply CHR to"));
157 // branches / selects in the hot paths due to CHR.
173 // CHRScope - a sequence of regions to CHR together. It corresponds to a
295 // The instruction at which to insert the CHR conditional branch (and hoist
322 class CHR {
324 CHR(Function &Fin, BlockFrequencyInfo &BFIin, DominatorTree &DTin,
329 ~CHR() {
338 // See the comments in CHR::run() for the high level flow of the algorithm and
463 CHR_DEBUG(dbgs() << "CHR IR dump " << Label << " " << ModuleName << " "
496 // Return true if the given instruction type can be hoisted by CHR.
505 // Return true if the given instruction can be hoisted by CHR.
547 // after CHR.
714 // insert the CHR branch for a region. This is the terminator branch in the
751 // Find a CHR scope in the given region.
752 CHRScope * CHR::findScope(Region *R) {
872 // hoisted above the the CHR branch insert point (the most dominating of
893 void CHR::checkScopeHoistable(CHRScope *Scope) {
997 CHRScope * CHR::findScopes(Region *R, Region *NextRegion, Region *ParentRegion,
1137 void CHR::splitScopes(SmallVectorImpl<CHRScope *> &Input,
1153 SmallVector<CHRScope *, 8> CHR::splitScope(
1283 void CHR::classifyBiasedScopes(SmallVectorImpl<CHRScope *> &Scopes) {
1312 void CHR::classifyBiasedScopes(CHRScope *Scope, CHRScope *OutermostScope) {
1345 void CHR::filterScopes(SmallVectorImpl<CHRScope *> &Input,
1370 void CHR::setCHRRegions(SmallVectorImpl<CHRScope *> &Input,
1393 void CHR::setCHRRegions(CHRScope *Scope, CHRScope *OutermostScope) {
1396 // are and constant-folded after CHR (in case one biased select or a branch
1446 void CHR::sortScopes(SmallVectorImpl<CHRScope *> &Input,
1470 // The trivial phi inserted by the previous CHR scope could replace a
1472 // previous CHR scope, which dominates this scope, it's safe to stop
1643 // Assert that all the CHR regions of the scope have a biased branch or select.
1701 void CHR::transformScopes(CHRScope *Scope, DenseSet<PHINode *> &TrivialPHIs) {
1712 // Insert a trivial phi at the exit block (where the CHR hot path and the
1715 // incoming values for the CHR cold paths to it below. Without this, we'd
1723 // insert the CHR branch into. Note DT gets updated. Since DT gets updated
1768 void CHR::cloneScopeBlocks(CHRScope *Scope,
1774 // CHR-optimized code and the cloned blocks will be the original unoptimized
1777 // which CHR should apply to.
1821 BranchInst *CHR::createMergedBranch(BasicBlock *PreEntryBlock,
1847 void CHR::fixupBranchesAndSelects(CHRScope *Scope,
1870 "CHR",
1882 CHR_DEBUG(dbgs() << "CHR branch bias " << Weights[0] << ":" << Weights[1]
1888 void CHR::fixupBranch(Region *R, CHRScope *Scope,
1932 void CHR::fixupSelect(SelectInst *SI, CHRScope *Scope,
1957 void CHR::addToMergedCondition(bool IsTrueBiased, Value *Cond,
1982 void CHR::transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes) {
2003 bool CHR::run() {
2035 // Filter out the scopes that has only one biased region or select (CHR
2041 // Set the regions to be CHR'ed and their hoist stops for each scope.
2044 CHR_DEBUG(dumpScopes(SetScopes, "Set CHR regions"));
2047 // ones. We need to apply CHR from outer to inner so that we apply CHR only
2057 // Apply the CHR transformation.
2089 return CHR(F, BFI, DT, PSI, RI, *OwnedORE.get()).run();
2108 bool Changed = CHR(F, BFI, DT, PSI, RI, ORE).run();