[PATCH] D83468: [Debuginfo] Fix for PR46653

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 09:56:40 PDT 2020


aprantl added a comment.

If the problem that you want to solve is that the prologue ends at line 0, 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
- forcing a valid line number (perhaps the DSISubprogram's scope line) if the prologue end ends up falling on line 0.

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