aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 1011f52..c6914dc 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -901,32 +901,6 @@ MachineBasicBlock::transferSuccessorsAndUpdatePHIs(MachineBasicBlock *FromMBB) {
normalizeSuccProbs();
}
-/// A block emptied (i.e., with all instructions moved out of it) won't be
-/// sampled at run time. In such cases, AutoFDO will be informed of zero samples
-/// collected for the block. This is not accurate and could lead to misleading
-/// weights assigned for the block. A way to mitigate that is to treat such
-/// block as having unknown counts in the AutoFDO profile loader and allow the
-/// counts inference tool a chance to calculate a relatively reasonable weight
-/// for it. This can be done by moving all pseudo probes in the emptied block
-/// i.e, /c this, to before /c ToMBB and tag them dangling. Note that this is
-/// not needed for dead blocks which really have a zero weight. It's per
-/// transforms to decide whether to call this function or not.
-void MachineBasicBlock::moveAndDanglePseudoProbes(MachineBasicBlock *ToMBB) {
- SmallVector<MachineInstr *, 4> ToBeMoved;
- for (MachineInstr &MI : instrs()) {
- if (MI.isPseudoProbe()) {
- MI.addPseudoProbeAttribute(PseudoProbeAttributes::Dangling);
- ToBeMoved.push_back(&MI);
- }
- }
-
- MachineBasicBlock::iterator I = ToMBB->getFirstTerminator();
- for (MachineInstr *MI : ToBeMoved) {
- MI->removeFromParent();
- ToMBB->insert(I, MI);
- }
-}
-
bool MachineBasicBlock::isPredecessor(const MachineBasicBlock *MBB) const {
return is_contained(predecessors(), MBB);
}