search for: simplestruct

Displaying 5 results from an estimated 5 matches for "simplestruct".

2002 Sep 17
3
[LLVMdev] questions
Sorry I got really overwhelmed by so many classes and member functions in LLVM. So would you please clarify some problems I have? 1. If I see this instruction in the function. %S.i = alloca %struct.SimpleStruct Suppose SimpleStruct is as following: struct.SimpleStruct = type { int, double } When I read the instruction, how can I know the type of simplstruct, should I use 'getType' member function like Inst.getType()? If I use that, I will get a PointerType, how can I use it? 2. Another question...
2002 Sep 17
0
[LLVMdev] questions
Also sprach xli3 at uiuc.edu: } Sorry I got really overwhelmed by so many classes and member } functions in LLVM. So would you please clarify some problems } I have? } } 1. If I see this instruction in the function. } } %S.i = alloca %struct.SimpleStruct } } Suppose SimpleStruct is as following: } struct.SimpleStruct = type { int, double } } } When I read the instruction, how can I know the type of } simplstruct, should I use 'getType' member function like } Inst.getType()? If I use that, I will get a PointerType, how } can I use it? } I...
2002 Sep 17
1
[LLVMdev] #uses
When I use the llvm to print out the code, it actually gives out the number of uses for each variable, for example, I get lines like this: %S.i = alloca %struct.SimpleStruct ; <%struct.SimpleStruct*> [#uses=3] or this %cast216.i = getelementptr %struct.SimpleStruct* %S.i, long 0, ubyte 0 ; <int*> [#uses=1] My question is how the program knows about the number of uses. If I want to check all the future uses of this variable, say %S.i. Is...
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
2002 Sep 27
0
[LLVMdev] Another question about GetElementPtr Instruction
Hi, I've another question about getelementptr. So, in the twisted mind of my little pass, I have a statement like this: %reg228-mod = getelementptr %struct.SimpleStruct* %N.1, long 0 ; <%struct.SimpleStruct*> [#uses=2] I'm not sure of the semantics of %a = getelementptr %b, long 0. I want to think that it is some kind of weird identity (no-op), judging from the operand type and the result type that is printed out by llvm. In this sense I supp...