[llvm] [RISCV] Guard CFI emission code with MF.needsFrameMoves() (PR #136060)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 07:44:41 PDT 2025
s-barannikov wrote:
OK suppose we unconditionally emit CFI instructions. Here is something to think about.
We can generate CFI instructions in two different modes: instruction precise and call-site precise. The former provides for better debugging experience (e.g. you can step through a function instruction by instruction and be able to read function arguments / print backtrace, even if the frame hasn't yet been set up). The latter is the minimum required for (DWARF) exception handling.
Instruction precise (a.k.a. asynchronous) tables are significantly larger in terms of object size, so we'd like to avoid generating them until the user explicitly requested it by passing `-g` or whichever option. That would lead us to the same issue, wouldn't it? That is, we would always generate CFI, but not always the same CFI. Any idea how this can be solved? Or this doesn't look like an issue given the current llvm support for asynchronous mode?
https://github.com/llvm/llvm-project/pull/136060
More information about the llvm-commits
mailing list