[llvm] [BOLT][AArch64] Expand cmpbr when reversing would overflow (PR #202998)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 02:50:59 PDT 2026


================
@@ -2171,38 +2191,88 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
     }
   }
 
-  bool isReversibleBranch(const MCInst &Inst) const override {
+  BranchLivenessInfo
+  createBranchLivenessInfo(BinaryFunction &BF,
+                           DataflowInfoManager &DIM) const override {
+    BranchLivenessInfo Info;
+    LivenessAnalysis &LA = DIM.getLivenessAnalysis();
----------------
paschalis-mpeis wrote:

Can't we defer `getLivenessAnalysis` until we encounter the first cmpbr in a function?

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


More information about the llvm-commits mailing list