Labeling of blocks and locals

Dibyendu Majumdar mobile@majumdar.org.uk
Thu Jan 1 00:00:00 GMT 2015


It seems that if a name is supplied to a block it is translated as a
label - but then if the same name is supplied to two blocks the labels
show up as the same.

In LLVM the block labels are automatically made unique - the user
supplied name is suffixed with a unique integer value. This is useful
as one can use meaningful labels without having to worry about making
the labels unique.

As it stands I would have to ensure unique label names before I could use them.

A similar question involves naming of locals. When I declare a local
and assign it a name - the name is not made unique. During code
generation whenever certain types of statements are processed, local
variables may be generated. These are given the same name - in LLVM
the names are automatically made unqiue, but I notice that in
libgccjit this is not so.

Of course I can work around this by creating unique label and local
names myself but that is an unnecessary pain.

Is it possible to consider changing this behaviour?


Thanks and Regards
Dibyendu



More information about the Jit mailing list