[llvm] [DRAFT] Changing register initial status as undefined (PR #209032)

AmirHossein PashaeeHir via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 19:07:03 PDT 2026


================
@@ -91,11 +91,9 @@ DWARFCFIAnalysis::DWARFCFIAnalysis(MCContext *Context, MCInstrInfo const &MCII,
       continue;
 
     DWARFRegNum Reg = MCRI->getDwarfRegNum(LLVMReg, IsEH);
-    // TODO: this should be `undefined` instead of `same_value`, but because
-    // initial frame state doesn't have any directives about callee saved
-    // registers, every register is tracked. After initial frame state is
-    // corrected, this should be changed.
-    State.update(MCCFIInstruction::createSameValue(nullptr, Reg));
+    // This should be undefined by default, letting user write inside prologue
+    // if they want same_value assumption
----------------
amsen20 wrote:

```suggestion
    // Based on dwarf documentation, the default rule for all columns before interpretation of the initial instructions is the undefined rule.
    // For now, this tool depends on the user to write a prologue that establishes the rules required for proper validation of the rest of the function.
```

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


More information about the llvm-commits mailing list