mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 06:00:28 +00:00
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:
parent
484a2b6c2f
commit
e9139c68d4
@ -1,4 +1,4 @@
|
||||
//===------- BlockFrequencyInfo.h - Block Frequency Analysis --*- C++ -*---===//
|
||||
//===- BlockFrequencyInfo.h - Block Frequency Analysis ----------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
@ -21,13 +21,13 @@
|
||||
namespace llvm {
|
||||
|
||||
class BranchProbabilityInfo;
|
||||
template<class BlockT, class FunctionT, class BranchProbInfoT>
|
||||
class BlockFrequencyImpl;
|
||||
template <class BlockT, class FunctionT, class BranchProbInfoT>
|
||||
class BlockFrequencyInfoImpl;
|
||||
|
||||
/// BlockFrequencyInfo pass uses BlockFrequencyImpl implementation to estimate
|
||||
/// IR basic block frequencies.
|
||||
/// BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to
|
||||
/// estimate IR basic block frequencies.
|
||||
class BlockFrequencyInfo : public FunctionPass {
|
||||
typedef BlockFrequencyImpl<BasicBlock, Function, BranchProbabilityInfo>
|
||||
typedef BlockFrequencyInfoImpl<BasicBlock, Function, BranchProbabilityInfo>
|
||||
ImplType;
|
||||
std::unique_ptr<ImplType> BFI;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//===-- BlockFrequencyImpl.h - Block Frequency Implementation --*- C++ -*--===//
|
||||
//==- BlockFrequencyInfoImpl.h - Block Frequency Implementation -*- C++ -*-===//
|
||||
//
|
||||
// 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
|
||||
#define LLVM_ANALYSIS_BLOCKFREQUENCYIMPL_H
|
||||
#ifndef LLVM_ANALYSIS_BLOCKFREQUENCYINFOIMPL_H
|
||||
#define LLVM_ANALYSIS_BLOCKFREQUENCYINFOIMPL_H
|
||||
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/PostOrderIterator.h"
|
||||
@ -32,13 +32,13 @@ namespace llvm {
|
||||
class BlockFrequencyInfo;
|
||||
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
|
||||
/// for the entry block and then propagates frequencies using branch weights
|
||||
/// from (Machine)BranchProbabilityInfo. LoopInfo is not required because
|
||||
/// algorithm can find "backedges" by itself.
|
||||
template<class BlockT, class FunctionT, class BlockProbInfoT>
|
||||
class BlockFrequencyImpl {
|
||||
class BlockFrequencyInfoImpl {
|
||||
|
||||
DenseMap<const BlockT *, BlockFrequency> Freqs;
|
||||
|
||||
@ -267,7 +267,7 @@ class BlockFrequencyImpl {
|
||||
friend class BlockFrequencyInfo;
|
||||
friend class MachineBlockFrequencyInfo;
|
||||
|
||||
BlockFrequencyImpl() { }
|
||||
BlockFrequencyInfoImpl() { }
|
||||
|
||||
void doFunction(FunctionT *fn, BlockProbInfoT *bpi) {
|
||||
Fn = fn;
|
@ -1,4 +1,4 @@
|
||||
//====-- MachineBlockFrequencyInfo.h - MBB Frequency Analysis -*- C++ -*--====//
|
||||
//===- MachineBlockFrequencyInfo.h - MBB Frequency Analysis -*- C++ -*-----===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
@ -22,14 +22,14 @@ namespace llvm {
|
||||
|
||||
class MachineBasicBlock;
|
||||
class MachineBranchProbabilityInfo;
|
||||
template<class BlockT, class FunctionT, class BranchProbInfoT>
|
||||
class BlockFrequencyImpl;
|
||||
template <class BlockT, class FunctionT, class BranchProbInfoT>
|
||||
class BlockFrequencyInfoImpl;
|
||||
|
||||
/// MachineBlockFrequencyInfo pass uses BlockFrequencyImpl implementation to estimate
|
||||
/// machine basic block frequencies.
|
||||
/// MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation
|
||||
/// to estimate machine basic block frequencies.
|
||||
class MachineBlockFrequencyInfo : public MachineFunctionPass {
|
||||
typedef BlockFrequencyImpl<MachineBasicBlock, MachineFunction,
|
||||
MachineBranchProbabilityInfo> ImplType;
|
||||
typedef BlockFrequencyInfoImpl<MachineBasicBlock, MachineFunction,
|
||||
MachineBranchProbabilityInfo> ImplType;
|
||||
std::unique_ptr<ImplType> MBFI;
|
||||
|
||||
public:
|
||||
|
@ -1,4 +1,4 @@
|
||||
//=======-------- BlockFrequencyInfo.cpp - Block Frequency Analysis -------===//
|
||||
//===- BlockFrequencyInfo.cpp - Block Frequency Analysis ------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
@ -12,7 +12,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/BlockFrequencyInfo.h"
|
||||
#include "llvm/Analysis/BlockFrequencyImpl.h"
|
||||
#include "llvm/Analysis/BlockFrequencyInfoImpl.h"
|
||||
#include "llvm/Analysis/BranchProbabilityInfo.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
//====------ MachineBlockFrequencyInfo.cpp - MBB Frequency Analysis ------====//
|
||||
//===- MachineBlockFrequencyInfo.cpp - MBB Frequency Analysis -------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
@ -12,7 +12,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
|
||||
#include "llvm/Analysis/BlockFrequencyImpl.h"
|
||||
#include "llvm/Analysis/BlockFrequencyInfoImpl.h"
|
||||
#include "llvm/CodeGen/MachineBranchProbabilityInfo.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/InitializePasses.h"
|
||||
|
Loading…
Reference in New Issue
Block a user