[PATCH] D82213: [Remarks] Add callsite locations to inline remarks
Wenlei He via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 24 09:09:31 PDT 2020
wenlei added a comment.
In D82213#2110941 <https://reviews.llvm.org/D82213#2110941>, @fhahn wrote:
> That's interesting. We are also using something similar for the matrix lowering remarks [1]: we traverse the inlining chain bottom up and emit a remark at each step which contains the expression available at that level. I think those approaches could be useful in general to surface remarks at the right level and it might be worth moving them somewhere so they can be shared. What do you think?
>
> [1] https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp#L1783
That's indeed similar, though it seems like what you're doing is more than just showing the full inline stack as location. Agreed that if we start to do these in more places for optimization remarks, it'd make sense to build it into remarks infra. But we may not always want full inline stack names as location (considering deep inlining with long template instantiation names that can "pollute" the remark messages), so I'm guessing what we could do is move that into remarks infra, but still use a separate switch to control whether we show inline locations (just like how `-fdiagnostics-show-hotness` controls whether we show hotness for remarks)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82213/new/
https://reviews.llvm.org/D82213
More information about the cfe-commits
mailing list