[llvm-dev] Getting segmentation Fault while inserting cloned instrution in the original instruction before the original instrctuion
John Criswell via llvm-dev
llvm-dev at lists.llvm.org
Fri Oct 16 06:42:59 PDT 2015
On 10/16/15 5:25 AM, Priyanka Bamne via llvm-dev wrote:
> BB->getInstList().insert(&(*i),&(*j) );
> here j is iterator of cloned instruction and i is iterator of
> original instruction.Since i am doing it on per basic block branch
> inclusion may not be problem.
There's too little detail here to be helpful. If you haven't already,
make sure you're using a Debug+Asserts build of LLVM; the asserts in
LLVM may provide insight into the problem.
A stack trace might also help.
Make sure you're not cloning the TerminatorInst at the end of the basic
block (a basic block should only have one TerminatorInst), and check
that your insertion point is valid.
Regards,
John Criswell
>
> Thanx
> PRiyanka
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
http://www.cs.rochester.edu/u/criswell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151016/50e13cdf/attachment.html>
More information about the llvm-dev
mailing list