[llvm-dev] Optimization Record
Florian Hahn via llvm-dev
llvm-dev at lists.llvm.org
Thu Nov 28 01:30:37 PST 2019
> On Nov 28, 2019, at 05:30, Sooyeon Lee <sylys0103 at gmail.com> wrote:
> Thank you.
> It seems that -pass-remarks records the behavior of some passes. gvn, licm, etc.
> How can I detect the basic blocks that are modified when one pass is applied?
> I want to avoid adding some methods to all transform passes.
I don’t think this is possible at the moment. IIRC the current implementation of optimization remarks uses debug locations do display the source location of a remark.
It might make sense to add support for using the basic block/instruction in the IR as location when emitting remarks from opt directly without debug locations. It should not be too hard to add, in case you are interested in looking into implementing such a feature!
More information about the llvm-dev