<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Are you asking for software pipelining? There is a MachinePipeliner pass that targets can put into their pass pipeline.</div><div class=""><br class=""></div><div class="">- Matthias</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Jul 10, 2017, at 3:46 AM, hameeza ahmed via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">can someone suggest me solution for this problem??<div class="">Need serious help. My work is stuck............</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jul 10, 2017 at 10:22 AM, hameeza ahmed <span dir="ltr" class=""><<a href="mailto:hahmed2305@gmail.com" target="_blank" class="">hahmed2305@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Here basically my problem is vector width since i have used v64i32 in my backend. now if vector width=64. i want the Reg_B class registers to be assigned and if vector width=2048 i want Reg_A registers to be assigned to instruction. <div class=""><br class=""></div><div class="">Should i incorporate the solution in lowering stage? some thing like;</div><div class=""><br class=""></div><div class="">addRegisterClass(MVT::<wbr class="">v2048i32, &X86::Reg_B);<br class=""></div><div class=""><br class=""></div><div class=""><div class="">              setOperationAction(ISD::<wbr class="">MNLOAD,               MVT::v2048i32, custom);</div></div><div class=""><br class=""></div><div class="">then in function LowerOperation(<wbr class="">SDValue Op, SelectionDAG &DAG)</div><div class=""><br class=""></div><div class="">i should do,</div><div class=""><br class=""></div><div class=""><div class="">  case ISD::MNLOAD:               return LOAD2048(Op, Subtarget, DAG);</div></div><div class=""><br class=""></div><div class="">then i will implement</div><div class=""><div class="">static SDValue LOAD2048(SDValue Op, const X86Subtarget &Subtarget,</div><div class="">                          SelectionDAG &DAG)</div></div><div class="">{</div><div class=""><br class=""></div><div class="">//dont know the details of this part</div><div class="">but here i plan to encode 2048 elements again in 32 v64i32 but with different instruction name like previously it was </div><div class="">load<LD256; i intend to make it load<LD256_N<br class=""></div><div class=""><br class=""></div><div class="">so that in <a href="http://instructioninfo.td/" target="_blank" class="">instructioninfo.td</a> while pattern matching both LD256 and LD256_N are treated separately. 1 will use Reg_B registers and other will use Reg_A respectively.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Is it fine??? </div><div class="">Please guide me...</div><div class="">I need serious help, please.....</div><div class=""><br class=""></div><div class="">Thank You</div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jul 10, 2017 at 9:29 AM, hameeza ahmed <span dir="ltr" class=""><<a href="mailto:hahmed2305@gmail.com" target="_blank" class="">hahmed2305@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">or should i write a condition in <a href="http://registerinfo.td/" target="_blank" class="">registerinfo.td</a>; to define the registers in object Reg_A in specific order according to loop iterations.</div><div class="m_4996687047443152407HOEnZb"><div class="m_4996687047443152407h5"><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jul 10, 2017 at 9:17 AM, hameeza ahmed <span dir="ltr" class=""><<a href="mailto:hahmed2305@gmail.com" target="_blank" class="">hahmed2305@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">hello,<div class=""><br class=""></div><div class="">i have a situation where i have to assign the registers to instructions based on the loop iterations.</div><div class=""><br class=""></div><div class="">for eg.. </div><div class="">the registers are: </div><div class="">R_0_V_0, R_0_V_1, R_0_V_2, R_0_V_3,</div><div class=""><div class="">R_1_V_0, R_1_V_1, R_1_V_2, R_1_V_3,</div></div><div class=""><div class="">R_2_V_0, R_2_V_1, R_2_V_2, R_2_V_3.</div></div><div class="">These registers defined in object Reg_A</div><div class=""><br class=""></div><div class="">These are total 12 registers. will use them contiguously, here i  define it in above mentioned order i.e changing V first then R.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">for eg;</div><div class="">if no of iterations>=4.</div><div class="">1st load will take place in R_0_V_0</div><div class=""><div class="">2nd load will take place in R_0_V_1</div></div><div class=""><div class="">3rd load will take place in R_0_V_2</div></div><div class=""><div class="">4th load will take place in R_0_V_3</div></div><div class="">I am getting this required behavior for iterations>=4. I want this to happen only if there are 4 or above iterations in loop.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">But if my iterations are less than 4 like 3</div><div class="">again it will do the same thing;</div><div class=""><div class="">1st load will take place in R_0_V_0</div><div class="">2nd load will take place in R_0_V_1</div><div class="">3rd load will take place in R_0_V_2</div></div><div class=""><br class=""></div><div class="">Here i dont want the above to happen rather it should increment R instead of V in this case.</div><div class="">It should do something as follows:</div><div class="">1st load to take place in R_0_V_0</div><div class=""><div class="">2nd load to take place in R_1_V_0</div><div class="">3rd load to take place in R_2_V_0</div></div><div class=""><br class=""></div><div class="">Now, how to achieve this?</div><div class=""><br class=""></div><div class="">Can i mention some condition in <a href="http://instructioninfo.td/" target="_blank" class="">instructioninfo.td</a> file? </div><div class="">and in <a href="http://registerinfo.td/" target="_blank" class="">registerinfo.td</a> file instead of 1 object Reg_A, there will be 2 objects Reg_A and Reg_B</div><div class="">where Reg_B defines same registers but in different order.</div><div class=""><br class=""></div><div class="">Reg_B;</div><div class=""><br class=""></div><div class=""><div class="">R_0_V_0, R_1_V_0, R_2_V_0,  //here R changes</div><div class="">R_0_V_1, R_1_V_1, R_2_V_1, </div><div class="">R_0_V_2, R_1_V_2, R_2_V_2, </div></div><div class="">R_0_V_3, R_1_V_3, R_2_V_3.</div><div class=""><br class=""></div><div class="">So that in <a href="http://instructioninfo.td/" target="_blank" class="">instructioninfo.td</a> file it will be something like;</div><div class=""><br class=""></div><div class="">if (no of iterations>=4)</div><div class=""><br class=""></div><div class="">load ................$Reg_A      ; here all register operands will come from Reg_A instance.</div><div class=""><br class=""></div><div class=""><div class="">if (no of iterations<4)</div><div class=""><br class=""></div><div class="">load ................$Reg_B      ; here all register operands will come from Reg_B instance.</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Is the above approach possible??? if yes then how can we acquire the no of iterations in <a href="http://instructioninfo.td/" target="_blank" class="">instructioninfo.td</a> file??</div><div class=""><br class=""></div><div class="">or can you suggest some better way?</div><div class=""><br class=""></div><div class="">Looking forward to response</div><div class=""><br class=""></div><div class="">Thank You.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div>
</blockquote></div><br class=""></div>
</div></div></blockquote></div><br class=""></div>
</div></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></body></html>