This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Remove debug location to spill/reload instructions
ClosedPublic

Authored by Miss_Grape on Jul 6 2022, 12:46 AM.

Diff Detail

Event Timeline

Miss_Grape created this revision.Jul 6 2022, 12:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2022, 12:46 AM
Miss_Grape requested review of this revision.Jul 6 2022, 12:46 AM

Curious why remove that? for saving code size or it's inaccurate?

Curious why remove that? for saving code size or it's inaccurate?

Hmm, I think this patch is almost the same as D128806.

Curious why remove that? for saving code size or it's inaccurate?

Hmm, I think this patch is almost the same as D128806.

Yes~

I would suggest add more info into summary for this revision.

Miss_Grape abandoned this revision.Jul 6 2022, 8:38 PM

I would suggest add more info into summary for this revision.

Move to D128806.

Miss_Grape reclaimed this revision.Apr 11 2023, 5:41 PM
Miss_Grape edited the summary of this revision. (Show Details)Apr 11 2023, 5:46 PM

My suggestion,

  1. 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
  1. add some tests as you did in your another review request.

My suggestion,

  1. 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
  1. add some tests as you did in your another review request.

Just remove the debugging information in the prologue of the function, neednt to add test cases

benshi001 accepted this revision.Apr 13 2023, 7:01 PM

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
This revision is now accepted and ready to land.Apr 13 2023, 7:01 PM
kito-cheng accepted this revision.Apr 13 2023, 7:11 PM

LGTM, but please use @benshi001's suggestion in your git commit log

asb accepted this revision.Apr 17 2023, 10:01 PM

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.

This revision was landed with ongoing or failed builds.Sep 9 2023, 1:58 AM
This revision was automatically updated to reflect the committed changes.
evandro removed a subscriber: evandro.Sep 12 2023, 5:39 PM