LLVM: lib/CodeGen/MBFIWrapper.cpp Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13
16#include
17
18using namespace llvm;
19
21 auto I = MergedBBFreq.find(MBB);
22
23 if (I != MergedBBFreq.end())
24 return I->second;
25
26 return MBFI.getBlockFreq(MBB);
27}
28
32}
33
34std::optional<uint64_t>
36 auto I = MergedBBFreq.find(MBB);
37
38
39
40 if (I != MergedBBFreq.end())
41 return MBFI.getProfileCountFromFreq(I->second);
42
43 return MBFI.getBlockProfileCount(MBB);
44}
45
49
static bool isSimple(Instruction *I)
std::optional< uint64_t > getBlockProfileCount(const MachineBasicBlock *MBB) const
Definition MBFIWrapper.cpp:35
BlockFrequency getBlockFreq(const MachineBasicBlock *MBB) const
Definition MBFIWrapper.cpp:20
void view(const Twine &Name, bool isSimple=true)
Definition MBFIWrapper.cpp:46
void setBlockFreq(const MachineBasicBlock *MBB, BlockFrequency F)
Definition MBFIWrapper.cpp:29
BlockFrequency getEntryFreq() const
Definition MBFIWrapper.cpp:50
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
This is an optimization pass for GlobalISel generic memory operations.