Lines Matching full:region

15 /// grows a maximal cold region around that block. The maximal region contains
17 /// cold as the sink. Once a region is found, it's split out of the original
168 // requires unwind destinations to be within the extraction region.
284 /// Get the benefit score of outlining \p Region.
285 static InstructionCost getOutliningBenefit(ArrayRef<BasicBlock *> Region,
290 for (BasicBlock *BB : Region)
299 /// Get the penalty score for outlining \p Region.
300 static int getOutliningPenalty(ArrayRef<BasicBlock *> Region,
310 // Find the number of distinct exit blocks for the region. Use a conservative
311 // check to determine whether control returns from the region.
314 for (BasicBlock *BB : Region) {
323 if (!is_contained(Region, SuccBB)) {
331 // outlining region. These phis are split (\ref severSplitPHINodesOfExits),
338 // Find all incoming values from the outlining region.
341 if (llvm::is_contained(Region, PN.getIncomingBlock(i))) {
374 LLVM_DEBUG(dbgs() << "Applying bonus for: " << Region.size()
376 Penalty -= Region.size();
379 // Apply a penalty for having more than one successor outside of the region.
383 << " non-region successors\n");
390 // Determine if it is beneficial to split the \p Region.
392 const BlockSequence &Region,
394 assert(!Region.empty());
400 InstructionCost OutliningBenefit = getOutliningBenefit(Region, TTI);
402 getOutliningPenalty(Region, Inputs.size(), Outputs.size());
411 // Split the single \p EntryPoint cold region. \p CE is the region code
437 LLVM_DEBUG(llvm::dbgs() << "Outlined Region: " << *OutF);
450 << "Failed to extract region at block "
460 /// A maximal outlining region. This contains all blocks post-dominated by a
462 /// If sink-predecessors and sink-successors cannot be extracted in one region,
466 /// viable sub-region entry point. Blocks with higher scores are better entry
470 /// The suggested entry point into the region. If the region has multiple
471 /// entry points, all blocks within the region may not be reachable from this
549 // If the sink can be added to the cold region, do so. It's considered as
552 // Otherwise, split cold sink-successor blocks using a separate region.
554 // first have predecessors within the extraction region.
597 /// Whether this region has nothing to extract.
600 /// The blocks in this region.
603 /// Whether the entire function containing this region is cold.
606 /// Remove a sub-region from this region and return it as a block sequence.
610 // Remove blocks dominated by the suggested entry point from this region.
611 // During the removal, identify the next best entry point into the region.
651 // of the pair is the entry point into the region to be outlined.
655 // more) than a PO traversal, because we prevent region overlap by keeping
656 // the first region to contain a block.
681 // This block is already part of some outlining region.
685 // This block is already part of some region cannot be outlined.
703 for (OutliningRegion &Region : Regions) {
704 if (Region.empty())
707 if (Region.isEntireFunctionCold()) {
713 BlockSequence SubRegion = Region.takeSingleEntrySubRegion(*DT);
728 // If this outlining region intersects with another, drop the new
729 // region.
732 // the largest region which contains a block, but the extra
748 // The cold block region cannot be outlined.
755 } while (!Region.empty());