similar to: [LLVMdev] Initial problems having installed LLVM

Displaying 20 results from an estimated 6000 matches similar to: "[LLVMdev] Initial problems having installed LLVM"

2004 Mar 28
0
[LLVMdev] Initial problems having installed LLVM
Great, thanks, it solved it! Anders -----Original Message----- From: Chris Lattner <sabre at nondot.org> To: llvmdev at cs.uiuc.edu Date: Fri, 26 Mar 2004 10:08:02 -0600 (CST) Subject: Re: [LLVMdev] Initial problems having installed LLVM On Fri, 26 Mar 2004, Anders Alexandersson wrote: > I have compiled LLVM without errors and try to do a simple hello world > test using the llvmgcc
2004 Apr 02
2
[LLVMdev] Function pointers
OK, I solved it all ( so far :) ), mixing in some load-instructions and called on the result of that, which worked. Here is the skeleton-code: %kernel = type { int ()* } int puts_kernel(){...} ; main() %theKernel = malloc %kernel %puts_kernelPTR = getelementptr %kernel* %theKernel, long 1, ubyte 0 store int ()* %puts_kernel, int ()** %puts_kernelPTR %tmp.11 = load int ()** %puts_kernelPTR
2004 Mar 31
2
[LLVMdev] Function pointers
Hello out there! I am trying to build a table of 2 function poiters by using an array: %kernel = alloca [ 2 x int ()* ] I try to access the first pointer to be able to store location of my first function like this: %function_pointer_1 = getelementptr [2 x int ()* ]* %kernel, long 0, long 0 store int ()* %function_1, int ()* %function_pointer_1 But, I get the error message from llvm-asm:
2004 Apr 01
1
[LLVMdev] Function pointers
Yes! :-) What would I do without you folks?! I am the one trying to build a Ruby compiler prototype, so be prepared for more questions...:) Thanks again! Anders ----- Original Message ----- From: "Chris Lattner" <sabre at nondot.org> To: <llvmdev at cs.uiuc.edu> Sent: Wednesday, March 31, 2004 5:49 PM Subject: Re: [LLVMdev] Function pointers On Wed, 31 Mar 2004, Anders
2004 Apr 02
0
[LLVMdev] Function pointers
I solved that one by substituting alloca into malloc, and forwarded the problem to actually calling the %puts_kernel function via my newly created function pointer. This works: %tmp.1 = call int %puts_kernel() This: %tmp.2 = call int %puts_kernelPTR() issues error: "Reference to an invalid definition: 'puts_kernelPTR' of type 'int () *'" How do I call the function
2004 Apr 02
0
[LLVMdev] Function pointers
So, here comes the next question:) Now the program compiles, but crashes when run, "Segmentation fault". %kernel = type { int ()* } int %puts_kernel() { ret int 0 } int %main() { %theKernel = alloca %kernel %puts_kernelPTR = getelementptr %kernel* %theKernel, long 1, ubyte 0 store int ()* %puts_kernel, int ()** %puts_kernelPTR ret int 0 } I want to learn how to
2004 May 05
2
[LLVMdev] Not allowed to reuse variables?
Hello! I am having trouble with identifiers: %tmpFunction = load int ()** %puts_kernelPTR ... %tmpFunction = load int ()** %puts_kernelPTR generates Redefinition of value named 'tmpFunction' in the 'int () *' type plane! Is it not allowed to reuse variables? Is there some way to do it? Anders ---------------------------------------------------------------- Anders
2004 Mar 31
0
[LLVMdev] Function pointers
On Wed, 31 Mar 2004, Anders Alexandersson wrote: > Hello out there! > > I am trying to build a table of 2 function poiters by using an array: > > %kernel = alloca [ 2 x int ()* ] > > I try to access the first pointer to be able to store location of my first function like this: > > %function_pointer_1 = getelementptr [2 x int ()* ]* %kernel, long 0, long 0 > >
2004 Feb 24
2
[LLVMdev] Beginners question
Hello! I am doing some pre-studies for my masters thesis, which (hopefully) will result in a compiler prototype for Ruby to LLVM, and I have a question: 1. When reading the reference manual, I do not understand how e.g. simple I/O operations as printf() can be implemented in LLVM. Are there any external functions available, or how do I proceed? Kind regards Anders
2004 Apr 02
0
[LLVMdev] Function pointers
On Fri, 2 Apr 2004, Anders Alexandersson wrote: > OK, I solved it all ( so far :) ), mixing in some load-instructions and > called on the result of that, which worked. > > Here is the skeleton-code: > > %kernel = type { int ()* } > > int puts_kernel(){...} > > ; main() > > %theKernel = malloc %kernel > %puts_kernelPTR = getelementptr %kernel* %theKernel,
2004 May 03
2
[LLVMdev] Problems with getelementptr
Hello! I'm having trouble with pointer traversing. I have a design as follows: class -> map -> classFunctions Starting with a pointer to the class, I want to get a pointer to a classFunction via a pointer to the map. I can't get that function pointer! How shall I think to get the traversing right (see code below)? Is it something with the fact that I am using only pointers in my
2004 Apr 19
1
[LLVMdev] Dynamic updates of current executed code
Hello! I saw that you just got the recent llvm paper published in IEEE! Congratulations! :-) More issues regarding the Ruby compiler: Ruby supports the possibility of the user to enter new Ruby code during execution, after which it is executed. Also, all classes are open, meaning that a user is able to redefine a class overriding or replacing methods therein at run-time (this is deep...). My
2004 May 11
2
[LLVMdev] Problems accessing structs
Hello! I get some odd behaviour using my structs: "myKernelMap" = type {int (sbyte*)*, int ()*} "Kernel" = type {"myKernelMap"*} The second member ( int()* ) is a pointer to the %getchar() function. I want to call getchar using this function: int "callmyKernelgetchar_kernel"("Kernel"* "myKernel") { "PTRMAP" =
2004 May 11
1
[LLVMdev] Follow-up on: Dynamic updates of current executed code
Hello! I am coming back to the below discussion again, regarding the LLVM support of Ruby dynamics. The initial problem description is as follow, to refresh your memory :) After that my questions come: -----------BEGIN Initial problem description--------------- Problem is though, that the Ruby compiler is integrated in the compilation of the program being executed, to be able to parse &
2004 Apr 20
2
[LLVMdev] Dynamic updates of current executed code
Thanks! Problem is though, that the Ruby compiler is integrated in the compilation of the program being executed, to be able to parse & compile dynamic code at run-time. Therefore the calls to ExecutionEngine::getPointerToGlobal(F) need to be made in LLVM code. Here is a detailed simplistic example in pseudocode of what we want to do: First Ruby code is entered at run-time, received as a
2004 May 11
0
[LLVMdev] Problems accessing structs
Anders Alexandersson wrote: > Hello! > > I get some odd behaviour using my structs: > > "myKernelMap" = type {int (sbyte*)*, int ()*} > "Kernel" = type {"myKernelMap"*} > > The second member ( int()* ) is a pointer to the %getchar() function. > > I want to call getchar using this function: > > int
2004 Dec 22
3
[LLVMdev] README: Build Environment Changes
LLVMers, If you're not working from the CVS "head", you can ignore this. Otherwise, please read it! I have committed changes to CVS head that require changes to your build environment. This is part of PR432. The changes involve getting the CFE to build an executable named llvm-gcc instead of gcc. The hyphenated name was chosen to be consistent with other LLVM tools, it is also
2004 May 01
0
[LLVMdev] opt, llcc, ll++, -O1, -O2, -O3
On Sat, 1 May 2004, [koi8-r] "Valery A.Khamenya[koi8-r] " wrote: > there are two issues concerning invoking optimizations: > > 1. > this document: > http://llvm.cs.uiuc.edu/docs/GettingStarted.html > is very nice, it would be good though to add in a section > > An Example Using the LLVM Tool Chain > > examples on optimization step. That's an
2004 Jun 22
3
[LLVMdev] Qestion about running LLVM
Hi, I'm a newbie and just installed LLVM on a Linux box. I followe "The LLVM Getting Started Guide" on the web and have some trouble on the section "An Example Using the LLVM Tool Chain". When I compile the simple hello.c program with "llvmgcc hello.c -o hello", the system complains -- gcc: installation problem, cannot exec `gccas': Permission denied. Does
2004 Jul 28
0
[LLVMdev] Compiler Driver [high-level comments]
On Wed, 28 Jul 2004, Reid Spencer wrote: > 2. MODE OF OPERATION > ==================== > The driver will simply read its command line arguments, read its > configuration data, and invoke the compilation, linking, and > optimization tools necessary to complete the user's request. Its basic I'm not sure that I agree with this. Compilers need to be extremely predictable and