LLVM API Documentation
#include "llvm/CodeGen/Passes.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"#include "llvm/CodeGen/MachineBranchProbabilityInfo.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineLoopInfo.h"#include "llvm/CodeGen/MachineModuleInfo.h"#include "llvm/Support/Allocator.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Debug.h"#include "llvm/Target/TargetInstrInfo.h"#include "llvm/Target/TargetLowering.h"#include "llvm/Target/TargetSubtargetInfo.h"#include <algorithm>
Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "block-placement2" |
Functions | |
| STATISTIC (NumCondBranches,"Number of conditional branches") | |
| STATISTIC (NumUncondBranches,"Number of uncondittional branches") | |
| STATISTIC (CondBranchTakenFreq,"Potential frequency of taking conditional branches") | |
| STATISTIC (UncondBranchTakenFreq,"Potential frequency of taking unconditional branches") | |
| INITIALIZE_PASS_BEGIN (MachineBlockPlacement,"block-placement2","Branch Probability Basic Block Placement", false, false) INITIALIZE_PASS_END(MachineBlockPlacement | |
| block Branch Probability Basic Block static false std::string | getBlockName (MachineBasicBlock *BB) |
| Helper to print the name of a MBB. | |
| static std::string | getBlockNum (MachineBasicBlock *BB) |
| Helper to print the number of a MBB. | |
| INITIALIZE_PASS_BEGIN (MachineBlockPlacementStats,"block-placement-stats","Basic Block Placement Stats", false, false) INITIALIZE_PASS_END(MachineBlockPlacementStats | |
Variables | |
| static cl::opt< unsigned > | AlignAllBlock ("align-all-blocks", cl::desc("Force the alignment of all ""blocks in the function."), cl::init(0), cl::Hidden) |
| static cl::opt< unsigned > | ExitBlockBias ("block-placement-exit-block-bias", cl::desc("Block frequency percentage a loop exit block needs ""over the original exit to be considered the new exit."), cl::init(0), cl::Hidden) |
| block | placement2 |
| block Branch Probability Basic Block | Placement |
| block Branch Probability Basic Block | false |
| block placement | stats |
| block placement Basic Block Placement | Stats |
| #define DEBUG_TYPE "block-placement2" |
Definition at line 49 of file MachineBlockPlacement.cpp.
| block Branch Probability Basic Block static false std::string getBlockName | ( | MachineBasicBlock * | BB | ) | [static] |
Helper to print the name of a MBB.
Only used by debug logging.
Definition at line 267 of file MachineBlockPlacement.cpp.
References llvm::raw_ostream::flush(), llvm::MachineBasicBlock::getName(), and llvm::MachineBasicBlock::getNumber().
Referenced by llvm::BlockFrequencyInfoImplBase::addToDist(), llvm::BlockFrequencyInfoImplBase::distributeMass(), llvm::BlockFrequencyInfoImplBase::getLoopName(), and llvm::BlockFrequencyInfoImplBase::packageLoop().
| static std::string getBlockNum | ( | MachineBasicBlock * | BB | ) | [static] |
Helper to print the number of a MBB.
Only used by debug logging.
Definition at line 279 of file MachineBlockPlacement.cpp.
References llvm::raw_ostream::flush(), and llvm::MachineBasicBlock::getNumber().
Referenced by llvm::MachineTraceMetrics::Trace::getInstrSlack(), llvm::MachineTraceMetrics::Trace::getPHIDepth(), llvm::MachineTraceMetrics::Trace::getResourceDepth(), and llvm::MachineTraceMetrics::Trace::getResourceLength().
| INITIALIZE_PASS_BEGIN | ( | MachineBlockPlacement | , |
| "block-placement2" | , | ||
| "Branch Probability Basic Block Placement" | , | ||
| false | , | ||
| false | |||
| ) |
| INITIALIZE_PASS_BEGIN | ( | MachineBlockPlacementStats | , |
| "block-placement-stats" | , | ||
| "Basic Block Placement Stats" | , | ||
| false | , | ||
| false | |||
| ) |
| STATISTIC | ( | NumCondBranches | , |
| "Number of conditional branches" | |||
| ) |
| STATISTIC | ( | NumUncondBranches | , |
| "Number of uncondittional branches" | |||
| ) |
| STATISTIC | ( | CondBranchTakenFreq | , |
| "Potential frequency of taking conditional branches" | |||
| ) |
| STATISTIC | ( | UncondBranchTakenFreq | , |
| "Potential frequency of taking unconditional branches" | |||
| ) |
cl::opt<unsigned> AlignAllBlock("align-all-blocks", cl::desc("Force the alignment of all ""blocks in the function."), cl::init(0), cl::Hidden) [static] |
cl::opt<unsigned> ExitBlockBias("block-placement-exit-block-bias", cl::desc("Block frequency percentage a loop exit block needs ""over the original exit to be considered the new exit."), cl::init(0), cl::Hidden) [static] |
Definition at line 260 of file MachineBlockPlacement.cpp.
| block Branch Probability Basic Block Placement |
Definition at line 260 of file MachineBlockPlacement.cpp.
| block placement2 |
Definition at line 260 of file MachineBlockPlacement.cpp.
Definition at line 1172 of file MachineBlockPlacement.cpp.
Definition at line 1172 of file MachineBlockPlacement.cpp.
Referenced by llvm::PrintStatistics().