<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Your use of "-O0" here is causing the problem. In newer versions
of clang, passing "-O0" to the compiler attaches the "optnone"
attribute to each function, to avoid optimization during LTO. You
can use "-O2 -Xclang -disable-llvm-passes" to dump IR intended for
optimization, but without running any optimization passes.</p>
<p>-Eli<br>
</p>
<div class="moz-cite-prefix">On 1/15/2019 8:14 PM, hameeza ahmed via
llvm-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFMPKeZ9w-FVh_JNGZbypiSJtOB5StL+3raGj4GGkd6n0Q9MNw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Thank You..</div>
<div>I used following command to generate .bc or .ll</div>
<div><br>
</div>
<div>/Documents/clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang
-O0 -emit-llvm -S -o vec4.ll vecsum.c</div>
<div>/Documents/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang
-O0 -emit-llvm -S -o vec7.ll vecsum.c<br>
</div>
<div><br>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, Jan 16, 2019 at 6:49 AM Sanjoy Das <<a
href="mailto:sanjoy@playingwithpointers.com"
moz-do-not-send="true">sanjoy@playingwithpointers.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">It
is hard to tell what's going on from the information you have<br>
provided. How are you generating vec.bc? This could either
be a<br>
regression in scalar evolution or a change in some
optimization pass<br>
that is resulting in a different vec.bc.<br>
<br>
-- Sanjoy<br>
<br>
On Tue, Jan 15, 2019 at 1:42 PM hameeza ahmed via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank"
moz-do-not-send="true">llvm-dev@lists.llvm.org</a>>
wrote:<br>
><br>
> Hello,<br>
><br>
> I am trying to use scalar evolution pass using following
command;<br>
><br>
> opt -analyze -mem2reg -indvars -loop-simplify
-scalar-evolution < vec.bc<br>
> when vec.bc is generated using newer version of LLVM i.e
LLVM 6 and 7 i get following message in the end;<br>
> Determining loop execution counts for: @main<br>
> Loop %8: Unpredictable backedge-taken count.<br>
> Loop %8: Unpredictable max backedge-taken count.<br>
> Loop %8: Unpredictable predicated backedge-taken count.<br>
> which means it is unable to compute iteration count.<br>
><br>
> However, when .bc file is generated using LLVM 4.0 i am
getting following;<br>
><br>
> Determining loop execution counts for: @main<br>
> Loop %4: backedge-taken count is 512<br>
> Loop %4: max backedge-taken count is 512<br>
> Loop %4: Predicated backedge-taken count is 512<br>
> Predicates:<br>
><br>
> Loop %4: Trip multiple is 513<br>
><br>
> means correct computation of loop count...<br>
> Why is that happening with newer version of LLVM?<br>
><br>
> Please help.<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank"
moz-do-not-send="true">llvm-dev@lists.llvm.org</a><br>
> <a
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
</body>
</html>