similar to: [LLVMdev] FunctionType as a function argument

Displaying 20 results from an estimated 500 matches similar to: "[LLVMdev] FunctionType as a function argument"

2010 Nov 29
0
[LLVMdev] FunctionType as a function argument
You need a pointer-to-function type, but FunctionType just gives you a function type. Use PointerType::getUnqual(FunctionType::get(...)). Or TypeBuilder<char (*func)(void*), false>::get(context) from Support/TypeBuilder.h. On Mon, Nov 29, 2010 at 10:37 AM, Salomon Brys <salomon.brys at gmail.com>wrote: > Hi all. > I would like to declare a function that takes a function pointer
2010 Nov 03
4
[LLVMdev] Fw: Forcing the Interpreter segfaults
[I assume you meant to send this to the list as well, not just me.] Begin forwarded message: Date: Wed, 3 Nov 2010 14:43:54 +0000 From: Salomon Brys <salomon.brys at gmail.com> To: Török Edwin <edwintorok at gmail.com> Subject: Re: [LLVMdev] Forcing the Interpreter segfaults I have build LLVM in debug mode. Here are the informations of the segfault : memcpy() at 0x7ffff6f6581e
2010 Nov 03
0
[LLVMdev] Fw: Forcing the Interpreter segfaults
Hi Salomon, please don't forget to reply to the list too (I've CC'd the list). > I don't think my code is doing anything worng... No, it looks fine to me, and the interpreter certainly supports this. That suggests that the value of %str is not being transmitted to the function right. If it is getting the wrong pointer value, that would explain why it barfs. Ciao, Duncan.
2010 Nov 02
2
[LLVMdev] Forcing the Interpreter segfaults
Helps to send to list: On Tue, Nov 2, 2010 at 1:00 PM, OvermindDL1 <overminddl1 at gmail.com> wrote: > On Tue, Nov 2, 2010 at 12:51 PM, Salomon Brys <salomon.brys at gmail.com> wrote: >> Hi everyone ! >> I am very new to LLVM and intent to use it in a research project. >> I have a problem with the interpreter: I have a simple compiler that >> generates LLVM
2010 Nov 02
1
[LLVMdev] Forcing the Interpreter segfaults
Hi everyone ! I am very new to LLVM and intent to use it in a research project. I have a problem with the interpreter: I have a simple compiler that generates LLVM bitcode, JIT it and execute it, and it works very well. Now I would like to execute it using the interpreter. And I get a segfault. Here is the code : // This code JIT the function and executes it llvm::InitializeNativeTarget();
2010 Nov 03
1
[LLVMdev] Forcing the Interpreter segfaults
On Tue, Nov 2, 2010 at 3:36 PM, Salomon Brys <salomon.brys at gmail.com> wrote: > In my case, I am working on a posix regular expression library that uses > LLVM to execute a regular expression. > Each regular expression is a very small sets of code and is faster to > interpret than to JIT then execute. > I wanted to JIT only when the regular expression is executed more than
2010 Nov 02
0
[LLVMdev] Forcing the Interpreter segfaults
In my case, I am working on a posix regular expression library that uses LLVM to execute a regular expression. Each regular expression is a very small sets of code and is faster to interpret than to JIT then execute. I wanted to JIT only when the regular expression is executed more than 20 times. The benchmarks I have run show that my library is amzingly fast to execute a regular expression
2010 Feb 08
1
[LLVMdev] TypeBuilder for const void*
Hi! In Line 230 of llvm\Support\TypeBuilder.h is support for void*: /// void* is disallowed in LLVM types, but it occurs often enough in C code that /// we special case it. template<> class TypeBuilder<void*, false> : public TypeBuilder<types::i<8>*, false> {}; If would be cool if the same thing can be added for const void*: template<> class
2018 Mar 17
1
Migration from 3.8 to 6.0 questions (segfault most concerning)
I'm encountering a few problems in my migration that I haven't yet figured out. `getOrInsertFunction` is generating a SEGFAULT at FunctionType::isValidArgumentType(llvm::Type*).  I'm calling it as:     generic_ptr_ = llvm::PointerType::get( llvm::Type::getInt8Ty(context), 0 );     f_natural_int = llvm::IntegerType::get(context, 64);     module->getOrInsertFunction(        
2009 Aug 25
0
[LLVMdev] Simplifying a front-end project
On Tue, Aug 25, 2009 at 3:01 PM, Vikram S. Adve<vadve at cs.uiuc.edu> wrote: > For my introductory Compiler Construction class, I have been giving > the students a project to write a simple compiler for a toy, single- > inheritance object-oriented language.  We give them a set of classes > implementing an AST for the language and a type checker as well.  The > students write
2009 Aug 25
4
[LLVMdev] Simplifying a front-end project
For my introductory Compiler Construction class, I have been giving the students a project to write a simple compiler for a toy, single- inheritance object-oriented language. We give them a set of classes implementing an AST for the language and a type checker as well. The students write (1) a scanner and parser to build the AST; (2) a translator from AST to LLVM; and (3) a couple of
2004 Oct 07
1
spandsp RxFAX problems.
Hello, Anyone else experiencing problems with the latest spandsp (pre3) and last libtiff beta? I'm getting 8 bytes long file, with the TIFF header only during such connection: -- Accepting call from 'XXXXXXX' to 'YYYYYY' on channel 0/2, span 1 -- Executing SetVar("Zap/2-1", "FAXFILE=/tmp/foch.tif") in new stack -- Executing
2013 Feb 17
2
[LLVMdev] Emitting recursive types
Hi, I'm having a play with LLVM to implement a custom language (for my intellectual curiosity only). I'm wondering how, when using IRBuilder, one can can it to emit a recursive type definition? The code for TypeBuilder explicitly states that it doesn't handle recursive types... I'm after being able to emit, programmatically, stuff like the Named Types example in the Language
2010 Aug 09
3
[LLVMdev] llvm "iword" type
That and the possibility of differently sized pointers made me hesitate to dive into implementing this. I guess nailing it down to be the platform equivalent of size_t would be sensible here. On Mon, Aug 9, 2010 at 1:37 PM, Eugene Toder <eltoder at gmail.com> wrote: > Small nitpick: size_t is not guaranteed to be large enough to hold a > pointer (only an array index, which can be
2009 Nov 05
5
[LLVMdev] llvm-gcc-4.2-2.6 build failed,
I try to build llvm-gcc-4.2-2.6.source before build and install llvm-2.6, the configure is shown bellow ../llvm-gcc-4.2/configure --prefix=/home/ts/program/ --program-prefix=llvm- --enable-llvm=/home/ts/llvm/llvm-2.6 --enable-languages=c,c++ where, it is the path where llvm-2.6 source is stored, -enable-llvm=/home/ts/llvm/llvm-2.6 the "make" gave error message as bellow:
2011 Sep 22
2
[LLVMdev] How to const char* Value for function argument
Hi, I'm trying to replace function call with call to wrapper(function_name, num_args, ...), where varargs hold args of original call. Function* launch = Function::Create( TypeBuilder<int(const char*, int, ...), false>::get(context), GlobalValue::ExternalLinkage, "kernelgen_launch_", m2); { CallInst* call = dyn_cast<CallInst>(cast<Value>(I)); if
2005 Apr 06
3
givenname and email address with smbldap-tools
Hi all, I have setup samba / openldap as describes by the idealx howto and as such I am using the smbldap-tools. However, I would like to add the givenname and email address fields for all users. What is the best way to do this? I would prefer continuing to use the smbldap-tools, but I cannot seem to find a good way to do this. When I try to: $ smbldap-usermod -M testuser@testdomain.net
2010 Aug 09
0
[LLVMdev] llvm "iword" type
I looked through the "intp" thread. I don't really want to start that argument up again, but my immediate thought would be to create a new class of "picked-by-the-target" integer types (equivelents of size_t, intptr_t, etc...), and two new instructions, zcast and scast, which are only valid in the context of casting to / from integer types of unknown sizes. To begin with,
2015 Aug 05
2
[BUG] Incorrect ASCII escape characters on Mac
On Wed, 2015-08-05 at 10:02 -0400, Ramkumar Ramachandra wrote: > > - at 5 = internal global [10 x i8] c"\22\D0\12\F4!\00\15\F9\EC\E1" > - at 6 = internal global [10 x i8] c"\D0\19\FB+\FD\F8#\03\E2\11" > + at 5 = internal global [10 x i8] c"\22Ð\12ô!\00\15ùìá" > + at 6 = internal global [10 x i8] c"Ð\19û+ýø#\03â\11" > > The diff
2011 Apr 05
3
[LLVMdev] inserting a print statement into IR
Hi Everyone, I am trying to construct the print statement : printf("value:%d\n", value); This is my llvm code. It is seg faulting at builder.CreateGlobalStringPtr(str,""). Thanks. George vector<const Type *> params; params.push_back(Type::getInt8PtrTy(M.getContext())); FunctionType *fType = FunctionType::get(Type::getInt32Ty(M.getContext()), params, true); Constant