Griffin Wright
2011-Jul-06 19:06 UTC
[LLVMdev] Confusion with a Use of a getelementptr instruction being a Use of a select instruction instead
Hello, I'm doing some Def/Use analysis, and I'm hung up on one tricky spot. The BB in question is attached. Ignore the red. The issue is that '%13 = load...' instruction does not show up as a Use for the '%scevgep25' definition, and I feel like it should. Instead, it shows up as a Use for '%iftmp.55.0 = select...', though Operand(0) for this '%13 load' instruction [listed as a Use for '%iftmp.55.0 = select...'] is reported as the %scevgep25 instruction, which is correct. Sorry if that was a bit convoluted. Essentially, it seems that 'getelementptr' instructions with their Use's instructions being (direct or indirect)operands to 'select' instructions have their Uses show up as Uses for the select only and not for the getelementptr instruction. Does anyone have any idea why this might be happening? All the other def/use information I get seems correct. Thanks, Griffin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110706/aaf98eca/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: tmp.jpg Type: image/jpeg Size: 55054 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110706/aaf98eca/attachment.jpg>
John Criswell
2011-Jul-07 17:06 UTC
[LLVMdev] Confusion with a Use of a getelementptr instruction being a Use of a select instruction instead
On 7/6/11 2:06 PM, Griffin Wright wrote:> Hello, > > I'm doing some Def/Use analysis, and I'm hung up on one tricky spot. > The BB in question is attached. Ignore the red. > > The issue is that '%13 = load...' instruction does not show up as a > Use for the '%scevgep25' definition, and I feel like it should. > Instead, it shows up as a Use for '%iftmp.55.0 = select...', though > Operand(0) for this '%13 = load' instruction [listed as a Use for > '%iftmp.55.0 = select...'] is reported as the %scevgep25 instruction, > which is correct.I'm not understanding all of the details of the behavior you're describing, but I agree that the %13 load should be a use of %scevgep25 and that the select is a use of %14 and %15. How are you iterating over the uses of %scevgep25? Are you removing or inserting instructions while iterating over the uses, thereby potentially invalidating the use_iterator? Invalidating the use_iterator would be my first guess. -- John T.> > Sorry if that was a bit convoluted. Essentially, it seems that > 'getelementptr' instructions with their Use's instructions being > (direct or indirect)operands to 'select' instructions have their Uses > show up as Uses for the select only and not for the getelementptr > instruction. > > Does anyone have any idea why this might be happening? All the other > def/use information I get seems correct. > > Thanks, > Griffin > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110707/9e125c56/attachment.html>
Reasonably Related Threads
- Moving instructions from source Basic Block to dest Basic Block
- [LLVMdev] How to identify LLVM version?
- simplify CFG Pass in llvm
- [LLVMdev] Optimisation pass to move an alloca'd array to a global constant array
- [LLVMdev] [PATCH] Lost instcombine opportunity: "or"s of "icmp"s (commutability)