<div dir="ltr"><p style="margin:0px;font-size:16px;line-height:normal;font-family:Times">Hello LLVM Community,</p>
<p style="margin:0px;font-size:16px;line-height:normal;font-family:Times;min-height:19px"><br></p>
<p style="margin:0px;font-size:16px;line-height:normal;font-family:Times">I am interested doing following project with LLVM for GSoC 2016.</p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:Helvetica;min-height:14px"><br></p>
<p style="margin:0px;font-size:16px;line-height:normal;font-family:Times">Code Generation Improvements:</p>
<p style="margin:0px;font-size:16px;line-height:normal;font-family:Times;min-height:19px"><br></p>
<p style="margin:0px;font-size:16px;line-height:normal;font-family:Times">Particularly<span style="font-size:12px;line-height:normal;font-family:Helvetica"> </span>Generalize target-specific backend passes that could be target-independent</p>
<p style="margin:0px;font-size:16px;line-height:normal;font-family:Times">I have done some initial study and try to understand the task to be done. Please help me to develop the proposal.</p>
<p style="margin:0px;font-size:16px;line-height:normal;font-family:Times">Following are my initial findings :</p><p style="margin:0px;font-size:16px;line-height:normal;font-family:Times"><br></p>
<span style="font-family:Times;font-size:16px">1. lib/Target/Hexagon/RDF* :</span><br><span class="" style="font-family:Times;font-size:16px;white-space:pre">    </span><span style="font-family:Times;font-size:16px">Code for these pass is mostly target independent so to generalize them code needs to be wrap in MachineFunction pass and then use it as required.</span><span style="font-family:Times;font-size:16px"> </span><br><span class="" style="font-family:Times;font-size:16px;white-space:pre">    </span><span style="font-family:Times;font-size:16px">And if already not done , Merge Set of SSA based CFG can be computed at time of SSA generation. This can improve performance of Ramakrishna’s algorithm.</span><div><font face="Times" size="3"><br></font><span style="font-family:Times;font-size:16px"> </span><span style="font-family:Times;font-size:16px">2. lib/Target/AArch64/AArch64AddressTypePromotion.cpp</span><br><span style="font-family:Times;font-size:16px">As far as I understand this pass promotes sign exertion for 32 bit integer ( address) and performs calculation on 64 bit number thus processes need not switch execution mode to 32 bit.</span><span style="font-family:Times;font-size:16px"> </span><br><span class="" style="font-family:Times;font-size:16px;white-space:pre">      </span><span style="font-family:Times;font-size:16px">Some other platforms such as MIPS, NVPTX, Sparc can be benefited by such optimization because MIPS64 supports MIPS32 bit instruction and it requires mode switch indicated by control register.</span><span style="font-family:Times;font-size:16px">  </span><span style="font-family:Times;font-size:16px">For PTX size of pointers depends on the host machine so there might be similar situation.</span><br><span style="font-family:Times;font-size:16px">But architectures like Power PC need not such optimization as 64 bit instruction operating in 32 bit mode passes only lower 32 bits.</span><br><font face="Times" size="3"><br></font><span style="font-family:Times;font-size:16px">3. lib/Target/AArch64/AArch64PromoteConstant.cpp</span><span style="font-family:Times;font-size:16px"> </span><br><span style="font-family:Times;font-size:16px">This pass tries to simplify aggregate data like struct of const with special SIMD instructions available on the system. For example on ARM its NEON similarly other architectures have SIMD support specifically MIPS, IBM System Z, Power PC with MMX/AltiVee and x86 with Intel’s AVX.</span><br><font face="Times" size="3"><br></font><span style="font-family:Times;font-size:16px">Apart from these , The proposal can include task for merging the delay slot filling logic ( from Sparc and Mips ) into single target independent pass.</span><br><font face="Times" size="3"><br></font><span style="font-family:Times;font-size:16px">These is just a primary investigation. I am not expert with all architectures supposed by LLVM but MIPS, x86 and to some extent ARM.</span><br><font face="Times" size="3"><br></font><span style="font-family:Times;font-size:16px">I have question regarding Target hooks. Does it means using TargetInfo an SubTargetInfo class and at runtime decide architecture type and based on that perform optimization ( i.e use target specific instructions ) ?</span><br><font face="Times" size="3"><br></font><span style="font-family:Times;font-size:16px">Please help me ! Am I going in right direction ? Suggest some code , document to look for further ideas. Also if any one like to mentor me for this project.</span><br><font face="Times" size="3"><br></font><span style="font-family:Times;font-size:16px">Sincerely,</span><br><span style="font-family:Times;font-size:16px">Vivek Pandya </span><br></div></div>