[PATCH] D83468: [Debuginfo] Fix for PR46653

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 10:07:52 PDT 2020


dblaikie added a comment.

In D83468#2221792 <https://reviews.llvm.org/D83468#2221792>, @aprantl wrote:

> If the problem that you want to solve is that the prologue ends at line 0,

It'd be good to understand more about why/where that's a problem. What kind of problems it causes and for which DWARF consumers.

> then massaging earlier passes until the right result happens to come up in one testcase is not going to be very effective. Yes, it may fix the testcase, but that won't last long, and the patch is introducing questionable behavior that will end up causing other problems.
>
> Instead I would recommend looking at the code that decides on were the prologue ends, and either
>
> - sliding the prologue forward to the first non-zero debug location

I'd worry about this skipping over valid debug locations, maybe making parameters that are valid just-after the prologue (as it stands today) not valid (because we push the prologue down past clobbers of those parameters).

> - forcing a valid line number (perhaps the DSISubprogram's scope line) if the prologue end ends up falling on line 0.

This seems fairly plausible to me, but again - would be good to better understand the user-visible/original problem too.

> Both of these options are also going to be somewhat risky, but I'd have a better feeling about adding a well-documented heuristic at the place where the problem happens rather than a couple of passes before. If anyone has a better idea, I'm also open to discussing that.




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

https://reviews.llvm.org/D83468



More information about the llvm-commits mailing list