[LLVMdev] inserting a fucntion call at the end of basic bloc

Nabila ABDESSAIED nabila.abdessaied at gmail.com
Mon Apr 25 02:55:21 PDT 2011


2011/4/25 Duncan Sands <baldrick at free.fr>

> Hi Nabila,
>
> > i would like insert a fucntion call at the end of each basic bloc
>
> you can't, because only terminators are allowed at the end of a basic
> block.
> However you can try to insert the call before the terminator.
>
Yes, i mean before the termininator,
My problem is how to call a method
suppose this fucntion
void A(int x)
{
  x=x+1;

}

should i define this function and declare it at the beginig of the module
and create for it a basic bloc?
and then how to call it before each basic bloc terminitor

...
>
> > i tried to see an example with the demo, i saw that it instead of calling
> the
> > function, it repeats all the instruction that are existing in the
> function
> > Any help?
>
> Turn off optimization in the demo (optimization level "None").
>
> Ciao, Duncan.
> _______________________________________________
> 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/20110425/88e8b589/attachment.html>


More information about the llvm-dev mailing list