blockfreq: Rename BlockFrequencyImpl to BlockFrequencyInfoImpl

This is a shared implementation class for BlockFrequencyInfo and
MachineBlockFrequencyInfo, not for BlockFrequency, a related (but
distinct) class.

No functionality change.

<rdar://problem/14292693>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2014-04-11 23:20:58 +00:00
parent 484a2b6c2f
commit e9139c68d4
5 changed files with 24 additions and 24 deletions

View File

@ -1,4 +1,4 @@
//===------- BlockFrequencyInfo.h - Block Frequency Analysis --*- C++ -*---===// //===- BlockFrequencyInfo.h - Block Frequency Analysis ----------*- C++ -*-===//
// //
// The LLVM Compiler Infrastructure // The LLVM Compiler Infrastructure
// //
@ -21,13 +21,13 @@
namespace llvm { namespace llvm {
class BranchProbabilityInfo; class BranchProbabilityInfo;
template<class BlockT, class FunctionT, class BranchProbInfoT> template <class BlockT, class FunctionT, class BranchProbInfoT>
class BlockFrequencyImpl; class BlockFrequencyInfoImpl;
/// BlockFrequencyInfo pass uses BlockFrequencyImpl implementation to estimate /// BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to
/// IR basic block frequencies. /// estimate IR basic block frequencies.
class BlockFrequencyInfo : public FunctionPass { class BlockFrequencyInfo : public FunctionPass {
typedef BlockFrequencyImpl<BasicBlock, Function, BranchProbabilityInfo> typedef BlockFrequencyInfoImpl<BasicBlock, Function, BranchProbabilityInfo>
ImplType; ImplType;
std::unique_ptr<ImplType> BFI; std::unique_ptr<ImplType> BFI;

View File

@ -1,4 +1,4 @@
//===-- BlockFrequencyImpl.h - Block Frequency Implementation --*- C++ -*--===// //==- BlockFrequencyInfoImpl.h - Block Frequency Implementation -*- C++ -*-===//
// //
// The LLVM Compiler Infrastructure // The LLVM Compiler Infrastructure
// //
@ -7,12 +7,12 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// //
// Shared implementation of BlockFrequency for IR and Machine Instructions. // Shared implementation of BlockFrequencyInfo for IR and Machine Instructions.
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#ifndef LLVM_ANALYSIS_BLOCKFREQUENCYIMPL_H #ifndef LLVM_ANALYSIS_BLOCKFREQUENCYINFOIMPL_H
#define LLVM_ANALYSIS_BLOCKFREQUENCYIMPL_H #define LLVM_ANALYSIS_BLOCKFREQUENCYINFOIMPL_H
#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/PostOrderIterator.h"
@ -32,13 +32,13 @@ namespace llvm {
class BlockFrequencyInfo; class BlockFrequencyInfo;
class MachineBlockFrequencyInfo; class MachineBlockFrequencyInfo;
/// BlockFrequencyImpl implements block frequency algorithm for IR and /// BlockFrequencyInfoImpl implements block frequency algorithm for IR and
/// Machine Instructions. Algorithm starts with value ENTRY_FREQ /// Machine Instructions. Algorithm starts with value ENTRY_FREQ
/// for the entry block and then propagates frequencies using branch weights /// for the entry block and then propagates frequencies using branch weights
/// from (Machine)BranchProbabilityInfo. LoopInfo is not required because /// from (Machine)BranchProbabilityInfo. LoopInfo is not required because
/// algorithm can find "backedges" by itself. /// algorithm can find "backedges" by itself.
template<class BlockT, class FunctionT, class BlockProbInfoT> template<class BlockT, class FunctionT, class BlockProbInfoT>
class BlockFrequencyImpl { class BlockFrequencyInfoImpl {
DenseMap<const BlockT *, BlockFrequency> Freqs; DenseMap<const BlockT *, BlockFrequency> Freqs;
@ -267,7 +267,7 @@ class BlockFrequencyImpl {
friend class BlockFrequencyInfo; friend class BlockFrequencyInfo;
friend class MachineBlockFrequencyInfo; friend class MachineBlockFrequencyInfo;
BlockFrequencyImpl() { } BlockFrequencyInfoImpl() { }
void doFunction(FunctionT *fn, BlockProbInfoT *bpi) { void doFunction(FunctionT *fn, BlockProbInfoT *bpi) {
Fn = fn; Fn = fn;

View File

@ -1,4 +1,4 @@
//====-- MachineBlockFrequencyInfo.h - MBB Frequency Analysis -*- C++ -*--====// //===- MachineBlockFrequencyInfo.h - MBB Frequency Analysis -*- C++ -*-----===//
// //
// The LLVM Compiler Infrastructure // The LLVM Compiler Infrastructure
// //
@ -22,14 +22,14 @@ namespace llvm {
class MachineBasicBlock; class MachineBasicBlock;
class MachineBranchProbabilityInfo; class MachineBranchProbabilityInfo;
template<class BlockT, class FunctionT, class BranchProbInfoT> template <class BlockT, class FunctionT, class BranchProbInfoT>
class BlockFrequencyImpl; class BlockFrequencyInfoImpl;
/// MachineBlockFrequencyInfo pass uses BlockFrequencyImpl implementation to estimate /// MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation
/// machine basic block frequencies. /// to estimate machine basic block frequencies.
class MachineBlockFrequencyInfo : public MachineFunctionPass { class MachineBlockFrequencyInfo : public MachineFunctionPass {
typedef BlockFrequencyImpl<MachineBasicBlock, MachineFunction, typedef BlockFrequencyInfoImpl<MachineBasicBlock, MachineFunction,
MachineBranchProbabilityInfo> ImplType; MachineBranchProbabilityInfo> ImplType;
std::unique_ptr<ImplType> MBFI; std::unique_ptr<ImplType> MBFI;
public: public:

View File

@ -1,4 +1,4 @@
//=======-------- BlockFrequencyInfo.cpp - Block Frequency Analysis -------===// //===- BlockFrequencyInfo.cpp - Block Frequency Analysis ------------------===//
// //
// The LLVM Compiler Infrastructure // The LLVM Compiler Infrastructure
// //
@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/Analysis/BlockFrequencyInfo.h" #include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/BlockFrequencyImpl.h" #include "llvm/Analysis/BlockFrequencyInfoImpl.h"
#include "llvm/Analysis/BranchProbabilityInfo.h" #include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/Passes.h" #include "llvm/Analysis/Passes.h"

View File

@ -1,4 +1,4 @@
//====------ MachineBlockFrequencyInfo.cpp - MBB Frequency Analysis ------====// //===- MachineBlockFrequencyInfo.cpp - MBB Frequency Analysis -------------===//
// //
// The LLVM Compiler Infrastructure // The LLVM Compiler Infrastructure
// //
@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h" #include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
#include "llvm/Analysis/BlockFrequencyImpl.h" #include "llvm/Analysis/BlockFrequencyInfoImpl.h"
#include "llvm/CodeGen/MachineBranchProbabilityInfo.h" #include "llvm/CodeGen/MachineBranchProbabilityInfo.h"
#include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/Passes.h"
#include "llvm/InitializePasses.h" #include "llvm/InitializePasses.h"