one question about up reference

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

one question about up reference

lizhuo
 
hi,
I have one question about up reference, why use \nested_level_count in type description.
and have to handle it in HandleUpRefs() (AsmParser/llvmAsmParser.y)  ,

why not just insert type name and return in calcTypeName() (AsmWriter.cpp) ;

As you mention in "How to build recursively type" ,

%mylist = type { %mylist*, int }  is accepted .  

Is it neccessary to use \nested_level_count ?

I'm very thankful if you can give me some C code example to show it .  


        aqex
        [hidden email]
          2005-06-06

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: one question about up reference

Chris Lattner
On Mon, 6 Jun 2005, aqex wrote:

> hi,
> I have one question about up reference, why use \nested_level_count in type description.
> and have to handle it in HandleUpRefs() (AsmParser/llvmAsmParser.y)  ,
>
> why not just insert type name and return in calcTypeName() (AsmWriter.cpp) ;
>
> As you mention in "How to build recursively type" ,
>
> %mylist = type { %mylist*, int }  is accepted .
>
> Is it neccessary to use \nested_level_count ?
>
> I'm very thankful if you can give me some C code example to show it .

Upreferences are used when the symbol table is stripped.  The above type
can be written like this without a name:

  {\2*, int}

This is important because LLVM does not require every type to have a name,
but I wouldn't recommend language front-ends to generate these.

-Chris

--
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Re: one question about up reference

lizhuo
In reply to this post by lizhuo
Chris Lattner,您好!

        I see ,
        Thank you very much !

======= 2005-06-06 23:39:20 您在来信中写道:=======

>On Mon, 6 Jun 2005, aqex wrote:
>> hi,
>> I have one question about up reference, why use \nested_level_count in type description.
>> and have to handle it in HandleUpRefs() (AsmParser/llvmAsmParser.y)  ,
>>
>> why not just insert type name and return in calcTypeName() (AsmWriter.cpp) ;
>>
>> As you mention in "How to build recursively type" ,
>>
>> %mylist = type { %mylist*, int }  is accepted .
>>
>> Is it neccessary to use \nested_level_count ?
>>
>> I'm very thankful if you can give me some C code example to show it .
>
>Upreferences are used when the symbol table is stripped.  The above type
>can be written like this without a name:
>
>  {\2*, int}
>
>This is important because LLVM does not require every type to have a name,
>but I wouldn't recommend language front-ends to generate these.
>
>-Chris
>
>--
>http://nondot.org/sabre/
>http://llvm.cs.uiuc.edu/
>
>_______________________________________________
>LLVM Developers mailing list
>[hidden email]         http://llvm.cs.uiuc.edu
>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>

= = = = = = = = = = = = = = = = = = = =
                       

        致
礼!
 
                                 
        aqex
        [hidden email]
          2005-06-07


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev