[llvm] [RISCV] Add branch folding before branch relaxation (PR #134760)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 10 11:35:52 PDT 2025


================
@@ -152,7 +155,8 @@ bool BranchFolderLegacy::runOnMachineFunction(MachineFunction &MF) {
   // TailMerge can create jump into if branches that make CFG irreducible for
   // HW that requires structurized CFG.
   bool EnableTailMerge = !MF.getTarget().requiresStructuredCFG() &&
-                         PassConfig->getEnableTailMerge();
+                         PassConfig->getEnableTailMerge() &&
+                         this->EnableTailMerge;
----------------
arsenm wrote:

This global state should be moved to only change the pass parameter 

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


More information about the llvm-commits mailing list