[PATCH] D64500: [DebugInfo] Remove call sites when eliminating unreachable blocks

Nikola Prica via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 04:32:02 PDT 2019


NikolaPrica accepted this revision.
NikolaPrica added a comment.

>> The reason why I think it's hard to see that call site information has been removed is that, as far as I can tell there is no way to print the function attributes when doing something like `-print-{before,after}-all`, so it can be hard to to see where in the pass pipeline the `callSites` information was dropped. You could of course analyze the MIR and see where the information is likely to have been dropped, but I guess that can be difficult/annoying for larger programs.
> 
> Oh, I thought r364506 (D61061 <https://reviews.llvm.org/D61061>) implemented MIR printer support for call site metadata. If not, it's probably worth adding.

This dumps the `CallSitesInfo` when we producing a ".mir" file. The `CallSitesInfo` describes an internal state of the `MF` like the  `fixedStack`, `frameInfo` etc. I'm not sure how we could make it recognizable in `-print-{before,after}-all`. Maybe like some metadata extension of call instruction. However, it should be part of another patch.

In D64500#1582335 <https://reviews.llvm.org/D64500#1582335>, @dstenb wrote:

> However, perhaps there are no cases where we erase a block, and at the same would want to redirect call site information for calls inside that block so that it points to (newly created?) calls in other blocks. My concerns may be unfounded, and it should be fine to silently drop the call site information when erasing the block. I'm not sure though.


We share your concerns. We were not sure either. That's why we requested one more reconsideration after the patch was already accepted at D61062 <https://reviews.llvm.org/D61062> and perhaps for the reasons you mentioned it is decided to go with assertion & addressing the missing parts.

Thanks for contribution!


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64500





More information about the llvm-commits mailing list