[llvm-dev] How to emit opt report when using LTO

Teresa Johnson via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 18 08:54:34 PDT 2017


Unfortunately,  -Rpass options are not currently passed to the linker
invoked when you do the LTO link. To workaround, pass the internal LLVM
option which are -pass-remarks* (e.g. -pass-remarks=.
-pass-remarks-missed=. etc). How you do this will depend on the linker you
are using. If gold, then when you do the LTO link pass via -plugin-opt:
-Wl,-plugin-opt,-pass-remarks=. for example. If using lld, I believe it
would be -Wl,-mllvm -Wl,-pass-remarks=.  (i.e. each internal LLVM option
needs to be preceeded by an -mllvm on the link link).

Teresa

On Wed, Oct 18, 2017 at 3:57 AM, Denis Bakhvalov via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi,
> I'm using clang frontend.
> I'm interested in some particular hot loop in my code and I emit a
> report from vectorizer optimizations passes.
> I receive nice output if passing -Rpass* flags as long as I'm building
> without LTO?
> But with -flto it just prints nothing.
> Is there a way to emit opt reports when using LTO?
>
> For now I can only approximate about whether my the loop will be
> vectorized. I remove -flto and check opt reports. But as I understand,
> decision about loop vectorization may be changed on LTO stage, so it
> is only an approximation.
>
> --
> Best regards,
> Denis.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>



-- 
Teresa Johnson |  Software Engineer |  tejohnson at google.com |  408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171018/a9402793/attachment.html>


More information about the llvm-dev mailing list