<div>I am looking for the slot index of a register around the given slot index Min. Is there a better way than the linear search: </div><div><div><br></div><div>...</div><div>findDefUsesAroundIndex( LiveInterval* li, SlotIndex Min )</div>
<div>...</div><div>  for( MachineOperand * mo = MRI->getRegUseDefListHead(li->reg);</div><div>    mo; mo = mo->getNextOperandForReg() )</div><div>  {</div><div>    SlotIndex si = SI->getInstructionIndex( use.getOperand().getParent() );</div>
<div>    if( Min.distance(si) >= 0 )</div></div><div>...</div><div><br></div><div><div>- Thanks</div><div>Jeff Kunkel</div></div><div><br></div><br><div class="gmail_quote">On Thu, Jan 20, 2011 at 8:37 AM, Jeff Kunkel <span dir="ltr"><<a href="mailto:jdkunk3@gmail.com">jdkunk3@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I have a live interval, and I would like to find out what SlotIndex the next use the register will occur? Is there any way to map a live interval back into instructions or SlotIndexes or blocks used by?<div>
<br></div><div>
- Thanks</div><div>Jeff Kunkel</div>
</blockquote></div><br>