Skip to content

Commit

Permalink
HeatUtils.h - remove unnecessary includes. NFC.
Browse files Browse the repository at this point in the history
Replace with BlockFrequencyInfo/Function forward declarations
Move BlockFrequencyInfo.h include to HeatUtils.cpp
  • Loading branch information
RKSimon committed Apr 18, 2020
1 parent b7cdb13 commit 9b95186
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 4 additions & 6 deletions llvm/include/llvm/Analysis/HeatUtils.h
Expand Up @@ -14,16 +14,14 @@
#ifndef LLVM_ANALYSIS_HEATUTILS_H
#define LLVM_ANALYSIS_HEATUTILS_H

#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"

#include <cstdint>
#include <string>

namespace llvm {

class BlockFrequencyInfo;
class Function;

// Returns the maximum frequency of a BB in a function.
uint64_t getMaxFreq(const Function &F, const BlockFrequencyInfo *BFI);

Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/Analysis/HeatUtils.cpp
Expand Up @@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//

#include "llvm/Analysis/HeatUtils.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/IR/Instructions.h"

namespace llvm {
Expand Down Expand Up @@ -61,4 +62,4 @@ std::string getHeatColor(double percent) {
return heatPalette[colorId];
}

} // namespace llvm
} // namespace llvm

0 comments on commit 9b95186

Please sign in to comment.