The implementation of this patch is reference https://reviews.llvm.org/D52125
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
My suggestion,
- improve your commit info, something like
Spill/reload instructions are artificially generated by the compiler and have no relation to the original source code. So the best thing to do is not attach any debug location to them (instead of just taking the next debug location we find on following instructions). Refered to https://reviews.llvm.org/rG3e081703c349dd00b8ef6991c2d15964915dd8f4
- add some tests as you did in your another review request.
Comment Actions
Just remove the debugging information in the prologue of the function, neednt to add test cases
Comment Actions
I have referred to X86 and AArch64, they both use empty debug location information for spill/load instructions. I think it is OK for RISCV. But it would be better to improve your commit information as follow:
Spill/reload instructions are artificially generated by the compiler and have no relation to the original source code. So the best thing to do is not attach any debug location to them (instead of just taking the next debug location we find on following instructions). Refered to https://reviews.llvm.org/rG3e081703c349dd00b8ef6991c2d15964915dd8f4
Comment Actions
LGTM, but please use a clear commit message as suggested by @benshi001. It also feels like this must be testable either with an MIR test or with llvm-dwarfdump.