LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MachineBlockFrequencyInfo.h
Go to the documentation of this file.
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 //===----------------------------------------------------------------------===//
9 //
10 // Loops should be simplified before this analysis.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CODEGEN_MACHINEBLOCKFREQUENCYINFO_H
15 #define LLVM_CODEGEN_MACHINEBLOCKFREQUENCYINFO_H
16 
19 #include <climits>
20 
21 namespace llvm {
22 
23 class MachineBasicBlock;
24 class MachineBranchProbabilityInfo;
25 template<class BlockT, class FunctionT, class BranchProbInfoT>
26 class BlockFrequencyImpl;
27 
28 /// MachineBlockFrequencyInfo pass uses BlockFrequencyImpl implementation to estimate
29 /// machine basic block frequencies.
31 
34 
35 public:
36  static char ID;
37 
39 
41 
42  void getAnalysisUsage(AnalysisUsage &AU) const;
43 
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  ///
52 };
53 
54 }
55 
56 #endif
F(f)
BlockFrequency getBlockFreq(const MachineBasicBlock *MBB) const
void getAnalysisUsage(AnalysisUsage &AU) const
bool runOnMachineFunction(MachineFunction &F)