<div dir="ltr">Could you please clarify for me: was the elimination of this pass also due to some performance issues? So, if I will insert this pass now and perform modification of the graph, will be there any performance impact?<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-08-09 14:28 GMT+02:00 Tobias Grosser <span dir="ltr"><<a href="mailto:tobias.grosser@inf.ethz.ch" target="_blank">tobias.grosser@inf.ethz.ch</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This support was removed years ago from indvars. We don't need canonical<br>
induction variables any more as all analysis are done on SCEVs. The SCEV<br>
generator can transform them even without the need for explicit<br>
canonical induction variables.<br>
<br>
Best,<br>
Tobias<br>
<br>
On Wed, Aug 9, 2017, at 14:23, Anastasiya Ruzhanskaya via llvm-dev<br>
wrote:<br>
<div><div class="h5">> The files of this strange pass are described here<br>
> <a href="http://reviews.legup.org/rLEGUP54ca7c2bb15d84116baf47bce67256d3803720d9" rel="noreferrer" target="_blank">http://reviews.legup.org/<wbr>rLEGUP54ca7c2bb15d84116baf47bc<wbr>e67256d3803720d9</a><br>
> .<br>
> I wonderwhy the most uptodate -indvars pass can't do the same.<br>
><br>
> 2017-08-09 14:18 GMT+02:00 Anastasiya Ruzhanskaya <<br>
> <a href="mailto:anastasiya.ruzhanskaya@frtk.ru">anastasiya.ruzhanskaya@frtk.ru</a><wbr>>:<br>
><br>
> > Hello,<br>
> > I have this piece of code:<br>
> > int main() {<br>
> > int m = 0;<br>
> > // int i, j, k;<br>
> > // int N = f()%10;<br>
> > for (int l = 0; l < 1000; l+=4)<br>
> > printf("%d", l);<br>
> ><br>
> > I am sure, that llvm is capable to convert this into canonical induction<br>
> > variable, but even with O3<br>
> > define i32 @main() #0 {<br>
> > br label %2<br>
> ><br>
> > ; <label>:1 ; preds = %2<br>
> > ret i32 0<br>
> ><br>
> > ; <label>:2 ; preds = %0, %2<br>
> > %l.01 = phi i32 [ 0, %0 ], [ %4, %2 ]<br>
> > %3 = tail call i32 (i8*, ...) @printf(i8* nonnull getelementptr inbounds<br>
> > ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %l.01)<br>
> > %4 = add nuw nsw i32 %l.01, 4<br>
> > %5 = icmp slt i32 %4, 1000<br>
> > br i1 %5, label %2, label %1<br>
> > }<br>
> ><br>
> > I have this assembler.<br>
> > I know there is indvars2 pass ( it is under llvm license but used only in<br>
> > LegUp project - as I understood, surfing the Internet), which is good in<br>
> > changing induction variables.<br>
> ><br>
> > How can I achieve that this cycle will have a canonical indvar?<br>
> ><br>
</div></div>> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>