[PATCH] D61600: [DebugInfo] More precise variable range for stack locations

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 10:06:47 PDT 2019


jmorse added a comment.

Nikola mentioned in D61890 <https://reviews.llvm.org/D61890> that the changes to fission-ranges.ll result in reduced variable location ranges, which is unfortunate. IMO, eyeballing the test, I think the input IR we have at the moment is wrong, and it was only the bug that this patch fixes that caused us to get the output right.

In fission-ranges.ll the dbg.value for !18 / the "e" variable, has a !DILocation !39, which corresonds to the lexical block where 'b' is iterated over. This causes LiveDebugValues to not propagate the variable location out of the block modifying "e", because it believes "e" isn't valid outside of that lexical block. In the source code at the top of the file though we can see that "e" has a function-wide scope. Thus the IR in the test is wrong, the dbg.value should have a different DILocation! We only covered the whole function before because DbgEntityHistoryCalculator was extending variable locations too far.

We should check whether clang still generates this faulty IR, but I've run out of time for today.


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

https://reviews.llvm.org/D61600





More information about the llvm-commits mailing list