Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Two important changes to the getelementptr instruction"
2004 Apr 04
0
[LLVMdev] Two important changes to the getelementptr instruction
Hi Chris,
Congrats on getting this taken care of finally. I know its something
you've wanted to do since 1.0.
I have one question. How does LLVM disambiguate between a uint used for
a structure and a uint used for an array? My assumption is that LLVM is
aware of the type of the thing being indexed all the way through the
dereference so it doesn't really matter what index type is being
2004 Apr 05
1
[LLVMdev] Two important changes to the getelementptr instruction
On Sun, 4 Apr 2004, Reid Spencer wrote:
> Congrats on getting this taken care of finally. I know its something
> you've wanted to do since 1.0.
It certainly has been on the grand TODO list for a long time :)
> I have one question. How does LLVM disambiguate between a uint used for
> a structure and a uint used for an array?
It depends on the operand number of the
2002 Sep 25
3
[LLVMdev] question about GetElementPtr Instruction
I have a question about GetElementPtr.
Suppose I have an GetElementPtr Instruction GI:
%reg = getelementptr %ST* %s, uint 1, ubyte 2, ubyte 1, uint
5, uint 13
I want to check if this is the reference of a component of a
structure, how can I do that? Should I check which operand of
this instruction is 'ubyte' type? How can I do that in code?
should I use
ubyte *a =
2002 Sep 26
2
[LLVMdev] question about GetElementPtr Instruction
You are correct, ubyte 2 simply means 3rd element of the structure. This
quantity is always constant (it specifies the field number), so we could
have used any signed or unsigned integer type for it instead of ubyte.
UByte means we are limited to at most 256 structure fields but it also makes
the bytecode representation more compact. (To remove this restriction, we
may migrate to UInt in the
2004 Jun 12
1
[LLVMdev] getelementptr results in seg-fault.
Hi!
Hmm, ok. I'm using the 1.2 release. Found out that it worked when using
long to index getelementptr, but not when using uint, int or ulong. But
then I'll try with the CVS code instead. Thank you.
, Tobias
On Sat, 12 Jun 2004, Reid Spencer wrote:
> Hi Tobias,
>
> I tried your test program on the latest CVS code. Everything worked
> fine.
>
> Can you tell me which
2007 Mar 01
2
[LLVMdev] Version 1.9 SSA form question
int %nlz10(uint %param.x) {
%.t3 = shr uint %param.x, ubyte 1 ; <uint>
[#uses=1]
%.t4 = or uint %.t3, %param.x ; <uint> [#uses=2]
%.t7 = shr uint %.t4, ubyte 2 ; <uint> [#uses=1]
%.t8 = or uint %.t7, %.t4 ; <uint> [#uses=2]
%.t11 = shr uint %.t8, ubyte 4 ; <uint> [#uses=1]
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" =
2005 Jun 20
4
[LLVMdev] variable sized structs in LLVM
Hi LLVM-dev!
I'm having problems figuring out how to do variable sized structs in
LLVM (which are neccessary for PyPy's LLVM backend, on which I'm
working). I'm trying to do the equivalent of
struct array {
long refcount;
long length;
long items[1];
};
in LLVM, where the items array can be arbitrarily long. I guess that the
struct definition should
2002 Sep 14
1
[LLVMdev] MP1: names
Does our pass need to ensure that the new names it creates for the field
allocations are, in fact, unique?
--
Casey Carter
Casey at Carter.net
ccarter at uiuc.edu
AIM: cartec69
2004 Jun 17
2
[LLVMdev] Getelementptr woes
Hello,
I'm having problems with the following LLVM instruction
%tmp.0.i = call int (sbyte*, ...)*
%printf( sbyte* getelementptr ([11 x sbyte]* %.str_1, long 0, ......
The first argument in function call,
sbyte* getelementptr ([11 x sbyte]* %.str_1.....
appears to be ConstantExpression*, and my backend does not support
ConstantExpression yet.
I probable can implement
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
2007 Jan 14
0
[LLVMdev] Request documentation for global var syntax
On Thu, 11 Jan 2007, Schimmel, Mark wrote:
> file://docs/LangRef.html#globalvars
>
> The section describing the definition of global vars discusses that you
> can specify an alignment and can also specify a section. Could someone
> provide an example that works in gccas in release 1.9 for both defining
> which section the var is assigned to and defining the variables
>
2007 Jan 11
3
[LLVMdev] Request documentation for global var syntax
file://docs/LangRef.html#globalvars
The section describing the definition of global vars discusses that you
can specify an alignment and can also specify a section. Could someone
provide an example that works in gccas in release 1.9 for both defining
which section the var is assigned to and defining the variables
alignment?
Also, is there another document that describes how you define sections
2005 Jun 13
2
[LLVMdev] problem compiling the cfrontend on Linux/PPC
> Okay, I took a closer look at your output.
>
> I was correct in that gccas is attempting to assemble a native PPC
> assembly language file. However, this appears to be happening because
> the assembly file is generated by the GCC Makefiles for libgcc2 (in
> llvm-gcc/gcc/config/rs6000/t-ppccomm, I think).
>
> The first thing I would try is Marco's suggestion: add
2004 Jun 12
2
[LLVMdev] getelementptr results in seg-fault.
Hi,
I'm trying to compile and run the following code-snippet:
implementation
uint %fie(uint* %x) {
%e = getelementptr uint* %x, int 1
; %f = load uint* %e
ret uint 3
}
int %main(int %argc, sbyte** %argv) {
%z = malloc uint, uint 10
%g = call uint %fie(uint* %z)
ret int 0
}
But the getelementptr instruction gives a segmentation fault. Have I
misunderstood its use? I
2002 Sep 28
2
[LLVMdev] Directory and library rename:
By request, I've renamed lib/CodeGen/PreSelection to lib/CodeGen/PreOpts
(admittedly this was my choice :-), and the corresponding archive from
preselect to preopt. If you see linker errors saying preselect.o is not
found, this is the reason. This shouldn't happen if you update your entire
tree at once.
--Vikram
2004 Jun 12
0
[LLVMdev] getelementptr results in seg-fault.
Hi Tobias,
I tried your test program on the latest CVS code. Everything worked
fine.
Can you tell me which version of LLVM you're using?
Reid.
On Sat, 2004-06-12 at 08:26, Tobias Nurmiranta wrote:
> Hi,
>
> I'm trying to compile and run the following code-snippet:
>
> implementation
>
> uint %fie(uint* %x) {
> %e = getelementptr uint* %x, int 1
> ;
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
2010 Jul 22
2
[LLVMdev] the generation of getelementptr instruction
Hi all,
I'm reading the language reference of LLVM here: http://llvm.org/docs/LangRef.html#i_getelementptr
In the first example, it shows that the generated IR is supposed to be something like:
%reg = getelementptr %ST* %s, i32 1, i32 2, i32 1, i32 5, i32 13
But when I copied the code and compile it myself (using v2.7), I got five getelementptr instructions, which are just like the equivalent
2002 Sep 29
1
[LLVMdev] the getelementptr noop problem
> so i confess i'm still not clear on what the first index into
> getelementptr is all about.
I'm sure you're not the only one. :) This is one of the wierdest aspects
of LLVM to the unaccustomed.
> it makes perfect sense for an example like
> getelementptr %mystruct * %reg100
> to just return a %mystruct * equivalent to %reg100.
>
> it does *not* make sense to