mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
Rename doFunction() in BFI to calculate() and change its parameters from pointers to references.
http://reviews.llvm.org/D11196 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242322 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3659b8adc9
commit
2fa118d257
@ -905,8 +905,8 @@ template <class BT> class BlockFrequencyInfoImpl : BlockFrequencyInfoImplBase {
|
||||
public:
|
||||
const FunctionT *getFunction() const { return F; }
|
||||
|
||||
void doFunction(const FunctionT *F, const BranchProbabilityInfoT *BPI,
|
||||
const LoopInfoT *LI);
|
||||
void calculate(const FunctionT &F, const BranchProbabilityInfoT &BPI,
|
||||
const LoopInfoT &LI);
|
||||
BlockFrequencyInfoImpl() : BPI(nullptr), LI(nullptr), F(nullptr) {}
|
||||
|
||||
using BlockFrequencyInfoImplBase::getEntryFreq;
|
||||
@ -938,13 +938,13 @@ public:
|
||||
};
|
||||
|
||||
template <class BT>
|
||||
void BlockFrequencyInfoImpl<BT>::doFunction(const FunctionT *F,
|
||||
const BranchProbabilityInfoT *BPI,
|
||||
const LoopInfoT *LI) {
|
||||
void BlockFrequencyInfoImpl<BT>::calculate(const FunctionT &F,
|
||||
const BranchProbabilityInfoT &BPI,
|
||||
const LoopInfoT &LI) {
|
||||
// Save the parameters.
|
||||
this->BPI = BPI;
|
||||
this->LI = LI;
|
||||
this->F = F;
|
||||
this->BPI = &BPI;
|
||||
this->LI = &LI;
|
||||
this->F = &F;
|
||||
|
||||
// Clean up left-over data structures.
|
||||
BlockFrequencyInfoImplBase::clear();
|
||||
@ -952,8 +952,8 @@ void BlockFrequencyInfoImpl<BT>::doFunction(const FunctionT *F,
|
||||
Nodes.clear();
|
||||
|
||||
// Initialize.
|
||||
DEBUG(dbgs() << "\nblock-frequency: " << F->getName() << "\n================="
|
||||
<< std::string(F->getName().size(), '=') << "\n");
|
||||
DEBUG(dbgs() << "\nblock-frequency: " << F.getName() << "\n================="
|
||||
<< std::string(F.getName().size(), '=') << "\n");
|
||||
initializeRPOT();
|
||||
initializeLoops();
|
||||
|
||||
|
@ -110,7 +110,7 @@ void BlockFrequencyInfo::calculate(const Function &F,
|
||||
const LoopInfo &LI) {
|
||||
if (!BFI)
|
||||
BFI.reset(new ImplType);
|
||||
BFI->doFunction(&F, &BPI, &LI);
|
||||
BFI->calculate(F, BPI, LI);
|
||||
#ifndef NDEBUG
|
||||
if (ViewBlockFreqPropagationDAG != GVDT_None)
|
||||
view();
|
||||
|
@ -143,7 +143,7 @@ bool MachineBlockFrequencyInfo::runOnMachineFunction(MachineFunction &F) {
|
||||
MachineLoopInfo &MLI = getAnalysis<MachineLoopInfo>();
|
||||
if (!MBFI)
|
||||
MBFI.reset(new ImplType);
|
||||
MBFI->doFunction(&F, &MBPI, &MLI);
|
||||
MBFI->calculate(F, MBPI, MLI);
|
||||
#ifndef NDEBUG
|
||||
if (ViewMachineBlockFreqPropagationDAG != GVDT_None) {
|
||||
view();
|
||||
|
Loading…
x
Reference in New Issue
Block a user