[PATCH] D128806: [RISCV] Fix wrong position of prologue_end

LiqinWeng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 17:30:47 PDT 2022


Miss_Grape added a comment.

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?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128806/new/

https://reviews.llvm.org/D128806



More information about the llvm-commits mailing list