search for: gcd_val

Displaying 3 results from an estimated 3 matches for "gcd_val".

Did you mean: d_val
2011 Aug 31
0
[LLVMdev] How to place call(s) to functions found in other llvm modules ???
On Wed, Aug 31, 2011 at 10:54 AM, Mian M. Hamayun <mian-muhammad.hamayun at imag.fr> wrote: > Hi, > > I tried this as well, using the following line to add function declaration > to the caller module. > > Function::Create(FT, Function::ExternalLinkage, "gcd", mod); > > Where "FT" is the same as before. And the output produced by the >
2011 Aug 31
2
[LLVMdev] How to place call(s) to functions found in other llvm modules ???
Hi, I tried this as well, using the following line to add function declaration to the caller module. Function::Create(FT, Function::ExternalLinkage, "gcd", mod); Where "FT" is the same as before. And the output produced by the PrintModulePass becomes: ; ModuleID = 'GCDMain' declare i32 @gcd(i32, i32) define i32 @main() { EntryBlock: %tmp = call i32 @gcd(i32
2011 Aug 31
2
[LLVMdev] How to place call(s) to functions found in other llvm modules ???
...uot;EntryBlock", F_Main); IRBuilder<> builder(BB); Value *Thirty = ConstantInt::get(Type::getInt32Ty(Context), 30); Value *Fifty = ConstantInt::get(Type::getInt32Ty(Context), 50); std::vector<Value*> args; args.push_back(Thirty); args.push_back(Fifty); Value *gcd_val = builder.CreateCall(gcd, args.begin(), args.end(), "tmp"); builder.CreateRet(gcd_val); return mod; } Module* makeLLVMModule(LLVMContext& Context) { // Module Construction Module* mod = new Module("GCD", Context); FunctionType *FT = FunctionType::get(Type:...