On 09/24/14 04:35, Steven Bosscher wrote:
According to description you quoted label marked by LABEL_PRESERVE_P
is used by some code or data. Let this use be not visible to the RTL
of a given function. It is still used, right? How can you remove it?
The code_label rtx is removed, but the label itself is still output to
the object file. The label number is retained in the CODE_LABEL_NUMBER
of the NOTE_INSN_DELETED_LABEL. Look for how NOTE_INSN_DELETED_LABEL
is handled in final.c. It's a hack IMHO, but that's how it has been
since day 0 (see https://gcc.gnu.org/r104).
Right. We transform it into a NOTE_INSN_DELETED_LABEL, but still output
it into the assembly code. There's one other intereseting aspect here
-- IIRC, we allow NOTE_INSN_DELETED_LABELs to move around the insn
stream. My recollection was we may move them from between two blocks to
the start of a block to facilitate block merging.
Basically the LABEL_PRESERVE_P ensures the label gets output in the
assembly code. THe docs could possibly use some clarification.
Jeff