LLVM API Documentation

Classes | Namespaces | Defines | Functions
BlockFrequencyInfoImpl.cpp File Reference
#include "llvm/Analysis/BlockFrequencyInfoImpl.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/Support/raw_ostream.h"
#include <deque>
Include dependency graph for BlockFrequencyInfoImpl.cpp:

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 Documentation

#define DEBUG_TYPE   "block-freq"

Definition at line 22 of file BlockFrequencyInfoImpl.cpp.


Function Documentation

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]
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]
static void createIrreducibleLoop ( BlockFrequencyInfoImplBase BFI,
const IrreducibleGraph G,
LoopData *  OuterLoop,
std::list< LoopData >::iterator  Insert,
const std::vector< const IrreducibleGraph::IrrNode * > &  SCC 
) [static]
static void findIrreducibleHeaders ( const BlockFrequencyInfoImplBase BFI,
const IrreducibleGraph G,
const std::vector< const IrreducibleGraph::IrrNode * > &  SCC,
LoopData::NodeList &  Headers,
LoopData::NodeList &  Others 
) [static]
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]
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().