[PATCH] D74030: [DebugInfo] Avoid generating duplicate llvm.dbg.value

Alok Kumar Sharma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 20:22:35 PST 2020


alok marked 2 inline comments as done.
alok added a comment.

In D74030#1869863 <https://reviews.llvm.org/D74030#1869863>, @dstenb wrote:

> Thanks! No further comments from me.
>
> I'll leave a chance for others that are more familiar with this code to have their say though.


Thanks a lot David. Your comments really added a lot of value to fix.



================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1268
+      if (isDbgValueMatching(DVI, I, DIVar, DIExpr, DbgLoc))
         return true;
   }
----------------
aprantl wrote:
> Is checking the first instruction after going to be good enough in the general case? Optimized code often has dozens of dbg.values in a row, all pointing to the same SSA value. (For example C++ code will often have many inlines "this" variables from inlined trivial getters).
Thanks for pointing this out. Even I though this and ignored. Yes it will be better to iterate through next instructions. I shall be updating patch for that. 


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

https://reviews.llvm.org/D74030





More information about the llvm-commits mailing list