[llvm-dev] How to emit opt report when using LTO
Denis Bakhvalov via llvm-dev
llvm-dev at lists.llvm.org
Thu Oct 19 01:05:33 PDT 2017
Hello Teresa,
Thank you very much!
It works for me with gold linker!
On 18/10/2017, Teresa Johnson <tejohnson at google.com> wrote:
> 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
>
--
Best regards,
Denis.
More information about the llvm-dev
mailing list