[PATCH] D147134: [RFC][Debugify] Remove false positve debug location losses

Min-Yih Hsu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 09:58:07 PDT 2023


myhsu added a comment.

I also feel like we should be a little more discreet on adding new Instruction fields. Assuming a debug location is set to (0,0) //if and only if// we intentionally drop a debug location, then `isLocationDropped` can simply be implemented as checking if debugloc is equal to (0,0) rather than adding a new Instruction field. Unfortunately, correct me if I'm wrong, I don't think that's the case. Namely, we need a separate state to represent removing debugloc completely without setting it to (0,0). A potential solution might be pointing debugloc to an unique, special DILocation representing such state when that happens, such that intentionally dropping debugloc is embodied by either (0,0) or that special DILocation. No additional instruction field is needed.


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

https://reviews.llvm.org/D147134



More information about the llvm-commits mailing list