LLVM API Documentation
#include "llvm/Analysis/BlockFrequencyInfoImpl.h"#include "llvm/ADT/SCCIterator.h"#include "llvm/Support/raw_ostream.h"#include <deque>
Go to the source code of this file.
Classes | |
| struct | llvm::GraphTraits< IrreducibleGraph > |
Namespaces | |
| namespace | llvm |
List of target independent CodeGen pass IDs. | |
Defines | |
| #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. | |
| static Scaled64 | getMaxLoopScale () |
| Get the maximum allowed loop scale. | |
| 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) |
| #define DEBUG_TYPE "block-freq" |
Definition at line 22 of file BlockFrequencyInfoImpl.cpp.
| static void cleanup | ( | BlockFrequencyInfoImplBase & | BFI | ) | [static] |
Clear all memory not needed downstream.
Releases all memory not used downstream. In particular, saves Freqs.
Definition at line 242 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 void combineWeight | ( | Weight & | W, |
| const Weight & | OtherW | ||
| ) | [static] |
Definition at line 118 of file BlockFrequencyInfoImpl.cpp.
Referenced by combineWeightsByHashing(), and combineWeightsBySorting().
| static void combineWeights | ( | WeightList & | Weights | ) | [static] |
Definition at line 167 of file BlockFrequencyInfoImpl.cpp.
References combineWeightsByHashing(), and combineWeightsBySorting().
Referenced by llvm::BlockFrequencyInfoImplBase::Distribution::normalize().
| static void combineWeightsByHashing | ( | WeightList & | Weights | ) | [static] |
Definition at line 150 of file BlockFrequencyInfoImpl.cpp.
References combineWeight(), I, and llvm::NextPowerOf2().
Referenced by combineWeights().
| static void combineWeightsBySorting | ( | WeightList & | Weights | ) | [static] |
Definition at line 129 of file BlockFrequencyInfoImpl.cpp.
References combineWeight(), and I.
Referenced by combineWeights().
| static void convertFloatingToInteger | ( | BlockFrequencyInfoImplBase & | BFI, |
| const Scaled64 & | Min, | ||
| const Scaled64 & | Max | ||
| ) | [static] |
Definition at line 411 of file BlockFrequencyInfoImpl.cpp.
References llvm::dbgs(), DEBUG, llvm::BlockFrequencyInfoImplBase::Freqs, and llvm::BlockFrequencyInfoImplBase::getBlockName().
Referenced by llvm::BlockFrequencyInfoImplBase::finalizeMetrics().
| static void createIrreducibleLoop | ( | BlockFrequencyInfoImplBase & | BFI, |
| const IrreducibleGraph & | G, | ||
| LoopData * | OuterLoop, | ||
| std::list< LoopData >::iterator | Insert, | ||
| const std::vector< const IrreducibleGraph::IrrNode * > & | SCC | ||
| ) | [static] |
Definition at line 646 of file BlockFrequencyInfoImpl.cpp.
References llvm::dbgs(), DEBUG, findIrreducibleHeaders(), llvm::BlockFrequencyInfoImplBase::Loops, N, and llvm::BlockFrequencyInfoImplBase::Working.
Referenced by llvm::BlockFrequencyInfoImplBase::analyzeIrreducible().
| static void findIrreducibleHeaders | ( | const BlockFrequencyInfoImplBase & | BFI, |
| const IrreducibleGraph & | G, | ||
| const std::vector< const IrreducibleGraph::IrrNode * > & | SCC, | ||
| LoopData::NodeList & | Headers, | ||
| LoopData::NodeList & | Others | ||
| ) | [static] |
Find extra irreducible headers.
Find entry blocks and other blocks with backedges, which exist when G contains irreducible sub-SCCs.
Definition at line 580 of file BlockFrequencyInfoImpl.cpp.
References llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT >, KeyT, ValueT, KeyInfoT >::begin(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT >, KeyT, ValueT, KeyInfoT >::count(), llvm::dbgs(), DEBUG, llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT >, KeyT, ValueT, KeyInfoT >::end(), llvm::BlockFrequencyInfoImplBase::getBlockName(), I, llvm::make_range(), P, and llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT >, KeyT, ValueT, KeyInfoT >::size().
Referenced by createIrreducibleLoop().
| static char getHexDigit | ( | int | N | ) | [static] |
Definition at line 32 of file BlockFrequencyInfoImpl.cpp.
Referenced by llvm::bfi_detail::BlockMass::print().
| static Scaled64 getMaxLoopScale | ( | ) | [static] |
Get the maximum allowed loop scale.
Gives the maximum number of estimated iterations allowed for a loop. Very large numbers cause problems downstream (even within 64-bits).
Definition at line 326 of file BlockFrequencyInfoImpl.cpp.
Referenced by llvm::BlockFrequencyInfoImplBase::computeLoopScale().
| static uint64_t shiftRightAndRound | ( | uint64_t | N, |
| int | Shift | ||
| ) | [static] |
Definition at line 176 of file BlockFrequencyInfoImpl.cpp.
Referenced by llvm::BlockFrequencyInfoImplBase::Distribution::normalize().
| static void unwrapLoop | ( | BlockFrequencyInfoImplBase & | BFI, |
| LoopData & | Loop | ||
| ) | [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 441 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().