This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Preserve labels for the life of Compliation
- From: "Iyer, Balaji V" <balaji dot v dot iyer at intel dot com>
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Date: Tue, 29 Nov 2011 11:52:12 -0700
- Subject: Preserve labels for the life of Compliation
Hello Everyone,
I would like to insert labels at certain instances of the program as a marker and then print them out at a separate section at the end of the assembly file. I am able to do that but the garbage collector seem to be deleting the labels. Is it possible for me to stop this?
The way I am creating the labels are doing the following:
new_label = gen_label_rtx ()
LABEL_PRESERVE_P (new_label) = 1;
INSN_UID (new_label) = ctrl->emit.x_cur_insn_uid++;
LABEL_NUSES(new_label) = 1;
Is there any other tag I can add to make sure the garbage collector doesn't touch it?
Thanks,
Balaji V. Iyer.