This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Simple RTL question (was: New cfg code)


> For fun I was trying to understand this example and had a quick question that
> I couldn't answer in the docs:
> 
>  jeff> (code_label 80 79 81 15 "" [num uses: 2])
> 
> In the info docs, it says that (code_label) has two extra fields -
> CODE_LABEL_NUMBER and LABEL_NUSES.  The label number appears to be 15 and the
> number of uses is 2.  What is the empty string?  Is it actually part of the
> rtl expression or an artifact of printing?  I'm guessing it contains the
> string assigned to the code label, but wanted verification.

All the rtl expressions are defined (and documented) in the rtl.def file.
The section for CODE_LABEL is this:
/* Holds a label that is followed by instructions.
   Operand:
   3: is a number that is unique in the entire compilation.
   4: is the user-given name of the label, if any.
   5: is used in jump.c for the use-count of the label.
   6: is used in flow.c to point to the chain of label_ref's to this label.  */

The string will be non-empty for user-declared labels, empty for internally
generated ones.  You can access it with the LABEL_NAME macro.

Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]