LLVM  6.0.0svn
Classes | Namespaces | Macros | Typedefs | Functions | Variables
BlockFrequencyInfo.cpp File Reference
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/iterator.h"
#include "llvm/Analysis/BlockFrequencyInfoImpl.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <string>
Include dependency graph for BlockFrequencyInfo.cpp:

Go to the source code of this file.

Classes

struct  llvm::GraphTraits< BlockFrequencyInfo * >
 
struct  llvm::DOTGraphTraits< BlockFrequencyInfo * >
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define DEBUG_TYPE   "block-freq"
 

Typedefs

using llvm::BFIDOTGTraitsBase = BFIDOTGraphTraitsBase< BlockFrequencyInfo, BranchProbabilityInfo >
 

Functions

static GVDAGType llvm::getGVDT ()
 
 INITIALIZE_PASS_BEGIN (BlockFrequencyInfoWrapperPass, "block-freq", "Block Frequency Analysis", true, true) INITIALIZE_PASS_END(BlockFrequencyInfoWrapperPass
 

Variables

static cl::opt< GVDAGTypeViewBlockFreqPropagationDAG ("view-block-freq-propagation-dags", cl::Hidden, cl::desc("Pop up a window to show a dag displaying how block " "frequencies propagation through the CFG."), cl::values(clEnumValN(GVDT_None, "none", "do not display graphs."), clEnumValN(GVDT_Fraction, "fraction", "display a graph using the " "fractional block frequency representation."), clEnumValN(GVDT_Integer, "integer", "display a graph using the raw " "integer fractional block frequency representation."), clEnumValN(GVDT_Count, "count", "display a graph using the real " "profile count if available.")))
 
cl::opt< std::string > ViewBlockFreqFuncName ("view-bfi-func-name", cl::Hidden, cl::desc("The option to specify " "the name of the function " "whose CFG will be displayed."))
 
cl::opt< unsignedViewHotFreqPercent ("view-hot-freq-percent", cl::init(10), cl::Hidden, cl::desc("An integer in percent used to specify " "the hot blocks/edges to be displayed " "in red: a block or edge whose frequency " "is no less than the max frequency of the " "function multiplied by this percent."))
 
cl::opt< PGOViewCountsTypePGOViewCounts ("pgo-view-counts", cl::Hidden, cl::desc("A boolean option to show CFG dag or text with " "block profile counts and branch probabilities " "right after PGO profile annotation step. The " "profile counts are computed using branch " "probabilities from the runtime profile data and " "block frequency propagation algorithm. To view " "the raw counts from the profile, use option " "-pgo-view-raw-counts instead. To limit graph " "display to only one function, use filtering option " "-view-bfi-func-name."), cl::values(clEnumValN(PGOVCT_None, "none", "do not show."), clEnumValN(PGOVCT_Graph, "graph", "show a graph."), clEnumValN(PGOVCT_Text, "text", "show in text.")))
 
static cl::opt< boolPrintBlockFreq ("print-bfi", cl::init(false), cl::Hidden, cl::desc("Print the block frequency info."))
 
cl::opt< std::string > PrintBlockFreqFuncName ("print-bfi-func-name", cl::Hidden, cl::desc("The option to specify the name of the function " "whose block frequency info is printed."))
 
block freq
 
block Block Frequency Analysis
 
block Block Frequency true
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "block-freq"

Definition at line 34 of file BlockFrequencyInfo.cpp.

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( BlockFrequencyInfoWrapperPass  ,
"block-freq ,
"Block Frequency Analysis ,
true  ,
true   
)

Variable Documentation

◆ Analysis

block Block Frequency Analysis

◆ freq

block freq

Definition at line 293 of file BlockFrequencyInfo.cpp.

Referenced by llvm::SpillPlacement::Node::addBias().

◆ PGOViewCounts

cl::opt<PGOViewCountsType> PGOViewCounts("pgo-view-counts", cl::Hidden, cl::desc("A boolean option to show CFG dag or text with " "block profile counts and branch probabilities " "right after PGO profile annotation step. The " "profile counts are computed using branch " "probabilities from the runtime profile data and " "block frequency propagation algorithm. To view " "the raw counts from the profile, use option " "-pgo-view-raw-counts instead. To limit graph " "display to only one function, use filtering option " "-view-bfi-func-name."), cl::values(clEnumValN(PGOVCT_None, "none", "do not show."), clEnumValN(PGOVCT_Graph, "graph", "show a graph."), clEnumValN(PGOVCT_Text, "text", "show in text.")))

◆ PrintBlockFreq

cl::opt<bool> PrintBlockFreq("print-bfi", cl::init(false), cl::Hidden, cl::desc("Print the block frequency info."))
static

◆ PrintBlockFreqFuncName

cl::opt<std::string> PrintBlockFreqFuncName("print-bfi-func-name", cl::Hidden, cl::desc("The option to specify the name of the function " "whose block frequency info is printed."))

◆ true

block Block Frequency true

Definition at line 293 of file BlockFrequencyInfo.cpp.

◆ ViewBlockFreqFuncName

cl::opt<std::string> ViewBlockFreqFuncName("view-bfi-func-name", cl::Hidden, cl::desc("The option to specify " "the name of the function " "whose CFG will be displayed."))

◆ ViewBlockFreqPropagationDAG

cl::opt<GVDAGType> ViewBlockFreqPropagationDAG("view-block-freq-propagation-dags", cl::Hidden, cl::desc("Pop up a window to show a dag displaying how block " "frequencies propagation through the CFG."), cl::values(clEnumValN(GVDT_None, "none", "do not display graphs."), clEnumValN(GVDT_Fraction, "fraction", "display a graph using the " "fractional block frequency representation."), clEnumValN(GVDT_Integer, "integer", "display a graph using the raw " "integer fractional block frequency representation."), clEnumValN(GVDT_Count, "count", "display a graph using the real " "profile count if available.")))
static

◆ ViewHotFreqPercent

cl::opt<unsigned> ViewHotFreqPercent("view-hot-freq-percent", cl::init(10), cl::Hidden, cl::desc("An integer in percent used to specify " "the hot blocks/edges to be displayed " "in red: a block or edge whose frequency " "is no less than the max frequency of the " "function multiplied by this percent."))