Displaying 12 results from an estimated 12 matches similar to: "[LLVMdev] Problems accessing structs"
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 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 May 03
0
[LLVMdev] Problems with getelementptr
On Mon, 3 May 2004, Anders Alexandersson wrote:
> 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.
Okay...
> I can't get that function pointer!
>
> How shall I think to get
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 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 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 May 05
0
[LLVMdev] Not allowed to reuse variables?
On Wed, May 05, 2004 at 03:35:46PM +0200, Anders Alexandersson wrote:
> %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?
LLVM uses the Static
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
2017 Jun 22
2
Legal names for Functions and other Identifiers
Thank You Chen !
On Thu, Jun 22, 2017 at 5:21 PM 陳韋任 <chenwj.cs97g at g2.nctu.edu.tw> wrote:
> Perhaps you can refer to [1]. Function name should be a global one.
>
> [1] http://llvm.org/docs/LangRef.html#identifiers
>
> HTH,
> chenwj
>
>
> 2017-06-22 16:35 GMT+08:00 SANJAY SRIVALLABH SINGAPURAM via llvm-dev <
> llvm-dev at lists.llvm.org>:
>
>>
2017 Jun 22
2
Legal names for Functions and other Identifiers
Thanks for the heads up Philip !
I did come across a strange case where LLVM allowed "%" to be a part of a
function's name. This was in the context of my patch
https://reviews.llvm.org/D33985, where I prefix the name of the source
function and the Scop ( A special kind of Region that Polly can optimize,
the name of the Scop is the name of the Region ) to the name of the PTX
kernel
2017 Mar 12
2
What does it mean by a "DICompileUnit missing from llvm.dgs.cu" ? | Where is the error ?
On Sat, Mar 11, 2017, at 07:34 PM, David Blaikie via llvm-dev wrote:
> On Sat, Mar 11, 2017 at 3:10 AM SANJAY SRIVALLABH SINGAPURAM via llvm-dev
> <
> llvm-dev at lists.llvm.org> wrote:
>
> > Hello,
> >
> > One of my Julia programs failed to execute with the following error,
> > DICompileUnit not listed in llvm.dbg.cu
> > !11 = distinct