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

luxufan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 07:30:00 PDT 2022


StephenFan added a comment.

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.


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

https://reviews.llvm.org/D128806



More information about the llvm-commits mailing list