search for: param_begin

Displaying 6 results from an estimated 6 matches for "param_begin".

Did you mean: params_begin
2010 Dec 22
0
[LLVMdev] the optional function return attribute and the llvm-c bindings
...pe of the function [f]. *) val remove_return_attr: llvalue -> Attribute.t -> unit I also propose to update the ocamldoc text for the following OCaml functions to reflect that the list traversed is the function *argument* list and not the parameter list: Llvm.param Llvm.params Llvm.param_begin Llvm.param_end Llvm.param_succ Llvm.param_pred Llvm.iter_params Llvm.rev_iter_params Llvm.fold_left_params Llvm.fold_right_params Finally, I think the ocamldoc texts for Llvm.add_function_attr and Llvm.remove_function_attr are wrong. They actually add and remove function attributes,...
2010 Dec 21
2
[LLVMdev] the optional function return attribute and the llvm-c bindings
On Dec 21, 2010, at 00:43, Duncan Sands wrote: > > IIRC the function return value is considered to be the parameter with index 0. > The function itself is considered to be the parameter with index ~0U. Yes, that's what the documentation seems to say is the proper mode for indexing the return parameter, but when I set an attribute on the parameter with index zero, it gets applied to
2012 Mar 16
1
[LLVMdev] Lowering formal pointer arguments
Hi Patrik, > DAG.getMachineFunction().getFunction() only works in LowerFormalArguments (there it returns the callee), not in LowerCall (where it returns the caller, rather than the callee). You need to pass more information about the function type to LowerCall (besides partial information such as the isVarArg parameter). > > I can provide a patch if you are interested. (Unfortunately,
2011 Sep 16
2
[LLVMdev] How to duplicate a function?
...333); // create and insert the function call //CallInst::Create(f, param, "", nextInstr); CallInst::Create(Fn, param, "", nextInstr); // indicates that we changed the code //return true; #endif Type *NRetTy; std::vector<Type*> Params(FTy->param_begin(), FTy->param_end()); FunctionType *NFTy = FunctionType::get(FTy->getReturnType(), Params, false); // Create the new function body and insert it into the module... Function *NF = Function::Create(NFTy, Fn->getLinkage()); NF->copyAttributesFrom(Fn); Fn->getParent(...
2011 Sep 16
0
[LLVMdev] How to duplicate a function?
...333); // create and insert the function call //CallInst::Create(f, param, "", nextInstr); CallInst::Create(Fn, param, "", nextInstr); // indicates that we changed the code //return true; #endif Type *NRetTy; std::vector<Type*> Params(FTy->param_begin(), FTy->param_end()); FunctionType *NFTy = FunctionType::get(FTy->getReturnType(), Params, false); // Create the new function body and insert it into the module... Function *NF = Function::Create(NFTy, Fn->getLinkage()); NF->copyAttributesFrom(Fn); Fn->getParent(...
2008 Sep 13
3
[LLVMdev] Duplicate Function with duplicated Arguments
I'm now writing a pass and I wanna ask a question about how to duplicate the function and add duplicated arguments in llvm, for example: func(int a, char *b) -> func(int a, char *b, int a1, char *b1) I'm now stuck at using "getOrInsertFunction" and how to handle "getArgumentList", please share your opinion, thanks a lot! James