[LLVMdev] inserting a fucntion call at the end of basic bloc
baldrick at free.fr
Tue Apr 26 06:57:11 PDT 2011
> hello.bc works and i have check it with lli hello.bc
you should check it with "opt -verify hello.bc -disable-output" Running
lli is not sufficient if assertions are disabled.
> no without assertion enabled
You should build LLVM with assertions enabled. This will almost certainly
instantly find the problem.
> AttrListPtr func_consume_PAL;
There is no point in setting attributes if you don't want any. That said,
it should be harmless. What I don't understand is how your call is getting
both the "nounwind" and "noalias" attributes when you say you don't set these
anywhere; and why it is marked as being a tail call when you say you didn't
set the tail call flag or run any optimization passes.
> i have tried to modify the method consume so that it is
> void consume(int*)
> and chaged the declaration also
> and it works
> now when i have modified the method consume like this void consume(int)
> and modified the declaration
> it doesn't work
> I don't know valgrid:(
More information about the llvm-dev