search for: _insert_a_function_call

Displaying 4 results from an estimated 4 matches for "_insert_a_function_call".

2009 May 21
3
[LLVMdev] Passing a pointer to a function
..., I would like to do something like: void visitLoadInst(LoadInst &I) { Value *P; P = I.getPointerOperand(); CallInst::Create(load_fcall, P, "", &I); } Where load_fcall is build using a call to Module::getOrInsertFunction as in the example here: http://wiki.llvm.org/HowTo:_Insert_a_function_call My question is, what do I pass as the argument type for P above? The following seems to work, as long as there are no floating point ops: PointerType::getUnqual(IntegerType::get(32)) So I tried using just a void pointer type, as in: PointerType::getUnqual(Type::VoidTy) But then Type.cpp throws...
2009 May 21
0
[LLVMdev] Passing a pointer to a function
On Wed, May 20, 2009 at 7:31 PM, Scott Ricketts <sricketts at maxentric.com> wrote: > Where load_fcall is build using a call to Module::getOrInsertFunction > as in the example here: > > http://wiki.llvm.org/HowTo:_Insert_a_function_call > > My question is, what do I pass as the argument type for P above? The > following seems to work, as long as there are no floating point ops: I would suggest bit-casting p to an i8*. > So I tried using just a void pointer type, as in: > PointerType::getUnqual(Type::VoidTy) > &...
2010 Dec 13
1
[LLVMdev] how to invoke C functions in llvm IR ?
Hi all, I am a new user of LLVM~. I want to use LLVM C++ API to generate the LLVM IR.The question is how I can call the C functions in LLVM IR.I did not find the APIs in the documents. For Example: Function *func = Function:Create(...) //create a LLVM function Here is another function I cannot represent with LLVM IR(maybe too complex),so I want to invoke the C function with LLVM IR in
2009 Mar 26
1
[LLVMdev] LLVM and GMP
someguy wrote: > Oh. One more thing: > > Paulo, while your working out how to do what Chris said (making usage > of bigints into library calls), wouldn't it just warm your heart to > document the process on the wiki? > > </wiki pimping> > > On Wed, Mar 25, 2009 at 9:16 AM, someguy > <just.s0m3.guy+llvmdev at gmail.com> wrote: > >> Oh. I