similar to: [LLVMdev] Operations on constant array value?

Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] Operations on constant array value?"

2010 Jan 11
0
[LLVMdev] Operations on constant array value?
Does the C API have an equivalent of stack storage? Via the C++ APIs one can shove the string constant on the stack via a store instruction operation on an alloca instruction--the address needed is the alloca. For example: llvm::Value* stringVar = builder.CreateAlloca(stringConstant->getType()); builder.CreateStore(stringConstant, stringVar); The stringVar is your address. Garrison On Jan
2010 Jan 11
2
[LLVMdev] Operations on constant array value?
2010/1/11 Eli Friedman <eli.friedman at gmail.com> > On Mon, Jan 11, 2010 at 7:07 AM, James Williams <junk at giantblob.com> > wrote: > > Hi, > > > > I've read http://llvm.org/docs/LangRef.html#t_array and > > http://llvm.org/docs/GetElementPtr.html and if I've understood right > there > > are no operations that act directly on arrays -
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
On Mon, Jan 11, 2010 at 7:07 AM, James Williams <junk at giantblob.com> wrote: > Hi, > > I've read http://llvm.org/docs/LangRef.html#t_array and > http://llvm.org/docs/GetElementPtr.html and if I've understood right there > are no operations that act directly on arrays - instead I need to use > getelementptr on a pointer to an array to get a pointer to an array
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
I have not tried this, but a linkage type of PrivateLinkage would not add to the symbol table according to the doc. LLVMSetLinkage(g, LLVMPrivateLinkage); Garrison On Jan 11, 2010, at 14:03, James Williams wrote: > 2010/1/11 Eli Friedman <eli.friedman at gmail.com> > On Mon, Jan 11, 2010 at 7:07 AM, James Williams <junk at giantblob.com> wrote: > > Hi, > > >
2010 Jan 11
2
[LLVMdev] Operations on constant array value?
2010/1/11 Garrison Venn <gvenn.cfe.dev at gmail.com> > I have not tried this, but a linkage type of PrivateLinkage would not add > to the symbol table according > to the doc. > > LLVMSetLinkage(g, LLVMPrivateLinkage); > Thanks - I hadn't thought of that. > > Garrison > > On Jan 11, 2010, at 14:03, James Williams wrote: > > 2010/1/11 Eli Friedman
2009 Nov 05
2
[LLVMdev] Strange error for libLLVMCore.a
mingw, llvm 2.6 (buid with llvm-gcc) Example source code: http://npcontemplation.blogspot.com/2008/06/secret-of-llvm-c-bindings.html I change LLVMCreateJITCompiler(&engine, provider, &error); to LLVMCreateJITCompiler(&engine, provider, 3, &error); $ llvm-gcc `llvm-config --cflags` -c fac.c $ g++ `llvm-config --libs --cflags --ldflags core analysis executionengine jit
2017 Jan 25
2
mcjit C interface problems
Hi, I'm attempting to use MCJIT with the C interface with llvm-3.9.0, and it doesn't seem to work. This code is derived from Paul Smith's example code: int main(int argc, char const* argv[]) { LLVMModuleRef mod = LLVMModuleCreateWithName("my_module"); LLVMTypeRef param_types[] = {LLVMInt32Type(), LLVMInt32Type()}; LLVMTypeRef ret_type =
2009 Nov 05
0
[LLVMdev] Strange error for libLLVMCore.a
you want to use the execution engine and JIT but do not put them in the llvm-config line?? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091106/d26a0a02/attachment.html>
2010 Sep 07
0
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
On Sep 7, 2010, at 8:03 AM, F van der Meeren wrote: > Hello, > > I have a question, what is wrong with the following code? > > declare void @llvm.memcpy.p0i64.p0i64.i8(i64*, i64*, i8, i32, i1) nounwind > > ... > > call void @llvm.memcpy.p0i64.p0i64.i8(i64* %19, i64* %21, i8 %17, i32 0, i1 false) > > ... > > > According to the compiler this is the
2012 Sep 27
0
[LLVMdev] Possible bug or misunderstanding of feature LLVMConstIntOfString
Hi All I am a novice LLVM user trying to use LLVMConstIntOfString using the c api to get a integer of arbitrary size from a hexadecimal string. Example code follows: LLVMContextRef context = LLVMContextCreate(); LLVMValueRef value = LLVMConstIntOfString(LLVMInt64TypeInContext(context), "0x0000000f0000ffff", 16); This is working properly as expected. However I have noticed that
2010 Sep 07
4
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
Hello, I have a question, what is wrong with the following code? declare void @llvm.memcpy.p0i64.p0i64.i8(i64*, i64*, i8, i32, i1) nounwind ... call void @llvm.memcpy.p0i64.p0i64.i8(i64* %19, i64* %21, i8 %17, i32 0, i1 false) ... According to the compiler this is the error, but I seem to miss where exactly my fault is. Intrinsic prototype has incorrect number of arguments! void (i64*,
2011 Jun 18
1
[LLVMdev] loop only executes once
Hello, I'm trying to get to grips with the c interface of llvm intending to eventually develop a front end for Purebasic Though I've hit the wall already writing an iterative Fibonacci function. While I think the module dump looks ok it doesn't work for any input > 2 the function returns 2, the loop only executes once Hopefully someone can see what the problem is from the
2006 Dec 29
2
Binary AGI Scripts
Hi Everyone, I'm wondering if anyone here write AGI's in compiled binaries. I'm writing a small Cepstral AGI in Freepascal/Lazarus. I know there are some other AGI's out there, but I wanted to add some more functionality than what is available such as having the AGI determine if the "data" argument is plain text or a path to a text file and act accordingly. The
2010 Jan 11
0
[LLVMdev] Operations on constant array value?
Sorry to keep this thread alive, but I'm learning so ... There is more. The doc for GlobalValue::LinkageTypes or the C API LLVMLinkage is not as clear as the lang ref manual. See: http://llvm.org/docs/LangRef.html#linkage. I'm pointing this out because something like LinkerPrivateLinkage (LLVMLinkerPrivateLinkage), or another one, might be more appropriate to your throw away use case (if
2020 Feb 19
2
Poor write performance with golang binding
Hi, I scribbled a simple guestfs based program called guestfs-xfer with following synopsis: Usage: guest-xfer [options] [op] [diskimage] op = [ls|cat|write] options: -d, --guestdevice DEV guest device --blocksize BS blocksize [default: 1048576] -o, --offset OFF offset [default: 0] So eg. `cat /dev/urandom | guest-xfer -d /dev/sda
2008 May 22
3
[LLVMdev] How to get a return type of a function with LLVM-C API
Hi LLVM-ers, I am trying to 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 //
2008 May 22
0
[LLVMdev] How to get a return type of a function with LLVM-C API
Hi Syoyo, > I am trying to get a return type of a function(from bitcode file) with > LLVM-C API, but there seems no appropriate API to do that. From my memory, this info is stored in the function type, so you could look at the function's type and get the info there. Looking the the API docs [1], I find that there is a simple method on Function called getReturnType(). You should thus be
2013 May 05
0
[LLVMdev] llvm-c: Types of functions
Hi All, I'm beginning to learn & explore the LLVM API via the C bindings. Am running into some troubles but at the moment cannot tell if this is just my misunderstanding/misuse of the API, or a bug somewhere. I have a bitcode file generated with 'clang --emit-llvm' and I know this is good because I can run the 'test' function inside with lli, no problems. However I run
2017 Jan 26
2
mcjit C interface problems
Thanks for the tip - getting closer: $ ./capi_test 5 6 args[0]: 5 args[1]: 6 result: 4294959200 Here's the code I changed: printf("args[0]: %d\n", (int)LLVMGenericValueToInt(args[0], 0)); printf("args[1]: %d\n", (int)LLVMGenericValueToInt(args[1], 0)); uint64_t (*func)(); func = (uint64_t (*)())LLVMGetFunctionAddress(engine, "sum");
2010 Sep 07
2
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
I have created the function prototype with the following code: const uintmax_t methodNameSize = 1024; const char methodNameTemplate[] = "llvm.memcpy.p0i%llu.p0i%llu.i%llu"; char methodName[methodNameSize]; // Create the methodName. memset(methodName, 0, methodNameSize); sprintf(methodName, methodNameTemplate, dstSize, srcSize, lengthSize); // Search for the