Is there any way to find if a optimization pass has passed in opt? In clang -fsave-optimzization-record would tell if particular optimization pass has applied or failed. Is there similar functionality in opt? Regards, Nethish. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200407/43f54dec/attachment.html>
Hi Nethish, I recently learned about -print-after-all. This will print the IR after each pass. This is not exactly what you want but in the meantime it may help. Best, Stefanos Στις Πέμ, 9 Απρ 2020 στις 4:22 π.μ., ο/η nethish via llvm-dev < llvm-dev at lists.llvm.org> έγραψε:> Is there any way to find if a optimization pass has passed in opt? > In clang -fsave-optimzization-record would tell if particular > optimization pass has applied or failed. > Is there similar functionality in opt? > > Regards, > Nethish. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200409/d788e102/attachment.html>
The following might be also helpful: -debug-pass=Structure -debug-pass=Executions -Andrzej On 09/04/2020 00:04, Stefanos Baziotis via llvm-dev wrote:> Hi Nethish, > > I recently learned about -print-after-all. This will print the IR after > each pass. This is not exactly what you want but in the meantime it may > help. > > Best, > Stefanos > > Στις Πέμ, 9 Απρ 2020 στις 4:22 π.μ., ο/η nethish via llvm-dev > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> έγραψε: > > Is there any way to find if a optimization pass has passed in opt? > In clang -fsave-optimzization-record would tell if particular > optimization pass has applied or failed. > Is there similar functionality in opt? > > Regards, > Nethish. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Hi, For opt and llc you can use: --pass-remarks-filter=<regex> - Only record optimization remarks from passes whose names match the given regular expression --pass-remarks-format=<format> - The format used for serializing remarks (default: YAML) --pass-remarks-output=<filename> - Output filename for pass remarks Cheers, — Francis> On Apr 8, 2020, at 4:04 PM, Stefanos Baziotis via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi Nethish, > > I recently learned about -print-after-all. This will print the IR after each pass. This is not exactly what you want but in the meantime it may help. > > Best, > Stefanos > > Στις Πέμ, 9 Απρ 2020 στις 4:22 π.μ., ο/η nethish via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> έγραψε: > Is there any way to find if a optimization pass has passed in opt? > In clang -fsave-optimzization-record would tell if particular optimization pass has applied or failed. > Is there similar functionality in opt? > > Regards, > Nethish. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200410/43351b3f/attachment-0001.html>