#ifndef LLVM_TRANSFORMS_UTILS_SAMPLEPROFILEINFERENCE_H
#define LLVM_TRANSFORMS_UTILS_SAMPLEPROFILEINFERENCE_H
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/SmallVector.h"
namespace llvm {
struct FlowJump;
struct FlowBlock { … };
struct FlowJump { … };
struct FlowFunction { … };
struct ProfiParams { … };
void applyFlowInference(const ProfiParams &Params, FlowFunction &Func);
void applyFlowInference(FlowFunction &Func);
template <typename FT> class SampleProfileInference { … };
template <typename BT>
void SampleProfileInference<BT>::apply(BlockWeightMap &BlockWeights,
EdgeWeightMap &EdgeWeights) { … }
template <typename BT>
FlowFunction SampleProfileInference<BT>::createFlowFunction(
const std::vector<const BasicBlockT *> &BasicBlocks,
DenseMap<const BasicBlockT *, uint64_t> &BlockIndex) { … }
template <typename BT>
inline void SampleProfileInference<BT>::findUnlikelyJumps(
const std::vector<const BasicBlockT *> &BasicBlocks,
BlockEdgeMap &Successors, FlowFunction &Func) { … }
template <typename BT>
inline bool SampleProfileInference<BT>::isExit(const BasicBlockT *BB) { … }
}
#endif