aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorHongtao Yu <hoy@fb.com>2021-06-17 11:09:13 -0700
committerHongtao Yu <hoy@fb.com>2021-06-18 15:14:11 -0700
commitbd52495518808bdbf24f4d8e9e20774d6d2e3333 (patch)
tree584ed0830c3b5ad0a0e9e5007b07972392df3d57 /llvm/lib/CodeGen/BranchFolding.cpp
parent36f93fc594ea168d541bb2fde95014a5502bef88 (diff)
downloadllvm-bd52495518808bdbf24f4d8e9e20774d6d2e3333.zip
llvm-bd52495518808bdbf24f4d8e9e20774d6d2e3333.tar.gz
llvm-bd52495518808bdbf24f4d8e9e20774d6d2e3333.tar.bz2
[CSSPGO] Undoing the concept of dangling pseudo probe
As a follow-up to https://reviews.llvm.org/D104129, I'm cleaning up the danling probe related code in both the compiler and llvm-profgen. I'm seeing a 5% size win for the pseudo_probe section for SPEC2017 and 10% for Ciner. Certain benchmark such as 602.gcc has a 20% size win. No obvious difference seen on build time for SPEC2017 and Cinder. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D104477
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index 6deb2dc0..65e7e92 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -1307,16 +1307,6 @@ static void salvageDebugInfoFromEmptyBlock(const TargetInstrInfo *TII,
for (MachineBasicBlock *PredBB : MBB.predecessors())
if (PredBB->succ_size() == 1)
copyDebugInfoToPredecessor(TII, MBB, *PredBB);
-
- // For AutoFDO, if the block is removed, we won't be able to sample it. To
- // avoid assigning a zero weight for BB, move all its pseudo probes into once
- // of its predecessors or successors and mark them dangling. This should allow
- // the counts inference a chance to get a more reasonable weight for the
- // block.
- if (!MBB.pred_empty())
- MBB.moveAndDanglePseudoProbes(*MBB.pred_begin());
- else if (!MBB.succ_empty())
- MBB.moveAndDanglePseudoProbes(*MBB.succ_begin());
}
bool BranchFolder::OptimizeBlock(MachineBasicBlock *MBB) {