[llvm] [RISCV] Separate doLocalPostpass into new pass and move to post vector regalloc (PR #88295)

Piyou Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 21:52:49 PDT 2024


BeMg wrote:

Dbg value will be emited during the register allocation pass, if we insert the other pass between register allocation stage.

The LiveDebugVariables will raise the assertion when destructor without emit Dbg value.
```
void {anonymous}::LDVImpl::clear(): Assertion `(!ModifiedMF || EmitDone) && "Dbg values are not emitted in LDV"' failed.
```

For example: 

```
llc ./llvm-project/llvm/test/DebugInfo/fixed-point.ll -mtriple=riscv64 -o -
```

with this patch.

A workaround is `addPreserved<LiveDebugVariables>`, and it was also https://github.com/llvm/llvm-project/pull/70549 did. However, to make LiveDebugVariables visible outside of lib/codegen, LLVM needs to ensure its visibility.

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


More information about the llvm-commits mailing list