[LLVMdev] [LLVMDev] Live Intervals and Finding the next usage
Jeff Kunkel
jdkunk3 at gmail.com
Thu Jan 20 06:41:16 PST 2011
On Thu, Jan 20, 2011 at 9:39 AM, Jeff Kunkel <jdkunk3 at gmail.com> wrote:
> 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:
>
> ...
> findDefUsesAroundIndex( LiveInterval* li, SlotIndex Min )
> ...
> for( MachineOperand * mo = MRI->getRegUseDefListHead(li->reg);
> mo; mo = mo->getNextOperandForReg() )
> {
> SlotIndex si = SI->getInstructionIndex( mo->getParent() );// changed
> if( Min.distance(si) >= 0 )
> ...
>
> - Thanks
> Jeff Kunkel
>
>
> On Thu, Jan 20, 2011 at 8:37 AM, Jeff Kunkel <jdkunk3 at gmail.com> wrote:
>
>> 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?
>>
>> - Thanks
>> Jeff Kunkel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110120/dacee19e/attachment.html>
More information about the llvm-dev
mailing list