LLVM: lib/Analysis/BlockFrequencyInfoImpl.cpp File Reference (original) (raw)
#include "[llvm/Analysis/BlockFrequencyInfoImpl.h](BlockFrequencyInfoImpl%5F8h%5Fsource.html)"#include "[llvm/ADT/APInt.h](APInt%5F8h%5Fsource.html)"#include "[llvm/ADT/DenseMap.h](DenseMap%5F8h%5Fsource.html)"#include "[llvm/ADT/SCCIterator.h](SCCIterator%5F8h%5Fsource.html)"#include "[llvm/ADT/SmallString.h](SmallString%5F8h%5Fsource.html)"#include "llvm/Config/llvm-config.h"#include "[llvm/IR/Function.h](IR%5F2Function%5F8h%5Fsource.html)"#include "[llvm/Support/BlockFrequency.h](BlockFrequency%5F8h%5Fsource.html)"#include "[llvm/Support/BranchProbability.h](BranchProbability%5F8h%5Fsource.html)"#include "[llvm/Support/Compiler.h](Compiler%5F8h%5Fsource.html)"#include "[llvm/Support/Debug.h](Support%5F2Debug%5F8h%5Fsource.html)"#include "[llvm/Support/MathExtras.h](MathExtras%5F8h%5Fsource.html)"#include "[llvm/Support/ScaledNumber.h](ScaledNumber%5F8h%5Fsource.html)"#include "[llvm/Support/raw_ostream.h](raw%5F%5Fostream%5F8h%5Fsource.html)"#include <algorithm>#include <cassert>#include <cstddef>#include <cstdint>#include <iterator>#include <list>#include <numeric>#include <optional>#include <utility>#include <vector>
Go to the source code of this file.
| Namespaces | |
|---|---|
| namespace | llvm |
| This is an optimization pass for GlobalISel generic memory operations. |
| Macros | |
|---|---|
| #define | DEBUG_TYPE "block-freq" |
| Functions | |
|---|---|
| cl::opt< bool > | llvm::CheckBFIUnknownBlockQueries ("check-bfi-unknown-block-queries", cl::init(false), cl::Hidden, cl::desc("Check if block frequency is queried for an unknown block " "for debugging missed BFI updates")) |
| cl::opt< bool > | llvm::UseIterativeBFIInference ("use-iterative-bfi-inference", cl::Hidden, cl::desc("Apply an iterative post-processing to infer correct BFI counts")) |
| cl::opt< unsigned > | llvm::IterativeBFIMaxIterationsPerBlock ("iterative-bfi-max-iterations-per-block", cl::init(1000), cl::Hidden, cl::desc("Iterative inference: maximum number of update iterations " "per block")) |
| cl::opt< double > | llvm::IterativeBFIPrecision ("iterative-bfi-precision", cl::init(1e-12), cl::Hidden, cl::desc("Iterative inference: delta convergence precision; smaller values " "typically lead to better results at the cost of worsen runtime")) |
| static char | getHexDigit (int N) |
| static void | combineWeight (Weight &W, const Weight &OtherW) |
| static void | combineWeightsBySorting (WeightList &Weights) |
| static void | combineWeightsByHashing (WeightList &Weights) |
| static void | combineWeights (WeightList &Weights) |
| static uint64_t | shiftRightAndRound (uint64_t N, int Shift) |
| static void | cleanup (BlockFrequencyInfoImplBase &BFI) |
| Clear all memory not needed downstream. | |
| static void | debugAssign (const BlockFrequencyInfoImplBase &BFI, const DitheringDistributer &D, const BlockNode &T, const BlockMass &M, const char *Desc) |
| static void | convertFloatingToInteger (BlockFrequencyInfoImplBase &BFI, const Scaled64 &Min, const Scaled64 &Max) |
| static void | unwrapLoop (BlockFrequencyInfoImplBase &BFI, LoopData &Loop) |
| Unwrap a loop package. | |
| static void | findIrreducibleHeaders (const BlockFrequencyInfoImplBase &BFI, const IrreducibleGraph &G, const std::vector< const IrreducibleGraph::IrrNode * > &SCC, LoopData::NodeList &Headers, LoopData::NodeList &Others) |
| Find extra irreducible headers. | |
| static void | createIrreducibleLoop (BlockFrequencyInfoImplBase &BFI, const IrreducibleGraph &G, LoopData *OuterLoop, std::list< LoopData >::iterator Insert, const std::vector< const IrreducibleGraph::IrrNode * > &SCC) |
◆ DEBUG_TYPE
#define DEBUG_TYPE "block-freq"
◆ cleanup()
◆ combineWeight()
| void combineWeight ( Weight & W, const Weight & OtherW ) | static |
|---|
◆ combineWeights()
| void combineWeights ( WeightList & Weights) | static |
|---|
◆ combineWeightsByHashing()
| void combineWeightsByHashing ( WeightList & Weights) | static |
|---|
◆ combineWeightsBySorting()
| void combineWeightsBySorting ( WeightList & Weights) | static |
|---|
◆ convertFloatingToInteger()
◆ createIrreducibleLoop()
◆ debugAssign()
◆ findIrreducibleHeaders()
Find extra irreducible headers.
Find entry blocks and other blocks with backedges, which exist when G contains irreducible sub-SCCs.
Definition at line 689 of file BlockFrequencyInfoImpl.cpp.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::begin(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::dbgs(), E(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), G, llvm::BlockFrequencyInfoImplBase::getBlockName(), I, LLVM_DEBUG, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup(), llvm::make_range(), P, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size(), and llvm::sort().
Referenced by createIrreducibleLoop().
◆ getHexDigit()
| char getHexDigit ( int N) | static |
|---|