Deleted Added
full compact
MachineBlockFrequencyInfo.h (226890) MachineBlockFrequencyInfo.h (235633)
1//====----- MachineBlockFrequencyInfo.h - MachineBlock Frequency Analysis ----====//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 6 unchanged lines hidden (view full) ---

15#define LLVM_CODEGEN_MACHINEBLOCKFREQUENCYINFO_H
16
17#include "llvm/CodeGen/MachineFunctionPass.h"
18#include "llvm/Support/BlockFrequency.h"
19#include <climits>
20
21namespace llvm {
22
1//====----- MachineBlockFrequencyInfo.h - MachineBlock Frequency Analysis ----====//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 6 unchanged lines hidden (view full) ---

15#define LLVM_CODEGEN_MACHINEBLOCKFREQUENCYINFO_H
16
17#include "llvm/CodeGen/MachineFunctionPass.h"
18#include "llvm/Support/BlockFrequency.h"
19#include <climits>
20
21namespace llvm {
22
23class MachineBasicBlock;
23class MachineBranchProbabilityInfo;
24template<class BlockT, class FunctionT, class BranchProbInfoT>
25class BlockFrequencyImpl;
26
27/// MachineBlockFrequencyInfo pass uses BlockFrequencyImpl implementation to estimate
28/// machine basic block frequencies.
29class MachineBlockFrequencyInfo : public MachineFunctionPass {
30
24class MachineBranchProbabilityInfo;
25template<class BlockT, class FunctionT, class BranchProbInfoT>
26class BlockFrequencyImpl;
27
28/// MachineBlockFrequencyInfo pass uses BlockFrequencyImpl implementation to estimate
29/// machine basic block frequencies.
30class MachineBlockFrequencyInfo : public MachineFunctionPass {
31
31 BlockFrequencyImpl<MachineBasicBlock, MachineFunction, MachineBranchProbabilityInfo> *MBFI;
32 BlockFrequencyImpl33 MachineBranchProbabilityInfo> *MBFI;
32
33public:
34 static char ID;
35
36 MachineBlockFrequencyInfo();
37
38 ~MachineBlockFrequencyInfo();
39
40 void getAnalysisUsage(AnalysisUsage &AU) const;
41
42 bool runOnMachineFunction(MachineFunction &F);
43
44 /// getblockFreq - Return block frequency. Return 0 if we don't have the
45 /// information. Please note that initial frequency is equal to 1024. It means
46 /// that we should not rely on the value itself, but only on the comparison to
47 /// the other block frequencies. We do this to avoid using of floating points.
48 ///
34
35public:
36 static char ID;
37
38 MachineBlockFrequencyInfo();
39
40 ~MachineBlockFrequencyInfo();
41
42 void getAnalysisUsage(AnalysisUsage &AU) const;
43
44 bool runOnMachineFunction(MachineFunction &F);
45
46 /// getblockFreq - Return block frequency. Return 0 if we don't have the
47 /// information. Please note that initial frequency is equal to 1024. It means
48 /// that we should not rely on the value itself, but only on the comparison to
49 /// the other block frequencies. We do this to avoid using of floating points.
50 ///
49 BlockFrequency getBlockFreq(MachineBasicBlock *MBB) const;
51 BlockFrequency getBlockFreq(const MachineBasicBlock *MBB) const;
50};
51
52}
53
54#endif
52};
53
54}
55
56#endif