[llvm] [RISCV] Guard CFI emission code with MF.needsFrameMoves() (PR #136060)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 00:53:37 PDT 2025
s-barannikov wrote:
Rebased
> I did wonder if we should push the conditions into `CFIBuilder::insertCFIInst` but I don't think that's necessarily reasonable. It would be good if we didn't have to always remember the `if (NeedsDwarfCFI)` stuff inline.
I think the absence of CFI directives can be asserted in AsmPrinter, but I will need to make similar changes to other backends first.
> I think the codegen is close enough right now that it's not an issue, but I would like the differences to be fixed.
It would be great, but I don't immediately know how to fix them. Moving PEI after Post-RA scheduler could be a solution, but it will probably cause a lot of code churn and may not resolve all issues. (I wonder how/if gcc manages to generate the same code with/without debug info?)
https://github.com/llvm/llvm-project/pull/136060
More information about the llvm-commits
mailing list