LLVM  11.0.0git
Functions | Variables
BBSectionsPrepare.cpp File Reference
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/LineIterator.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Target/TargetMachine.h"
Include dependency graph for BBSectionsPrepare.cpp:

Go to the source code of this file.

Functions

 INITIALIZE_PASS (BBSectionsPrepare, "bbsections-prepare", "Prepares for basic block sections, by splitting functions " "into clusters of basic blocks.", false, false) static void updateBranches(MachineFunction &MF
 
 for (auto &MBB :MF)
 
static bool getBBClusterInfoForFunction (const MachineFunction &MF, const StringMap< StringRef > FuncAliasMap, const ProgramBBClusterInfoMapTy &ProgramBBClusterInfo, std::vector< Optional< BBClusterInfo >> &V)
 
static bool assignSectionsAndSortBasicBlocks (MachineFunction &MF, const std::vector< Optional< BBClusterInfo >> &FuncBBClusterInfo)
 
static Error getBBClusterInfo (const MemoryBuffer *MBuf, ProgramBBClusterInfoMapTy &ProgramBBClusterInfo, StringMap< StringRef > &FuncAliasMap)
 

Variables

const SmallVector< MachineBasicBlock *, 4 > & PreLayoutFallThroughs
 
SmallVector< MachineOperand, 4 > Cond
 

Function Documentation

◆ assignSectionsAndSortBasicBlocks()

static bool assignSectionsAndSortBasicBlocks ( MachineFunction MF,
const std::vector< Optional< BBClusterInfo >> &  FuncBBClusterInfo 
)
static

◆ for()

for ( auto &MBB :MF  )

◆ getBBClusterInfo()

static Error getBBClusterInfo ( const MemoryBuffer MBuf,
ProgramBBClusterInfoMapTy &  ProgramBBClusterInfo,
StringMap< StringRef > &  FuncAliasMap 
)
static

◆ getBBClusterInfoForFunction()

static bool getBBClusterInfoForFunction ( const MachineFunction MF,
const StringMap< StringRef FuncAliasMap,
const ProgramBBClusterInfoMapTy &  ProgramBBClusterInfo,
std::vector< Optional< BBClusterInfo >> &  V 
)
static

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( BBSectionsPrepare  ,
"bbsections-prepare"  ,
"Prepares for basic block  sections,
by splitting functions " "into clusters of basic blocks."  ,
false  ,
false   
) &

Variable Documentation

◆ Cond

Definition at line 159 of file BBSectionsPrepare.cpp.

Referenced by addConditions(), alwaysAvailable(), llvm::X86InstrInfo::analyzeBranchPredicate(), areInverseVectorBitmasks(), llvm::ARMTargetLowering::ARMTargetLowering(), assertBranchOrSelectConditionHoisted(), BrPHIToSelect(), buildNonAtomicBinOp(), buildPartialUnswitchConditionalBranch(), canonicalizeSaturatedAdd(), CanProveNotTakenFirstIteration(), llvm::MachineBasicBlock::canSplitCriticalEdge(), CC_MipsO32_FP64(), checkDecodedInstruction(), llvm::ModuloScheduleExpander::cleanup(), llvm::CloneFunction(), llvm::collectCmpOps(), combineADDToMAT_PCREL_ADDR(), combineBrCond(), combineCMov(), combineSelect(), combineSelectOfTwoConstants(), combineVSelectToBLENDV(), combineVSelectWithAllOnesOrZeros(), computeUnlikelySuccessors(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessors(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessorsImpl(), ConstantAddressBlock(), llvm::ConstantFoldSelectInstruction(), llvm::ConstantFoldTerminator(), ConvertSelectToConcatVector(), ConvertToSInt(), createCMovFP(), llvm::createControlHeightReductionLegacyPass(), llvm::createHexagonHardwareLoops(), llvm::PeelingModuloScheduleExpander::CreateLCSSAExitingBlock(), createRdxShuffleMask(), createResumeEntryBlock(), DecodeLDR(), dependsOnLocalPhi(), earlyExpandDIVFIX(), EmitAVX512Test(), llvm::SelectionDAGBuilder::EmitBranchForMergedCondition(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), EraseTerminatorAndDCECond(), llvm::Evaluator::EvaluateBlock(), expandf64Toi32(), findAffectedValues(), findHoistingInsertPosAndDeps(), findLIVLoopCondition(), FindLoopCounter(), llvm::SelectionDAGBuilder::FindMergedConditions(), FindWidenableTerminatorAboveLoop(), FixTail(), llvm::PeelingModuloScheduleExpander::fixupBranches(), llvm::CondOpInit::Fold(), foldBitCastSelect(), llvm::FoldBranchToCommonDest(), foldFreeOpFromSelect(), foldICmpShlOne(), foldMulSelectToNegate(), foldSelectGEP(), foldSelectOfConstantsUsingSra(), foldSetClearBits(), llvm::InstCombiner::FoldShiftByConstant(), foldXorTruncShiftIntoCmp(), FunctionNumber(), genLoopLimit(), llvm::IRTranslator::getAnalysisUsage(), getBaseWithOffsetUsingSplitOR(), getBBFallenThrough(), getBinOpsForFactorization(), getBranchCondString(), getCompareCC(), getCondCode(), llvm::SelectionDAG::getCondCode(), GetConstantInt(), llvm::SelectionDAG::getCopyFromReg(), getExpandedMinMaxOps(), llvm::PPCInstrInfo::getExtendResourceLenLimit(), llvm::MachineBasicBlock::getFallThrough(), getFallThroughMBB(), llvm::SMTSolver::getFloatSort(), getHashValueImpl(), getIdentityValueForAtomicOp(), getLayoutSuccessorProbThreshold(), getLoadExtOrTrunc(), getMad64_32(), llvm::MipsInstrInfo::GetMemOperand(), getMinAnalyzeableBackedgeTakenCount(), getOnlyLiveSuccessor(), llvm::BPFInstrInfo::getRegisterInfo(), llvm::NVPTXInstrInfo::getRegisterInfo(), llvm::ARCInstrInfo::getRegisterInfo(), llvm::XCoreInstrInfo::getRegisterInfo(), llvm::LanaiInstrInfo::getRegisterInfo(), llvm::MSP430InstrInfo::getRegisterInfo(), llvm::VEInstrInfo::getRegisterInfo(), llvm::WebAssemblyInstrInfo::getRegisterInfo(), llvm::SparcInstrInfo::getRegisterInfo(), llvm::AVRInstrInfo::getRegisterInfo(), llvm::R600InstrInfo::getRegisterInfo(), getSelectFoldableConstant(), llvm::ARMBaseInstrInfo::getSubtarget(), getTrueOrFalseValue(), llvm::MipsTargetLowering::getTypeForExtReturn(), getValueFromCondition(), getValueFromConditionImpl(), llvm::SimplifyQuery::getWithInstruction(), getX86SSEConditionCode(), hasOnlySelectUsers(), hasUsersIn(), INITIALIZE_PASS(), llvm::HexagonInstrInfo::insertBranch(), llvm::SIInstrInfo::insertIndirectBranch(), insertSinCosCall(), inversePermutation(), isAlwaysFoldable(), isAndOrOfSetCCs(), llvm::PPCInstrInfo::isBDNZ(), llvm::TargetLowering::DAGCombinerInfo::isCalledByLegalizer(), isContractable(), llvm::TargetLowering::isExtendedTrueVal(), isFunctionEntryBlock(), isIgnorableInst(), isImmValidForOpcode(), isInRage(), IsInterestingCmp(), isLoopNeverExecuted(), isObjectDereferencedInBlock(), isOperandKill(), isSETCCorConvertedSETCC(), isSimpleIf(), llvm::AArch64InstrInfo::isSubregFoldable(), isTrivialLoopExitBlock(), isTruncWithZeroHighBitsInput(), llvm::isValidCoprocessorNumber(), isVectorPredicable(), llvm::AMDGPULegalizerInfo::legalizeFrint(), llvm::IRBuilderBase::LLVM_ATTRIBUTE_DEPRECATED(), llvm::MipsInstrInfo::loadRegFromStackSlot(), llvm::X86TargetLowering::LowerAsmOutputForConstraint(), llvm::LanaiTargetLowering::LowerBR_CC(), LowerBUILD_VECTORvXi1(), lowerFABS64(), llvm::AMDGPUTargetLowering::LowerFRINT(), LowerMINMAX(), LowerSADDSUBSAT(), llvm::LanaiTargetLowering::LowerSELECT_CC(), llvm::LanaiTargetLowering::LowerSETCC(), LowerSETCCCARRY(), LowerShiftParts(), lowerVSELECTtoVectorShuffle(), LowerVSETCC(), LowerXALUO(), matchCondition(), matchFMinFMaxLegacy(), llvm::matchSelectPattern(), mayLoopAccessLocation(), MaySpeculate(), mayUseP9Setb(), mergeOperations(), llvm::VPRecipeBase::moveAfter(), llvm::MSP430TargetLowering::MSP430TargetLowering(), narrowVectorSelect(), needsLFTR(), parseCC(), parseConstraintCode(), AbstractManglingParser< ManglingParser< Alloc >, Alloc >::parseExpr(), llvm::parseWidenableBranch(), llvm::PeelSingleBlockLoop(), false::LibCallsShrinkWrap::perform(), llvm::HexagonTargetLowering::PerformDAGCombine(), llvm::PPCTargetLowering::PerformDAGCombine(), PerformHeapAllocSRoA(), PerformHWLoopCombine(), performORCombine(), llvm::AMDGPUTargetLowering::performSelectCombine(), PerformVCMPCombine(), PerformVSELECTCombine(), prepareICWorklistFromFunction(), llvm::JumpThreadingPass::ProcessImpliedCondition(), processSwitch(), profitImm(), recordCondition(), llvm::AArch64InstrInfo::removeBranch(), removeExternalCFGEdges(), removePhis(), llvm::R600TargetLowering::ReplaceNodeResults(), llvm::RewriteStatepointsForGC::runOnFunction(), scalarizeBinOpOfSplats(), llvm::SelectionDAGBuilder::setUnusedArgValue(), SimplifyCondBranchToCondBranch(), simplifyOneLoop(), llvm::TargetLowering::SimplifySetCC(), simplifyTerminatorLeadingToRet(), SinkCommonCodeFromPredecessors(), llvm::SplitCriticalEdge(), llvm::MachineBasicBlock::SplitCriticalEdge(), splitEdge(), StackMallocSizeClass(), llvm::SelectInst::swapValues(), ThreadCmpOverSelect(), transformToIndexedCompare(), tryToElideArgumentCopy(), llvm::JumpThreadingPass::TryToUnfoldSelectInCurrBB(), turnVectorIntoSplatVector(), TypeSizeToSizeIndex(), llvm::UnreachableInst::UnreachableInst(), unstackifyVRegsUsedInSplitBB(), unswitchBestCondition(), UpdatePDTWorklist(), UpdatePredRedefs(), llvm::MachineBasicBlock::updateTerminator(), llvm::MachineFunction::verify(), versionCallSite(), llvm::Interpreter::visitBranchInst(), llvm::InstCombiner::visitBranchInst(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFPTrunc(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitSub(), llvm::SelectionDAGBuilder::visitSwitchCase(), llvm::Interpreter::visitSwitchInst(), llvm::InstCombiner::visitSwitchInst(), widenCtPop(), llvm::InnerLoopVectorizer::widenSelectInstruction(), widenVec(), llvm::wouldInstructionBeTriviallyDead(), and X86ChooseCmpImmediateOpcode().

◆ PreLayoutFallThroughs

const SmallVector<MachineBasicBlock *, 4>& PreLayoutFallThroughs
Initial value:
{
const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo()
const HexagonInstrInfo * TII
TargetInstrInfo - Interface to description of machine instruction set.

Definition at line 157 of file BBSectionsPrepare.cpp.

Referenced by assignSectionsAndSortBasicBlocks().