[PATCH] D128806: [RISCV] Fix wrong position of prologue_end
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 4 10:01:13 PDT 2022
StephenFan added a comment.
In D128806#3623931 <https://reviews.llvm.org/D128806#3623931>, @Miss_Grape wrote:
> In D128806#3622380 <https://reviews.llvm.org/D128806#3622380>, @StephenFan wrote:
>
>> I think removing debug location is problematic. Because `storeRegToStackSlot` method is used in many places, for example, register spillers use it to spill a register to stack frame. If the spill instruction's debug location info were removed, its debug location would follow the previous instruction's location when emitting debug location info. It is ok to do that in -O0, but if the optimization level were -O2, instructions would be hoisted or sink which would cause the spill instruction to have wrong debug location info.
>
> I think the user should not care about the debugging information in this scenario. So I removed the debug-location. I am curious, under what circumstances would users care about the debug information of the register spill instruction? What may be the problem, you need to locate the debug information of the register spill instruction?
I was wrong. According to https://reviews.llvm.org/D52125, instructions artificially generated by the compiler should not attach any debug locations.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128806/new/
https://reviews.llvm.org/D128806
More information about the llvm-commits
mailing list