[llvm] [BranchFolding] Add an option to tail merge only bbs without successors (PR #101969)
Vladimir Radosavljevic via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 06:49:50 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);
----------------
vladimirradosavljevic wrote:
> Can you use branch probabilities to decide which are not frequently executed?
I think it is feasible, but taking into account that here we can just use early return if option is passed, I would say it is not worth it to add complexity to this.
https://github.com/llvm/llvm-project/pull/101969
More information about the llvm-commits
mailing list