[llvm-dev] question about mem2reg

Linhai Song via llvm-dev llvm-dev at lists.llvm.org
Sun Oct 15 16:28:16 PDT 2017


Thanks a lot!


This solved my problem.


Best,


               Linhai

________________________________
From: Heejin Ahn <aheejin at gmail.com>
Sent: Sunday, October 15, 2017 5:22:38 AM
To: Linhai Song; llvm-dev at lists.llvm.org
Subject: Re: [llvm-dev] question about mem2reg

Hello Linhai,

When compiled with -O0, clang 5.0 started to add optnone attribute to each function, which prevents further optimizations afterwards including mem2reg pass. To prevent that, add "-Xclang -disable-O0-optnone" to clang command line arguments.

Thank you,
Heejin

On Sat, Oct 14, 2017 at 8:59 PM Linhai Song via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:

Hello,


I just upgraded my llvm to 5.0.0. I applied mem2reg pass as follows:


opt -mem2reg m2rtttl.bc > m2rtttl.opt


But after that, I compared m2rtttl.bc and m2rtttl.opt. I noticed that there are no difference between m2rtttl.bc and m2rtttl.opt. Did I apply llvm in the correct way?


Thanks a lot for the help!


Best,


                           Linhai

_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto: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/20171015/183e3e27/attachment.html>


More information about the llvm-dev mailing list