search for: getparamtype

Displaying 20 results from an estimated 48 matches for "getparamtype".

2015 Dec 03
3
Function attributes for LibFunc and its impact on GlobalsAA
----- Original Message ----- > From: "James Molloy via llvm-dev" <llvm-dev at lists.llvm.org> > To: "Vaivaswatha Nagaraj" <vn at compilertree.com> > Cc: "LLVM Dev" <llvm-dev at lists.llvm.org> > Sent: Thursday, December 3, 2015 4:41:46 AM > Subject: Re: [llvm-dev] Function attributes for LibFunc and its impact on GlobalsAA > >
2012 Jul 26
1
[LLVMdev] Calling a function with bad signature, possible bug.
...y pass inserts a call to this function. But I don't have any problems with my pass if I run clang -emit-llvm -S, then llc and then gcc. With this approach I get a binary with my instrumentation inserted. This line causes a problem - assert((i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"); I tried to get a dump of FTy->getParamType(i) and Args[i]->getType(), but I wasn't able to do it in gdb - everytime I create a breakpoint it just misses it. So I made the following...
2013 Feb 25
2
[LLVMdev] Queries regarding function's arguments data type
...e function * FunctionType *FTy = F->getFunctionType(); unsigned int numArgs = FTy->getNumParams(); //Currently just checking data type of the 0th argument. Eventually will be running it in the loop from 0 to numArgs. errs() << "\n1 Argument type int 32 : " << FTy->getParamType(0)->isIntegerTy(32); errs() << "\n2 Argument type char : " << FTy->getParamType(0)->isIntegerTy(8); errs() << "\n4 Argument type pointer : " << FTy->getParamType(0)->isPointerTy(); errs() << "\n5 Argument type array : &quot...
2013 Feb 25
0
[LLVMdev] Queries regarding function's arguments data type
...Ty = F->getFunctionType(); > unsigned int numArgs = FTy->getNumParams(); > > //Currently just checking data type of the 0th argument. Eventually > will be running it in the loop from 0 to numArgs. > errs() << "\n1 Argument type int 32 : " << > FTy->getParamType(0)->isIntegerTy(32); > errs() << "\n2 Argument type char : " << > FTy->getParamType(0)->isIntegerTy(8); > errs() << "\n4 Argument type pointer : " << > FTy->getParamType(0)->isPointerTy(); > errs() << "\n5...
2009 Oct 27
3
[LLVMdev] llvmgcc ToT broken
The first buildbot failure I can readily find was Monday, 26oct2009 around 7PM PDT. The assertion is Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!"), function init, file /Volumes/Sandbox/Buildbot/llvm/ build.llvm-gcc-x86_64-darwin10-selfhost/llvmCore.roots/llvmCore~obj/ src/lib/VMCore/Instructions.cpp, line 312. It seems to be compiling funct...
2010 Apr 28
1
[LLVMdev] Constructing a varargs CallInst
...a call to a variadic function, and I'm running into the following assertion failure: /localhome/simmon12/workspace/llvm-sources/lib/VMCore/Instructions.cpp:297: void llvm::CallInst::init(llvm::Value*, llvm::Value* const*, unsigned int): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!"' failed. I'm using the version of CallInst taking the beginning and end iterators of a vector<Value*>. I made sure to mark the function declaration with varargs=true when I created it (...
2010 Jun 03
5
[LLVMdev] Why asserts don't provide much information?
When for example some call is wrong error message always looks like this: Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!"), function init, file /tmp/llvm-svn/llvm/lib/VMCore/Instructions.cpp, line 247. I believe assert() statements should better be replaced with more detailed printouts of what is wrong. This will save m...
2009 Sep 06
3
[LLVMdev] Equivalent types
Hi! I have this error while building my code: Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!") Actually I'm trying to load functions from .bc file and use them in the code that I'm building with IRBuilder. I found that function parameter type is %struct.reValue* and the type of the value...
2009 Nov 11
4
[LLVMdev] Adding function call in LLVM IR using IRBuilder causes assertion error
...nctions without parameters (eg. int foo()), but once a function has a parameter I get the following assertion error: <llvmpath>/lib/VMCore/Instructions.cpp:297: void llvm::CallInst::init(llvm::Value*, llvm::Value* const*, unsigned int): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!"' failed. I've checked everything I can think of and it all seems correct to me ... Any help would be greatly appreciated! Thanks in advance, Marc Claesen
2015 Jan 05
3
[LLVMdev] should AlwaysInliner inline this case?
...39;s ptrtoint/inttoptr castable. The following patch opens up the optimization: --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -1456,7 +1456,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { Type *ParamTy = FT->getParamType(i); Type *ActTy = (*AI)->getType(); - if (!CastInst::isBitCastable(ActTy, ParamTy)) + if (!CastInst::isBitOrNoopPointerCastable(ActTy, ParamTy, DL)) return false; // Cannot transform this parameter value. if (AttrBuilder(CallerPAL.getParamAttributes(i + 1), i + 1). @@...
2009 Sep 15
2
[LLVMdev] Opaque types in function parameters
Hi all, I am creating a function and trying to call it using the LLVM API. It seems that whenever the function type includes an opaque-typed parameter, the CallInst::Create call causes an assert: Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!"), function init, file /usr/home/csanchez/shared/prj/tce/ src/llvm-2.5/lib/VMCore/Instructions.cpp, line 294. If I change the code so the function type has only non-opaque types, everything is corr...
2009 Oct 27
0
[LLVMdev] llvmgcc ToT broken
On Oct 27, 2009, at 11:23 AMPDT, Stuart Hastings wrote: > The first buildbot failure I can readily find was Monday, 26oct2009 > around 7PM PDT. The assertion is > > Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) > == Params[i]->getType()) && "Calling a function with a bad > signature!"), function init, file /Volumes/Sandbox/Buildbot/llvm/ > build.llvm-gcc-x86_64-darwin10-selfhost/llvmCore.roots/llvmCore~obj/ > src/lib/VMCore/Instructions.cpp, line 312. Yes, I'...
2011 Aug 31
0
[LLVMdev] [PATCH] Split init.trampoline into init.trampoline & adjust.trampoline
...uggest you just remove "Like in llvm.prefetch below, ". > + NewFn = cast<Function>(M->getOrInsertFunction( > + NameTmp, > + Type::getVoidTy(M->getContext()), > + FTy->getParamType(0), FTy->getParamType(1), > + FTy->getParamType(2), (Type *)0)); > + return true; > + } > case 'p': > // This upgrades the llvm.prefetch intrinsic to accept one more parameter, > // which is a instruction / data ca...
2011 Aug 29
3
[LLVMdev] [PATCH] Split init.trampoline into init.trampoline & adjust.trampoline
Hi! Attached patches split init.trampoline into adjust.trampoline and init.trampoline, like in gcc. As mentioned in the previous mail, I've not made a documentation patch, since I'm not sure about what the documented semantics of llvm.adjust.trampoline should be. Thanks! -- Sanjoy Das http://playingwithpointers.com -------------- next part -------------- A non-text attachment was
2010 May 17
3
[LLVMdev] Is this value an integer type?
...%323 to a library function whose prototype is: recordStore(const char*, unsigned int, unsigned, int) But my passer stuck at CallInst::init, because llvm complains %323 does not have the same type as the recordStore's is declared. assert((i >= FTy->getNumParams() || FTy->getParamType(i)== Params[i]->getType()) && "Calling a function with a bad signature!"); This is strange because the fourth argument of recordStore has been declared as: "IntegerType::get(getGlobalContext(), 32)" If I somehow replace the assert statement as: assert(.....
2013 Jan 27
1
[LLVMdev] Passing an array to an external function
Hi, I tried passing the array directly using and changing the getorInsertFunction accordingly but this didn't work. It fails with Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed. hookFunc = M.getOrInsertFunction("hook", Type::getVoidTy(M.getContext()), llvm::ArrayType::get(llvm::Type::getInt32Ty(M.getContext()),2), (Type*)0); ..... Args[0] = ConstantArray:...
2012 Dec 26
1
[LLVMdev] Using argument in another module
...()); // builder is IRBuilder, its context is the same as f1 When I run my program, I get llvm/lib/VMCore/Instructions.cpp:274: void llvm::CallInst::init(llvm::Value*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed. I found another thread having the same problem http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-July/052083.html It says that the problem results from parameter in different context. In tha...
2009 Aug 22
1
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
...is wrong. I have the function extern'd and am creating only the signature on the IR code (attached). The idea is that it creates something like this: My variable is DoubleTy and the expected parameter is also, but I'm getting this error: Assertion `(0 == FTy->getNumParams() || FTy->getParamType(0) == Actual->getType()) && "Calling a function with a bad signature!"' cheers, --renato Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm -------------- next part -------------- A non-text attachment was scrubbed... Na...
2011 Nov 14
2
[LLVMdev] Transferring value* in LLVM
Here is the error that I get: Assertion failed: (i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!" Yakov On Mon, Nov 14, 2011 at 9:05 PM, Eric Christopher <echristo at apple.com>wrote: > You'll probably need to dump both the source and the dest and show the > code that's being ge...
2009 Sep 15
0
[LLVMdev] Opaque types in function parameters
...s>: > Hi all, > > I am creating a function and trying to call it using the LLVM API. It > seems that whenever the function type includes an opaque-typed > parameter, the CallInst::Create call causes an assert: > > Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) > == Params[i]->getType()) && "Calling a function with a bad > signature!"), function init, file /usr/home/csanchez/shared/prj/tce/ > src/llvm-2.5/lib/VMCore/Instructions.cpp, line 294. > > If I change the code so the function type has only non-opaque types, &...