I want to know all the optimization applied by the passes. I found two options in clang 1. -fsave-optimization-record 2. -Rpass-analysis=... However, they have nothing to do with the interaction btw IR files(.ll) Is there any tool that records all optimizations on IR file? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191127/267cc190/attachment.html>
Hi,> On Nov 27, 2019, at 07:16, Sooyeon Lee via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I want to know all the optimization applied by the passes. > > I found two options in clang > 1. -fsave-optimization-record 2. -Rpass-analysis=... > > However, they have nothing to do with the interaction btw IR files(.ll) > Is there any tool that records all optimizations on IR file?Are you looking for a way to save all optimization remarks/records when using ‘opt’? I think passing `-pass-remarks-output=foo.yaml` should do the trick and create a YAML file with the optimization remarks. There also are additional flags to selectively print remarks: * -pass-remarks=‘pass-name’ …. Print optimization remarks for pass-name * -pass-remarks-missed=‘pass-name’ …. Print missed optimization remarks for pass-name * -pass-remarks-analysis=‘pass-name’ …. Print analysis optimization remarks for pass-name pass-name can also be a regular expression for the above. Cheers, Florian
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. Best regards, Sooyeon 2019년 11월 27일 (수) 오후 6:01, Florian Hahn <florian_hahn at apple.com>님이 작성:> Hi, > > > On Nov 27, 2019, at 07:16, Sooyeon Lee via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > > I want to know all the optimization applied by the passes. > > > > I found two options in clang > > 1. -fsave-optimization-record 2. -Rpass-analysis=... > > > > However, they have nothing to do with the interaction btw IR files(.ll) > > Is there any tool that records all optimizations on IR file? > > > Are you looking for a way to save all optimization remarks/records when > using ‘opt’? I think passing `-pass-remarks-output=foo.yaml` should do the > trick and create a YAML file with the optimization remarks. > > There also are additional flags to selectively print remarks: > > * -pass-remarks=‘pass-name’ …. Print optimization remarks for pass-name > * -pass-remarks-missed=‘pass-name’ …. Print missed optimization remarks > for pass-name > * -pass-remarks-analysis=‘pass-name’ …. Print analysis optimization > remarks for pass-name > > pass-name can also be a regular expression for the above. > > Cheers, > Florian-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191128/3d6d4a71/attachment.html>
Reasonably Related Threads
- Questions on ifconversion and predication
- How to get optimization remarks while testing with lnt in llvm
- Alias analysis only throwing mayAlias for something that seems should be identifiable as mustAlias
- [RFC] Optimization Remark for derived function / argument attributes
- Finding which optimization passes have failed