[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


================
@@ -73,6 +75,15 @@ enum BTIKind {
   JC /// Accepting both.
 };
 
+struct BranchLivenessInfo {
+  DenseMap<const MCInst *, bool> FlagsLiveIn;
+
+  bool mustPreserveFlags(const MCInst &Inst) const {
+    auto It = FlagsLiveIn.find(&Inst);
+    return It == FlagsLiveIn.end() || It->second;
----------------
paschalis-mpeis wrote:

TMU, mapping to a bool provides 3 states:
- no information available (be conservative; dont use)
- clobbers (dont use)
- does not clobber (can use)

Does this add any information or shall we use a set instead?

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


More information about the llvm-commits mailing list