Jeff Kunkel
2011-Jan-20 13:37 UTC
[LLVMdev] [LLVMDev] Live Intervals and Finding the next usage
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/fd429dbd/attachment.html>
Jeff Kunkel
2011-Jan-20 14:39 UTC
[LLVMdev] [LLVMDev] Live Intervals and Finding the next usage
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( use.getOperand().getParent() ); 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/543dc29d/attachment.html>
Jeff Kunkel
2011-Jan-20 14:41 UTC
[LLVMdev] [LLVMDev] Live Intervals and Finding the next usage
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>
Jakob Stoklund Olesen
2011-Jan-20 16:35 UTC
[LLVMdev] [LLVMDev] Live Intervals and Finding the next usage
On Jan 20, 2011, at 5:37 AM, Jeff Kunkel 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?Not really, you have to use the use-def chain. See SplitAnalysis::analyzeUses(). /jakob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1929 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110120/c34b5fca/attachment.bin>
Jeff Kunkel
2011-Jan-20 17:18 UTC
[LLVMdev] [LLVMDev] Live Intervals and Finding the next usage
If I had more than just the one requirement, I would use SplitAnalysis. It provides quite a descriptive list of dependencies for the live interval. However, since I only have the one requirement, I will retain the current code. Although, I will use the MachineRegisterInfo::reg_nodbg_iterator<http://llvm.org/docs/doxygen/html/classllvm_1_1MachineRegisterInfo.html#af7083a77ea4e68dd4982ae6e03b6ced0>. I believe this is what I need. Thanks, Jeff Kunkel On Thu, Jan 20, 2011 at 11:35 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:> > On Jan 20, 2011, at 5:37 AM, Jeff Kunkel 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? > > Not really, you have to use the use-def chain. See > SplitAnalysis::analyzeUses(). > > /jakob > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110120/b64f8207/attachment.html>
Maybe Matching Threads
- [LLVMdev] [LLVMDev] Live Intervals and Finding the next usage
- [LLVMdev] [LLVMDev] Live Intervals and Finding the next usage
- [LLVMdev] RFC: Separate machine IR from lib/CodeGen into lib/MIR
- [LLVMdev] RFC: Separate machine IR from lib/CodeGen into lib/MIR
- [LLVMdev] Assert in LiveInterval update