[llvm] [CFIInserter] Improve `CSRSavedLocation` struct. (PR #168869)

Mikhail Gudim via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 10 08:52:00 PST 2025


================
@@ -266,12 +319,16 @@ void CFIInstrInserter::calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo) {
       case MCCFIInstruction::OpValOffset:
         break;
       }
-      if (CSRReg || CSROffset) {
+      CSRSavedLocation CSRLoc;
+      if (CSRReg)
+        CSRLoc = CSRSavedLocation::createRegister(*CSRReg);
+      if (CSROffset)
----------------
mgudim wrote:

> Maybe move these two if bodies to the switch above?

@s-barannikov I'd rather leave it here to minimize diff.

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


More information about the llvm-commits mailing list