|
LLVM
4.0.0
|
#include "llvm/Analysis/BlockFrequencyInfoImpl.h"#include "llvm/ADT/SCCIterator.h"#include "llvm/IR/Function.h"#include "llvm/Support/raw_ostream.h"#include <numeric>Go to the source code of this file.
Classes | |
| struct | llvm::GraphTraits< IrreducibleGraph > |
Namespaces | |
| llvm | |
| Compute iterated dominance frontiers using a linear time algorithm. | |
Macros | |
| #define | DEBUG_TYPE "block-freq" |
Functions | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| static void | createIrreducibleLoop (BlockFrequencyInfoImplBase &BFI, const IrreducibleGraph &G, LoopData *OuterLoop, std::list< LoopData >::iterator Insert, const std::vector< const IrreducibleGraph::IrrNode * > &SCC) |
| #define DEBUG_TYPE "block-freq" |
Definition at line 23 of file BlockFrequencyInfoImpl.cpp.
|
static |
Clear all memory not needed downstream.
Releases all memory not used downstream. In particular, saves Freqs.
Definition at line 260 of file BlockFrequencyInfoImpl.cpp.
References llvm::BlockFrequencyInfoImplBase::clear(), and llvm::BlockFrequencyInfoImplBase::Freqs.
Referenced by llvm::BlockFrequencyInfoImplBase::finalizeMetrics(), llvm::CrashRecoveryContext::registerCleanup(), and llvm::CrashRecoveryContext::unregisterCleanup().
|
static |
Definition at line 120 of file BlockFrequencyInfoImpl.cpp.
References assert().
Referenced by combineWeightsByHashing(), and combineWeightsBySorting().
|
static |
Definition at line 175 of file BlockFrequencyInfoImpl.cpp.
References combineWeightsByHashing(), and combineWeightsBySorting().
Referenced by llvm::BlockFrequencyInfoImplBase::Distribution::normalize().
|
static |
Definition at line 157 of file BlockFrequencyInfoImpl.cpp.
References combineWeight(), I, and llvm::NextPowerOf2().
Referenced by combineWeights().
|
static |
Definition at line 136 of file BlockFrequencyInfoImpl.cpp.
References combineWeight(), E, I, and L.
Referenced by combineWeights().
|
static |
Definition at line 435 of file BlockFrequencyInfoImpl.cpp.
References llvm::dbgs(), DEBUG, llvm::BlockFrequencyInfoImplBase::Freqs, and llvm::BlockFrequencyInfoImplBase::getBlockName().
Referenced by llvm::BlockFrequencyInfoImplBase::finalizeMetrics().
|
static |
Definition at line 711 of file BlockFrequencyInfoImpl.cpp.
References llvm::dbgs(), DEBUG, findIrreducibleHeaders(), llvm::BlockFrequencyInfoImplBase::Loops, N, and llvm::BlockFrequencyInfoImplBase::Working.
Referenced by llvm::BlockFrequencyInfoImplBase::analyzeIrreducible().
|
static |
Definition at line 388 of file BlockFrequencyInfoImpl.cpp.
References llvm::dbgs(), and llvm::BlockFrequencyInfoImplBase::getBlockName().
Referenced by llvm::BlockFrequencyInfoImplBase::adjustLoopHeaderMass(), and llvm::BlockFrequencyInfoImplBase::distributeMass().
|
static |
Find extra irreducible headers.
Find entry blocks and other blocks with backedges, which exist when G contains irreducible sub-SCCs.
Definition at line 644 of file BlockFrequencyInfoImpl.cpp.
References assert(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::begin(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::dbgs(), DEBUG, E, llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::BlockFrequencyInfoImplBase::getBlockName(), I, llvm::make_range(), P, and llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::size().
Referenced by createIrreducibleLoop().
|
static |
Definition at line 33 of file BlockFrequencyInfoImpl.cpp.
Referenced by llvm::bfi_detail::BlockMass::print().
|
static |
Definition at line 185 of file BlockFrequencyInfoImpl.cpp.
Referenced by llvm::BlockFrequencyInfoImplBase::Distribution::normalize().
|
static |
Unwrap a loop package.
Visits all the members of a loop, adjusting their BlockData according to the loop's pseudo-node.
Definition at line 474 of file BlockFrequencyInfoImpl.cpp.
References llvm::dbgs(), DEBUG, F, llvm::BlockFrequencyInfoImplBase::Freqs, llvm::BlockFrequencyInfoImplBase::getBlockName(), llvm::BlockFrequencyInfoImplBase::getLoopName(), N, and llvm::BlockFrequencyInfoImplBase::Working.
Referenced by llvm::BlockFrequencyInfoImplBase::unwrapLoops().
1.8.6