[llvm] [BranchRelaxation] Remove quadratic behavior in relaxation pass (PR #96250)

Daniel Hoekwater via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 10:28:15 PDT 2024


================
@@ -718,6 +734,13 @@ bool BranchRelaxation::relaxBranchInstructions() {
     }
   }
 
+  // If we relaxed a branch, subsequent block offsets may be underestimated.
+  // Recompute them to guarantee that we relax any branches that we pushed out
+  // of range.
+  if (Changed) {
----------------
dhoekwater wrote:

Done!

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


More information about the llvm-commits mailing list