<div dir="ltr"><div>Error is:</div>Error: r13 not allowed here -- `sub.w sp,r0,#1032'<div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 7, 2017 at 1:59 PM, ROHIT KUMAR <span dir="ltr"><<a href="mailto:rohitpoddar92@gmail.com" target="_blank">rohitpoddar92@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="gmail-"><span style="font-size:12.8px">This is weird, I ran the build again and this time it showed error at a different location. </span><br><div><span style="font-size:12.8px"><img src="cid:ii_15d1c2a30c7c4fa1" alt="Inline image 1" width="562" height="146"><br></span></div><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">Please Ignore other emails with the same content. As the image size was larger the mailing group was blocking it, so compresses the image and resent it.</span></div></div><div class="gmail-HOEnZb"><div class="gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 7, 2017 at 1:35 PM, Craig Topper <span dir="ltr"><<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">That's not supposed to happen. What was the failure?</div><div><div class="gmail-m_4168856721380901692h5"><br><div class="gmail_quote"><div>On Fri, Jul 7, 2017 at 1:01 AM ROHIT KUMAR <<a href="mailto:rohitpoddar92@gmail.com" target="_blank">rohitpoddar92@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">Yes. With this flag, I got compilation failure.</div></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Jul 7, 2017 1:28 PM, "Craig Topper" <<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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" target="_blank">rohitpoddar92@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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/OptB<wbr>isect.html</a></div><div class="gmail_extra"><br clear="all"><div><div class="gmail-m_4168856721380901692m_-2911189948905506554m_1572267241707718110m_6437527823510492841m_5990599118110423721m_893273722085498026m_-1359702275306797183gmail_signature">~Craig</div></div>
<br><div class="gmail_quote"><div><div class="gmail-m_4168856721380901692m_-2911189948905506554m_1572267241707718110m_6437527823510492841m_5990599118110423721m_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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_4168856721380901692m_-2911189948905506554m_1572267241707718110m_6437527823510492841m_5990599118110423721m_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="gmail-m_4168856721380901692m_-2911189948905506554m_1572267241707718110m_6437527823510492841m_5990599118110423721m_893273722085498026m_-1359702275306797183HOEnZb"><font color="#888888"><span class="gmail-m_4168856721380901692m_-2911189948905506554m_1572267241707718110m_6437527823510492841m_5990599118110423721m_893273722085498026m_-1359702275306797183m_-5461712951921029681HOEnZb"><font color="#888888"><div>Rohit Kumar</div><div><br></div></font></span></font></span></div>
</div><br></div>
<br></div></div>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</blockquote></div></div><div>-- <br></div><div>~Craig</div>
</blockquote></div></div>
</div></blockquote></div></div></div></div><span class="gmail-m_4168856721380901692HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div>~Craig</div>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div>