Go to the documentation of this file.
26 FPI.
Uses = ((!
F.hasLocalLinkage()) ? 1 : 0) +
F.getNumUses();
28 for (
const auto &
BB :
F) {
31 if (
const auto *BI = dyn_cast<BranchInst>(
BB.getTerminator())) {
32 if (BI->isConditional())
34 }
else if (
const auto *
SI = dyn_cast<SwitchInst>(
BB.getTerminator())) {
36 (
SI->getNumCases() + (
nullptr !=
SI->getDefaultDest()));
39 for (
const auto &
I :
BB) {
40 if (
auto *CS = dyn_cast<CallBase>(&
I)) {
41 const auto *
Callee = CS->getCalledFunction();
63 <<
"BlocksReachedFromConditionalInstruction: "
65 <<
"Uses: " <<
Uses <<
"\n"
84 OS <<
"Printing analysis results of CFA for function "
85 <<
"'" <<
F.getName() <<
"':"
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
int64_t TopLevelLoopCount
FunctionAnalysisManager FAM
FunctionPropertiesInfo run(Function &F, FunctionAnalysisManager &FAM)
static FunctionPropertiesInfo getFunctionPropertiesInfo(const Function &F, const LoopInfo &LI)
This class implements an extremely fast bulk output stream that can only output to a stream.
A special type used by analysis passes to provide an address that identifies that particular analysis...
StandardInstrumentations SI(Debug, VerifyEach)
void print(raw_ostream &OS) const
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
int64_t Uses
Number of uses of this function, plus 1 if the function is callable outside the module.
unsigned getLoopDepth(const BlockT *BB) const
Return the loop nesting level of the specified block.
amdgpu Simplify well known AMD library false FunctionCallee Callee
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
int64_t BlocksReachedFromConditionalInstruction
Number of blocks reached from a conditional instruction, or that are 'cases' of a SwitchInstr.
int64_t BasicBlockCount
Number of basic blocks.
A container for analyses that lazily runs them and caches their results.
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
Analysis pass that exposes the LoopInfo for a function.
int64_t DirectCallsToDefinedFunctions
Number of direct calls made from this function to other functions defined in this module.