[PATCH] D72425: [OptRemark] RFC: Introduce a message table for OptRemarks

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 17:10:30 PST 2020


andrew.w.kaylor added a comment.

In D72425#1811118 <https://reviews.llvm.org/D72425#1811118>, @anemet wrote:

> As Francis mentioned it before it would be good derive the pass name from the remark type (diag::remark_gvn_load_elim -> gvn) .  I.e. I would drop the DEBUG_TYPE argument.


This is one of the things that I thought could be a field in the OptRemark class. I think it makes sense to have this kind of property tightly coupled with the message. Francis mentioned a potential problem with keeping that synchronized with where the remarks are emitted, but I think if we think of it in terms of a category of optimization rather than a pass name that isn't a problem, because the nature of the optimization being described won't change even if, for example, you move it from InstCombine to AggressiveInstCombine. Or perhaps I'm introducing a second concept here. There's a bit of a disconnect between compiler developers who want to use this feature and compiler users who want to use the feature. The latter group is probably more interested in being able to say, for example, show me all remarks related to loop optimization rather than show me remarks from the loop rotate pass.

It also occurs to me that we could move the Optimization/Missed/Analysis hierarchy into this table.


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

https://reviews.llvm.org/D72425





More information about the llvm-commits mailing list