[PATCH] D64033: Add column info for inline sites

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 20:14:05 PDT 2019


dblaikie added a comment.

In D64033#1586885 <https://reviews.llvm.org/D64033#1586885>, @wenlei wrote:

> In D64033#1586625 <https://reviews.llvm.org/D64033#1586625>, @dblaikie wrote:
>
> > What's the motivation for this?
>
>
> We need to differentiate inline sites on the same line for an internal (basically the tool needs to annotate each instruction with stack of inline site locations). And the missing column info for inline sites gets in the way. I thought the change will be helpful to others as well..


For what it's worth, this still won't disambiguate all inline calls (LLVM used to try to use this technique to disambiguate instructions from two different inlined calls & it would fail sometimes even after we forced column info on to help), in this sort of situation:

  #define FOO x(); x()
  void x();
  int main() {
    FOO;
  }

Both calls to 'x' will be attributed to the location of the FOO usage, line 4 column 3.

> 
> 
>> Should it be conditional on "-gcolumn-info"? (or skipping it in general if the column is zero? that'd make "-gno-column-info" fall out naturally)
>>  (we don't put decl_column on subprogram DIEs, for instance - admittedly, it's more likely the same function could have multiple inline call sites on the same line than you'd have multiple functions defined on the same line)
> 
> Good point. Thanks David. I will send a separate patch to skip zero column so we won't have column when "-gno-column-info" is used.

Cool cool - thanks!


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64033





More information about the llvm-commits mailing list