similar to: [LLVMdev] Adding function call in LLVM IR using IRBuilder causes assertion error

Displaying 20 results from an estimated 700 matches similar to: "[LLVMdev] Adding function call in LLVM IR using IRBuilder causes assertion error"

2009 Nov 11
0
[LLVMdev] Adding function call in LLVM IR using IRBuilder causes assertion error
CreateAlloca(Type) returns an object of type Type*, the memory that can hold an object of type Type. You probably don't want to be creating allocas just before calling the function since 1) if that call winds up in a loop they'll grow your stack frame without bound, and 2) the memory they point to is initially uninitialized. Where did the tutorial tell you to do that? In general, when I
2009 Nov 11
0
[LLVMdev] Adding function call in LLVM IR using IRBuilder causes assertion error
[Please use Reply to All for sending your message to the ml too] Marc Claesen <claesenm at gmail.com> writes: >> Another issue is that I don't see in your code the _values_ you want to >> pass to the called function. Apparently you already have the function >> declaration (Function *f) but you are creating a call to that function, >> and you need the actual
2009 Nov 18
2
[LLVMdev] Strange error using CallInst constructor
Hi, This is probably more of a standard C++ question instead of an actual LLVM question, but here it goes anyway. I'm trying to invoke the following constructor: CallInst::CallInst(Value *Func, InputIterator ArgBegin, InputIterator ArgEnd, const Twine &NameStr, BasicBlock *InsertAtEnd); My code is: using namespace llvm; void replaceByClone(Function *f, CallInst *I){ Function *clone =
2016 Feb 10
5
Question about an error we're now starting to get on LLVM 3.8.0rc2since
+llvm-dev > On 2016-Feb-09, at 12:54, Harris, Kevin <Kevin.Harris at unisys.com> wrote: > > Duncan, > Kevin Harris here, from Unisys. In our application, generating LLVM IR, we have several instances of code that looks like this: > > . . . > Value* pDS; > . . . > auto argIt = pFunc->arg_begin(); >
2009 Aug 22
1
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
2009/7/4 Albert Graef <Dr.Graef at t-online.de>: > This is all I ever needed to interface to C functions using LLVM. It's > really easy. Of course you still need a prototype of the external > function (function definition without body) in your IR, but that's it. Hi Albert, I'm having a similar problem and I found I can't declare the function and use it, most likely
2012 Sep 21
0
[LLVMdev] How To Get The Name of the type the popinter is pointing to
i am using llvm , i did this if ( AllocaInst *allocInst = dyn_cast<AllocaInst>(&*bbit)){ PointerType *p = allocInst->getType(); if ( p->getElementType()->isPointerTy()){ StringRef name = allocInst->getName();
2012 Sep 20
5
[LLVMdev] How To Get The Name of the type the popinter is pointing to
I want to know the type of pointer . for example if we have int *p, struct node *w char *q then i want int for p,char for q , struct node for w. any help would be appreciated. -- View this message in context: http://llvm.1065342.n5.nabble.com/How-To-Get-The-Name-of-the-type-the-popinter-is-pointing-to-tp49121.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
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 > >
2009 Aug 22
0
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
I think you might have to provide an empty list if your function doesn't take parameters. Maybe using an irbuilder would help? -bw On Aug 22, 2009, at 2:13 PM, Renato Golin <rengolin at systemcall.org> wrote: > 2009/7/4 Albert Graef <Dr.Graef at t-online.de>: >> This is all I ever needed to interface to C functions using LLVM. >> It's >> really
2010 May 28
2
[LLVMdev] Retrieving Underlying Type from AllocaInst
Is there a recommended way to retrieve the original type from an AllocaInst object? For example, I am creating alloca instructions using the IRBuilder interface like: alloca = builder.CreateAlloca( Type::getDoubleTy( context ), 0, variableName.c_str() ); and I place the alloca into a symbol table. Later when I am generating instructions for an assignment operation, I want to check the type of
2012 Jul 26
1
[LLVMdev] Calling a function with bad signature, possible bug.
Hello, I'm having troubles with writing a pass. In my pass I've have created a function that has two parameters - both of type i8*. Initially I wrote this function in C, that I translated it into IR, and then by using llc -march=cpp I got it's implementation in cpp code that actually inserts IR instructions. Then, I inserted this cpp code in my pass. And in some places of a program
2013 Feb 25
2
[LLVMdev] Queries regarding function's arguments data type
Hi all, I am working on my Master's project in security and I am trying to iterate over the argument list of the function. Basically I need to do following things : 1. Check data type of each argument of the argument list of the function. 2. Based on its data type like character array or integer array, pointer, int, char, take different action. 3. I have added following code to check its
2018 Mar 31
2
[Dwarf] Register a local variable in DIBuilder and locate it later with a DwarfContext
Hi, First, considering I'm using an IRBuilder and a DIBuilder to build my program, how can I automatically bind the CreateAlloca with my named local variable inside the DIBuilder ? Is it automatic with the Twine name of CreateAlloca ? And/Or should I use DIBuilder::createAutoVariable and how ? Then, I'm wondering how to locate back my local variable in memory (register or stack) once i
2009 Nov 19
0
[LLVMdev] Strange error using CallInst constructor
Please keep replies on the list. Now you've missed "InputIterator must be a random-access iterator pointing to contiguous storage (e.g. a std::vector<>::iterator). Checks are made for random-accessness but not for contiguous storage as that would incur runtime overhead." from CallInst's constructor (although that comment should be on Create()). Function::arg_iterator
2006 Sep 02
2
[LLVMdev] gfortran calling convention
The NIST F77 test suite doesn't seem to be compatible with gfortran at all, so I had to work from my own sample codes, and generate test cases from them. Here's what works now, and I have a separate test case for each of these: statement functions intrinsic functions (print, cos, etc) loops, goto statments scalarized array operations function calls with *no arguments* simple common
2010 May 28
2
[LLVMdev] Retrieving Underlying Type from AllocaInst
Thanks Nick, Unfortunately, that is indeed what I asked for but not what I really am looking for. My naive approach is to store symbol table entries as Value* objects so I can allocate global variables and alloca variables and place them into the symbol table and the rest of the code didn't need to know which kind they were, in general. Loads and Stores of these types (as well as other
2006 Sep 02
0
[LLVMdev] gfortran calling convention
On Fri, 1 Sep 2006, Michael McCracken wrote: > Here's what works now, and I have a separate test case for each of these: > > statement functions > intrinsic functions (print, cos, etc) > loops, goto statments > scalarized array operations > function calls with *no arguments* > simple common blocks Great! > Function calls with more than one argument don't work.
2018 Apr 01
2
[Dwarf] Register a local variable in DIBuilder and locate it later with a DwarfContext
Hi Paul, How can i make this call to intrinsic from the c++ code ? I'm not working with the IR language, but directly in C++ with IRBuilder::CreateAlloca. My goal is that one : - Generate machine code with an instance of the class 'IRBuilder' - Emit 'ObjFile' class instance with MCJIT - Create a DwarfContext instance directly from the emitted ObjFile object
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/
2013 Feb 25
0
[LLVMdev] Queries regarding function's arguments data type
On 2/25/13 1:44 PM, teja tamboli wrote: > Hi all, > > I am working on my Master's project in security and I am trying to > iterate over the argument list of the function. Basically I need to do > following things : Interesting. Just out of curiosity, can you tell us what your project is about? > > 1. Check data type of each argument of the argument list of the