search for: retty

Displaying 20 results from an estimated 35 matches for "retty".

Did you mean: pretty
2006 May 31
1
[LLVMdev] InstVisitor: RetType
Hi, the docs for InstVisitor say that if RetType != void, one has to override visitInstruction. What is the reason for that? It's valid to define visitInstruction like that: RetTy visitInstruction(Instruction &I) { return RetTy(); } so assuming RetTy has a sensible default constructor, user won't need to override visitInstruct...
2012 Oct 08
1
[LLVMdev] Fwd: Multiply i8 operands promotes to i32
...ame file. The important part here is how you implement the classifyReturnType and classifyArgumentType functions, they should basically look like this: class MSP430ABIInfo : public ABIInfo { public: MSP430ABIInfo (CodeGenTypes &CGT) : ABIInfo(CGT) {} ABIArgInfo classifyReturnType(QualType RetTy) const; ABIArgInfo classifyArgumentType(QualType RetTy) const; virtual void computeInfo(CGFunctionInfo &FI) const { FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it)...
2005 Aug 24
1
[LLVMdev] CallInst constructor interface
...rmalArgs; formalArgs.push_back(arg1->getType()); formalArgs.push_back(arg2->getType()); ... formalArgs.push_back(argn->getType()); std::vector<Value*> args; args.push_back(arg1); args.push_back(arg2); ... args.push_back(argn); FunctionType *FType = FunctionType::get(RetTy, formalArgs, false); Module *M = before->getParent()->getParent()->getParent(); Function *F = M->getOrInsertFunction(FName, FType); CallInst *call = new CallInst(F, args, "func", before); It seems that for the common case you should just be able to write this: std::vecto...
2008 May 22
3
[LLVMdev] How to get a return type of a function with LLVM-C API
...get a return type of a function(from bitcode file) with LLVM-C API, but there seems no appropriate API to do that. I've tried to do that with following code, ---- LLVMModuleRef M; LLVMMemoryBufferRef MemBuf; LLVMValueRef F; // Function LLVMTypeRef RetTy; char *ErrStr; // // -- Load shader module // ret = LLVMCreateMemoryBufferWithContentsOfFile( input, &MemBuf, // [out] &ErrStr); // [out] ret = LLVMParseBitcode( MemBuf, &M, // [out] &ErrStr); // [o...
2013 Mar 06
0
[LLVMdev] LangRef/implementation inconsistency: What is the intended constraint on function return types?
...m.org/docs/LangRef.html#id14> and also, contrarily, "<returntype>‘ is any type except label." <http://llvm.org/docs/LangRef.html#id15> On the other hand, the actual implementation of FunctionType::isValidReturnType opines that: bool FunctionType::isValidReturnType(Type *RetTy) { return !RetTy->isFunctionTy() && !RetTy->isLabelTy() && !RetTy->isMetadataTy(); } These definitions are mutually incompatible. What is the intended definition? -- Sean Silva
2015 Aug 19
5
creating a callinst to an external function
...s folder works fine and the foofile.cpp is compiled with MCJIT.cpp and another function in the same file works just fine as expected. Not back to the instrumentation pass. How can I insert a callinst to the foo function in the given IR? Here is the snippet that inserts the call: Type* retTy = Type::getInt32Ty(C); FunctionType* FuncTy = FunctionType::get(retTy, false); PointerType* PtrToFuncTy = PointerType::get(FuncTy, 0); Constant *fun = M->getOrInsertFunction("foo", Type::getVoidTy(C), PtrToFuncTy, Type::getLabelTy(C), nullptr);...
2007 Jul 10
1
How to preserve data across function calls in a library package
Hi, I am writing an R package with two functions in C++. So far everything works. Now, i would like to write a third function which would use a pointer (it is a pointer to a class object) created by first function. I tried placing this pointer outside of the function definitions (i.e to make it global) but when called in the 3rd function i get > *** caught bus error *** address 0x0,
2007 Jul 10
1
How to preserve data across function calls in a library package
Hi, I am writing an R package with two functions in C++. So far everything works. Now, i would like to write a third function which would use a pointer (it is a pointer to a class object) created by first function. I tried placing this pointer outside of the function definitions (i.e to make it global) but when called in the 3rd function i get > *** caught bus error *** address 0x0,
2011 Sep 16
2
[LLVMdev] How to duplicate a function?
...m.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/BasicBlock.h" #include "llvm/Support/Debug.h" #include "llvm/Support/CallSite.h" using namespace llvm; namespace { Constant *f; Function *Fn; FunctionType *FTy; Type *RetTy; std::vector<Type*> Params; class DP : public FunctionPass { public: static char ID; DP() : FunctionPass(ID) {} virtual bool doInitialization(Module &M); virtual bool runOnFunction(Function &F); virtual bool doFinalization(Modul...
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
2007 Sep 24
2
[LLVMdev] RFC: Tail call optimization X86
...============================================ > --- include/llvm/Target/TargetLowering.h (revision 42247) > +++ include/llvm/Target/TargetLowering.h (working copy) > @@ -851,8 +851,18 @@ > virtual std::pair<SDOperand, SDOperand> > LowerCallTo(SDOperand Chain, const Type *RetTy, bool > RetTyIsSigned, > bool isVarArg, unsigned CallingConv, bool isTailCall, > - SDOperand Callee, ArgListTy &Args, SelectionDAG &DAG); > + bool isNextInstRet, SDOperand Callee, ArgListTy &Args, > + SelectionDAG &...
2012 Apr 19
2
[LLVMdev] [PATCH][RFC] Add extra arguments to TargetLowering::LowerCall() so targets have more context in which to construct call chains
All, The attached patch adds two extra arguments to TargetLowering::LowerCall: RetTy and Args. These arguments are used in TargetLowering::LowerCallTo() to construct the Ins and OutVals parameters, but are not available to the target via LowerCall(). Some targets require this additional information, and the LowerCallTo() method is not virtual in TargetLowering. Instead of makin...
2011 Sep 16
0
[LLVMdev] How to duplicate a function?
...m.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/BasicBlock.h" #include "llvm/Support/Debug.h" #include "llvm/Support/CallSite.h" using namespace llvm; namespace { Constant *f; Function *Fn; FunctionType *FTy; Type *RetTy; std::vector<Type*> Params; class DP : public FunctionPass { public: static char ID; DP() : FunctionPass(ID) {} virtual bool doInitialization(Module &M); virtual bool runOnFunction(Function &F); virtual bool doFinalization(Modul...
2013 Jul 26
0
[LLVMdev] floor
...extern double floor_(double); double x = 1.5; double y, y_; void foo() { double y = floor(x); double y_ = floor_(x); } If I compile this for Mips16, it calls the proper helper function for floor_ but not for floor, because the signature for floor in callee info is wrong. Args[0] = void RetTy = void /local/llvmpb_config/install/bin/clang -target mipsel-linux-gnu floor1.c -o floor1.s -mips16 -S -fPIC ..... lw $3, %got(x)($2) lw $4, 0($3) lw $5, 4($3) lw $6, %call16(floor)($2) move $25, $6 move $gp, $2 sw $2, 20 ( $16 ); sw $3, 16 ( $16 ); jalrc $6 sw $3, 36($16) sw $2, 32(...
2002 Oct 25
2
Having problems with PXELINUX parsing contents of pxelinux.cfg/AC134D6D
Hello, We are trying to use 'PXELINUX' for network boot with root file system on ramdisk, the kernel image vmlinuz and compressed root file system rootfs.img.gz are both present in /tftpboot directory PXELINUX client (pxelinux.0) requests and gets the config file AC134D6D from the TFTP server (which supports tsize option) contents are as follows timeout 10 prompt 1 label linux-new
2013 Jul 26
2
[LLVMdev] floor
I'm getting some problems because it seems that the compiler is treating "floor" differently from other math library functions like "sin". The Args and RetVal have the parameter and return types marked as void. For mips16, it's important that I be able to know the original signature for floating point functions. In some cases, need to create calls to helper
2007 Sep 24
0
[LLVMdev] RFC: Tail call optimization X86
...========================== >> --- include/llvm/Target/TargetLowering.h (revision 42247) >> +++ include/llvm/Target/TargetLowering.h (working copy) >> @@ -851,8 +851,18 @@ >> virtual std::pair<SDOperand, SDOperand> >> LowerCallTo(SDOperand Chain, const Type *RetTy, bool >> RetTyIsSigned, >> bool isVarArg, unsigned CallingConv, bool isTailCall, >> - SDOperand Callee, ArgListTy &Args, SelectionDAG &DAG); >> + bool isNextInstRet, SDOperand Callee, ArgListTy &Args, >> +...
2007 Sep 24
0
[LLVMdev] RFC: Tail call optimization X86
...h =================================================================== --- include/llvm/Target/TargetLowering.h (revision 42247) +++ include/llvm/Target/TargetLowering.h (working copy) @@ -851,8 +851,18 @@ virtual std::pair<SDOperand, SDOperand> LowerCallTo(SDOperand Chain, const Type *RetTy, bool RetTyIsSigned, bool isVarArg, unsigned CallingConv, bool isTailCall, - SDOperand Callee, ArgListTy &Args, SelectionDAG &DAG); + bool isNextInstRet, SDOperand Callee, ArgListTy &Args, + SelectionDAG &DAG); + // IsEligibleF...
2007 Sep 23
2
[LLVMdev] RFC: Tail call optimization X86
The patch is against revision 42247. -------------- next part -------------- A non-text attachment was scrubbed... Name: tailcall-src.patch Type: application/octet-stream Size: 62639 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070923/4770302f/attachment.obj>
2012 Apr 19
0
[LLVMdev] [llvm-commits] [PATCH][RFC] Add extra arguments to TargetLowering::LowerCall() so targets have more context in which to construct call chains
...uiring an across the change for all in-tree and out-of-tree targets. Anyone wants to take the lead on this? Evan On Apr 19, 2012, at 8:07 AM, Justin Holewinski <jholewinski at nvidia.com> wrote: > All, > > The attached patch adds two extra arguments to TargetLowering::LowerCall: RetTy and Args. These arguments are used in TargetLowering::LowerCallTo() to construct the Ins and OutVals parameters, but are not available to the target via LowerCall(). Some targets require this additional information, and the LowerCallTo() method is not virtual in TargetLowering. Instead of makin...