[llvm] [CodeGen][NPM] Update BranchFolderLegacy make tail merge configurable via flag (PR #135277)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 21 06:12:33 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- llvm/include/llvm/CodeGen/BranchFoldingPass.h llvm/include/llvm/CodeGen/Passes.h llvm/lib/CodeGen/BranchFolding.cpp llvm/lib/CodeGen/TargetPassConfig.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index c836065f0..bbbcc4611 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -1519,9 +1519,9 @@ void TargetPassConfig::addMachineLateOptimization() {
addPass(&MachineLateInstrsCleanupID);
// Branch folding must be run after regalloc and prolog/epilog insertion.
- if(!isPassSubstitutedOrOverridden(&BranchFolderPassID))
+ if (!isPassSubstitutedOrOverridden(&BranchFolderPassID))
addPass(createBranchFolderPass(!TM->requiresStructuredCFG() &&
- getEnableTailMerge()));
+ getEnableTailMerge()));
// Tail duplication.
// Note that duplicating tail just increases code size and degrades
``````````
</details>
https://github.com/llvm/llvm-project/pull/135277
More information about the llvm-commits
mailing list