Manish Gupta
2011-Aug-27 01:34 UTC
[LLVMdev] How to break/iterate over nested instructions.
Dear All, I wish to iterate over all instructions (where opCode == desired_opCode). I could iterate over all the instruction expect the nested instructions like: %add.ptr229 = getelementptr inbounds i8* getelementptr inbounds ([4096 x i8]* @_Func1, i32 0, i32 0), i64 %idx.ext228 I wish to break this nested instruction in two instructions. Please let me know if there is already existing method in llvm to do the job. Thanks, Manish -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110826/5095603a/attachment.html>
Duncan Sands
2011-Aug-27 07:41 UTC
[LLVMdev] How to break/iterate over nested instructions.
Hi Manish,> I wish to iterate over all instructions (where opCode == desired_opCode). I > could iterate over all the instruction expect the nested instructions like: > > %add.ptr229 = getelementptr inbounds i8* getelementptr inbounds ([4096 x i8]* > @_Func1, i32 0, i32 0), i64 %idx.ext228this is not a nested instruction. The inner getelementptr is a ConstantExpr (a constant) not an instruction.> I wish to break this nested instruction in two instructions.Why? Ciao, Duncan. Please let me know> if there is already existing method in llvm to do the job. > > Thanks, > Manish > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Manish Gupta
2011-Aug-27 20:31 UTC
[LLVMdev] How to break/iterate over nested instructions.
Hi Duncan, Why to break? I wish to analyse all the operands of getelemetptr instructions. For which I iterate over the code and get the instruction of interest by getopcode == getelementptr. But the getelementptrs in this form as in my last mail are getting away from my pass. So i wish to break it. I have a work around if breaking is not possible, but I think it may be a common requirement by other passes too. Thanks! Manish On Sat, Aug 27, 2011 at 12:41 AM, Duncan Sands <baldrick at free.fr> wrote:> Hi Manish, > > > I wish to iterate over all instructions (where opCode == desired_opCode). > I > > could iterate over all the instruction expect the nested instructions > like: > > > > %add.ptr229 = getelementptr inbounds i8* getelementptr inbounds ([4096 > x i8]* > > @_Func1, i32 0, i32 0), i64 %idx.ext228 > > this is not a nested instruction. The inner getelementptr is a > ConstantExpr > (a constant) not an instruction. > > > I wish to break this nested instruction in two instructions. > > Why? > > Ciao, Duncan. > > Please let me know > > if there is already existing method in llvm to do the job. > > > > Thanks, > > Manish > > > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > 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/20110827/7814380c/attachment.html>
Seemingly Similar Threads
- [LLVMdev] How to break/iterate over nested instructions.
- [LLVMdev] How to break/iterate over nested instructions.
- [LLVMdev] How to break/iterate over nested instructions.
- ArrayBoundChecks in SafeCode-llvm37
- [LLVMdev] Break operands into multiple instructions