<div dir="ltr">Hi <span style="font-size:12.8px;white-space:nowrap">Siddharth,</span><div><span style="font-size:12.8px;white-space:nowrap"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap">As far as moving optimization out of instcombine to instsimplify pass is concerned, i had done this exercise some time back.</span></div><div><span style="font-size:12.8px;white-space:nowrap"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap">If you look at the 'visit*' functions in the instcombine pass, there is always a call to 'simplify*' functions which returns 'Value*'.</span></div><div><span style="font-size:12.8px;white-space:nowrap">It is then used to replace instruction with Value -> </span><span style="color:rgb(0,0,0);white-space:pre-wrap">replaceInstUsesWith(I, V) and return back; if simplify returns any Value. If 'simplify*' call</span><span style="color:rgb(0,0,0)"></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">returns a NULL value, further processing of combining instructions take place. </span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">There were instances though, that in this further processing, instructions combination results in a Value instead of a new Instruction.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Such instances could have been handled earlier in 'simplify*' call itself. Please look for such instances and try to move them to instsimplify </span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">as a start point in this exercise (Not sure if still such instances exist, please search for them).</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Instcombine and Instsimplify are good start point to understand LLVM compiler framework. </span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Regards,</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Suyog Sarda</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 25, 2016 at 11:41 AM, Siddharth Mahendraker via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
My name is Siddharth. I’m a student studying math and computer science at the University of Toronto.<br>
<br>
I’m interested in learning more about the LLVM compiler through GSoC. I have no prior experience with LLVM, but I have a strong interest in compilers, and I look forward to learning more.<br>
<br>
I would like to pursue one of two potential projects: rewriting bugpoint, and moving optimizations out of the -instacombine pass and into InstructionSimplify.<br>
<br>
Is anyone currently working on implementing these? Are these projects suitable for a beginner? Any guidance is much appreciated.<br>
<br>
Regards,<br>
<br>
Siddharth<br>
_______________________________________________<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/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>