LLVM  4.0.0
Classes | Functions
llvm::bfi_detail Namespace Reference

Classes

struct  BlockEdgesAdder
 
class  BlockMass
 Mass of a block. More...
 
struct  TypeMap
 
struct  TypeMap< BasicBlock >
 
struct  TypeMap< MachineBasicBlock >
 
struct  IrreducibleGraph
 Graph of irreducible control flow. More...
 

Functions

BlockMass operator+ (BlockMass L, BlockMass R)
 
BlockMass operator- (BlockMass L, BlockMass R)
 
BlockMass operator* (BlockMass L, BranchProbability R)
 
BlockMass operator* (BranchProbability L, BlockMass R)
 
raw_ostreamoperator<< (raw_ostream &OS, BlockMass X)
 
template<class BlockT >
std::string getBlockName (const BlockT *BB)
 Get the name of a MachineBasicBlock. More...
 
template<>
std::string getBlockName (const BasicBlock *BB)
 Get the name of a BasicBlock. More...
 

Detailed Description

Note
This should be a lambda, but that crashes GCC 4.7.

Function Documentation

template<class BlockT >
std::string llvm::bfi_detail::getBlockName ( const BlockT *  BB)

Get the name of a MachineBasicBlock.

Get the name of a MachineBasicBlock. It's templated so that including from CodeGen is unnecessary (that would be a layering issue).

This is used mainly for debug output. The name is similar to MachineBasicBlock::getFullName(), but skips the name of the function.

Definition at line 529 of file BlockFrequencyInfoImpl.h.

References assert(), and llvm::Twine::str().

Referenced by llvm::BlockFrequencyInfoImplBase::addToDist(), llvm::BlockFrequencyInfoImplBase::adjustLoopHeaderMass(), llvm::BlockFrequencyInfoImplBase::getLoopName(), llvm::BlockFrequencyInfoImplBase::packageLoop(), and llvm::BlockFrequencyInfoImpl< BlockT >::print().

template<>
std::string llvm::bfi_detail::getBlockName ( const BasicBlock *  BB)
inline

Get the name of a BasicBlock.

Definition at line 537 of file BlockFrequencyInfoImpl.h.

References assert(), llvm::Value::getName(), and llvm::StringRef::str().

BlockMass llvm::bfi_detail::operator* ( BlockMass  L,
BranchProbability  R 
)
inline

Definition at line 135 of file BlockFrequencyInfoImpl.h.

BlockMass llvm::bfi_detail::operator* ( BranchProbability  L,
BlockMass  R 
)
inline

Definition at line 138 of file BlockFrequencyInfoImpl.h.

References L.

BlockMass llvm::bfi_detail::operator+ ( BlockMass  L,
BlockMass  R 
)
inline

Definition at line 129 of file BlockFrequencyInfoImpl.h.

BlockMass llvm::bfi_detail::operator- ( BlockMass  L,
BlockMass  R 
)
inline

Definition at line 132 of file BlockFrequencyInfoImpl.h.

raw_ostream& llvm::bfi_detail::operator<< ( raw_ostream &  OS,
BlockMass  X 
)
inline

Definition at line 142 of file BlockFrequencyInfoImpl.h.

References llvm::bfi_detail::BlockMass::print().