[PATCH] D69970: [CGDebugInfo] Emit subprograms for decls when AT_tail_call is understood (reland with fixes)

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 14 10:52:35 PST 2019


vsk added a comment.

In D69970#1746103 <https://reviews.llvm.org/D69970#1746103>, @dblaikie wrote:

> In D69970#1745038 <https://reviews.llvm.org/D69970#1745038>, @vsk wrote:
>
> > Don't emit declaration subprograms for functions with reserved names. There may not be much benefit from referencing these functions from call site tags (e.g. instead of relying on call site info to work out the arguments passed to __asan_memcpy, the asan runtime could log those arguments instead).
> >
> > This fixes a verifier failure:
> >
> >   inlinable function call in a function with debug info must have a !dbg location
> >     %134 = call i8* @__asan_memcpy(i8* %agg.tmp2.sroa.0.0..sroa_cast10.i, i8* %agg.tmp.sroa.0.i.0..sroa_cast, i64 32)
> >
> >
> > @aprantl / @djtodoro, mind taking another look?
>
>
> (my very vague take on this, admittedly having not followed this work in detail, is that this sounds pretty heuristical & not like it's a principled/general solution? But I don't really know much about all this & will leave actual approvals/disapprovals to the other folks who've been reviewing this stuff (& admittedly, as the person who introduced the "inlinable call with no debug location in debug-having function" assertion/failure, it is a bit contextual as to whether a certain call is inlinable, etc))


*nod*, yeah I agree, but haven't come up with a better alternative. One option I considered was to play whac-a-mole and just teach ExpandICmps/ASan/others to emit builtin calls with line 0 locations attached. But I'm not sure that the extra line 0 locations would really help (maybe they'd actually get in the way of some reasonable location fallthrough), so the cleaner option seemed to be to not emit the declaration subprograms in the first place.


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

https://reviews.llvm.org/D69970





More information about the cfe-commits mailing list