[llvm-dev] Replication -O3 optimizations manually

Philip Pfaffe via llvm-dev llvm-dev at lists.llvm.org
Sun Oct 21 03:36:07 PDT 2018


Hi Han,

What is your ultimate goal here?

Cheers,
Philip

On Fri, Oct 19, 2018 at 9:17 PM Han Cui via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi,
>
>
>
> I’m having a very similar question to this thread
> <http://lists.llvm.org/pipermail/llvm-dev/2018-August/125416.html>, about
> replicating the O3 optimization processing manually using opt.
>
>
>
> This is my setup:
>
>
>
> Process A:
>
>    1. clang -O1 -S -emit-llvm main.c -o main.ll
>    2. opt -O3 main.ll -o main-opt1.ll
>    3. clang -O1 main-opt1.ll -o main-opt1
>
>
>
> Process B:
>
>    1. clang -O1 -S -emit-llvm main.c -o main.ll
>
> 2.  opt [opt flags given by command ‘opt -O3 -disable-output -debug-pass=Arguments main.ll’] main.ll -o main-opt2.ll
>
>
>    1. clang -O1 main-opt2.ll -o main-opt2
>
>
>
> I tried this with a set of programs and I noticed the execution time of
> main-opt2 is often much slower than main-opt1. While ‘main.ll’ is the same,
> ‘main-opt1.ll’ is different to ‘main-opt2.ll’. May I get some suggestions
> what I should put for opt (to replace the command in the brackets), so that
> the two process would have identical effects? Any help would be much
> appreciated.
>
>
>
> Thanks,
>
> Han
>
>
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://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/20181021/c78af4d8/attachment.html>


More information about the llvm-dev mailing list