<div dir="ltr">hello,<div><br></div><div>i have a situation where i have to assign the registers to instructions based on the loop iterations.</div><div><br></div><div>for eg.. </div><div>the registers are: </div><div>R_0_V_0, R_0_V_1, R_0_V_2, R_0_V_3,</div><div><div>R_1_V_0, R_1_V_1, R_1_V_2, R_1_V_3,</div></div><div><div>R_2_V_0, R_2_V_1, R_2_V_2, R_2_V_3.</div></div><div>These registers defined in object Reg_A</div><div><br></div><div>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><br></div><div><br></div><div>for eg;</div><div>if no of iterations>=4.</div><div>1st load will take place in R_0_V_0</div><div><div>2nd load will take place in R_0_V_1</div></div><div><div>3rd load will take place in R_0_V_2</div></div><div><div>4th load will take place in R_0_V_3</div></div><div>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><br></div><div><br></div><div>But if my iterations are less than 4 like 3</div><div>again it will do the same thing;</div><div><div>1st load will take place in R_0_V_0</div><div>2nd load will take place in R_0_V_1</div><div>3rd load will take place in R_0_V_2</div></div><div><br></div><div>Here i dont want the above to happen rather it should increment R instead of V in this case.</div><div>It should do something as follows:</div><div>1st load to take place in R_0_V_0</div><div><div>2nd load to take place in R_1_V_0</div><div>3rd load to take place in R_2_V_0</div></div><div><br></div><div>Now, how to achieve this?</div><div><br></div><div>Can i mention some condition in <a href="http://instructioninfo.td">instructioninfo.td</a> file? </div><div>and in <a href="http://registerinfo.td">registerinfo.td</a> file instead of 1 object Reg_A, there will be 2 objects Reg_A and Reg_B</div><div>where Reg_B defines same registers but in different order.</div><div><br></div><div>Reg_B;</div><div><br></div><div><div>R_0_V_0, R_1_V_0, R_2_V_0,  //here R changes</div><div>R_0_V_1, R_1_V_1, R_2_V_1, </div><div>R_0_V_2, R_1_V_2, R_2_V_2, </div></div><div>R_0_V_3, R_1_V_3, R_2_V_3.</div><div><br></div><div>So that in <a href="http://instructioninfo.td">instructioninfo.td</a> file it will be something like;</div><div><br></div><div>if (no of iterations>=4)</div><div><br></div><div>load ................$Reg_A      ; here all register operands will come from Reg_A instance.</div><div><br></div><div><div>if (no of iterations<4)</div><div><br></div><div>load ................$Reg_B      ; here all register operands will come from Reg_B instance.</div></div><div><br></div><div><br></div><div>Is the above approach possible??? if yes then how can we acquire the no of iterations in <a href="http://instructioninfo.td">instructioninfo.td</a> file??</div><div><br></div><div>or can you suggest some better way?</div><div><br></div><div>Looking forward to response</div><div><br></div><div>Thank You.</div><div><br></div><div><br></div><div><br></div></div>