[llvm] [BranchFolding] Add an option to tail merge only bbs without successors (PR #101969)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 11:26:44 PDT 2024


================
@@ -85,6 +85,11 @@ TailMergeSize("tail-merge-size",
               cl::desc("Min number of instructions to consider tail merging"),
               cl::init(3), cl::Hidden);
 
+static cl::opt<bool> TailMergeOnlyBBsWithoutSucc(
+    "tail-merge-only-bbs-without-succ",
+    cl::desc("Tail merge only basic blocks without successors"),
+    cl::init(false), cl::Hidden);
----------------
arsenm wrote:

Can you use branch probabilities to decide which are not frequently executed?

> Does this make sense to you?

I mean in terms of adding a new debug flag it's no worse than anything else already here, but none of these are really intended for end users 

https://github.com/llvm/llvm-project/pull/101969


More information about the llvm-commits mailing list