<div dir="auto">You got a compilation failure not a runtime failure?</div><div><br><div class="gmail_quote"><div>On Fri, Jul 7, 2017 at 12:19 AM ROHIT KUMAR <<a href="mailto:rohitpoddar92@gmail.com">rohitpoddar92@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Thanks, Craig. </div><div><br></div><div>So with this argument, the build failed on compilation with the last log as</div><div><br></div><b>"BISECT: NOT running pass (60626) optimize barriers pass on function ... "</b><br><div><br></div><div>It points to a function in a class where we also had a high suspicion for. So it makes sense. </div><div><br></div><div>So it is very likely that the way our code is written is not meeting the standards used by clang and one or other optimization is breaking it.</div><div><br></div><div>Do you have any idea which flag is doing this "optimize barriers pass on function" which we can ignore? </div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 7, 2017 at 11:55 AM, Craig Topper <span><<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>You can use -mllvm -opt-bisect-limit=<limit> to bisect where the error occurs. More documentation here <a href="http://llvm.org/docs/OptBisect.html" target="_blank">http://llvm.org/docs/OptBisect.html</a></div><div class="gmail_extra"><br clear="all"><div><div class="m_893273722085498026m_-1359702275306797183gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<br><div class="gmail_quote"><div><div class="m_893273722085498026h5">On Thu, Jul 6, 2017 at 11:18 PM, ROHIT KUMAR via cfe-dev <span><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_893273722085498026h5"><div><div class="gmail_quote"><div>Hey, <div><br></div><div>Context: Android native code built with clang using Android Studio.</div><div><br></div><div>We have been using GCC(Eclipse) for quite a while, now we are trying to move our huge code base to clang (to AndroidStudio). </div><div><br></div><div>With GCC we were using -O3 optimization and everything was working fine, but with clang, even -O1 is causing Android apps to crash on runtime with the seg fault. </div><div><br></div><div>Since apps are working fine when compiled with -O0, so my guess is some kind of optimization is not supported for our code base which is/are introduced by O1/2/3 flags.</div><div><br></div><div>Is there a way I can disable the flags introduced by -O1 one-by-one to figure out the culprit flag(s)?</div><div><br></div><div>Can anyone suggest me such flags to disable optimizations one-by-one? I tried googling but could not find much help.</div><div><br></div><div>I am stuck on this issue for quite a while now. I would really appreciate the help. I am looking for a more general advice on flags to disable optimizations one-by-one with -O1, because making changes in the code base would not be possible. </div><div><br></div><div>Thanks. </div><span class="m_893273722085498026m_-1359702275306797183HOEnZb"><font color="#888888"><span class="m_893273722085498026m_-1359702275306797183m_-5461712951921029681HOEnZb"><font color="#888888"><div>Rohit Kumar</div><div><br></div></font></span></font></span></div>
</div><br></div>
<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</blockquote></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature">~Craig</div>