defaults.h (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Provide default.
* defaults.h (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Provide default. * emit-rtl.c (gen_label_rtx): Support LABEL_ALTERNATE_NAME. * final.c (final_scan_insn): Emit LABEL_ALTERNATE_NAME. * ggc-common.c (ggc_mark_rtx_children): Mark LABEL_ALTERNATE_NAME. * jump.c (delete_unreferenced_labels): Don't delete if LABEL_ALTERNATE_NAME is set. * print-rtl.c (print_rtx): Dump alternate name. * rtl.def (CODE_LABEL): Change format to "iuuis00s". * rtl.h (LABEL_ALTERNATE_NAME): Define. * rtl.texi (LABEL_ALTERNATE_NAME): Document. * tm.texi (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Document. From-SVN: r30382
This commit is contained in:
parent
1e30f9b4da
commit
8cd0faaf32
@ -1,3 +1,17 @@
|
||||
Wed Nov 3 15:40:23 1999 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* defaults.h (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Provide default.
|
||||
* emit-rtl.c (gen_label_rtx): Support LABEL_ALTERNATE_NAME.
|
||||
* final.c (final_scan_insn): Emit LABEL_ALTERNATE_NAME.
|
||||
* ggc-common.c (ggc_mark_rtx_children): Mark LABEL_ALTERNATE_NAME.
|
||||
* jump.c (delete_unreferenced_labels): Don't delete if
|
||||
LABEL_ALTERNATE_NAME is set.
|
||||
* print-rtl.c (print_rtx): Dump alternate name.
|
||||
* rtl.def (CODE_LABEL): Change format to "iuuis00s".
|
||||
* rtl.h (LABEL_ALTERNATE_NAME): Define.
|
||||
* rtl.texi (LABEL_ALTERNATE_NAME): Document.
|
||||
* tm.texi (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Document.
|
||||
|
||||
Wed Nov 3 15:39:19 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* fix-header.c (recognized_extern, recognized_function): Constify
|
||||
|
@ -54,6 +54,12 @@ do { fprintf (FILE, "\t%s\t", ASM_LONG); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
/* Provide default for ASM_OUTPUT_ALTERNATE_LABEL_NAME. */
|
||||
#ifndef ASM_OUTPUT_ALTERNATE_LABEL_NAME
|
||||
#define ASM_OUTPUT_ALTERNATE_LABEL_NAME(FILE,INSN) \
|
||||
fprintf (FILE, "%s:\n", LABEL_ALTERNATE_NAME (INSN))
|
||||
#endif
|
||||
|
||||
/* choose a reasonable default for ASM_OUTPUT_ASCII. */
|
||||
|
||||
#ifndef ASM_OUTPUT_ASCII
|
||||
|
@ -1523,9 +1523,10 @@ gen_label_rtx ()
|
||||
register rtx label;
|
||||
|
||||
label = gen_rtx_CODE_LABEL (VOIDmode, 0, NULL_RTX,
|
||||
NULL_RTX, label_num++, NULL_PTR);
|
||||
NULL_RTX, label_num++, NULL_PTR, NULL_PTR);
|
||||
|
||||
LABEL_NUSES (label) = 0;
|
||||
LABEL_ALTERNATE_NAME (label) = NULL;
|
||||
return label;
|
||||
}
|
||||
|
||||
|
11
gcc/final.c
11
gcc/final.c
@ -2418,14 +2418,19 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
|
||||
ASM_OUTPUT_CASE_LABEL (file, "L", CODE_LABEL_NUMBER (insn),
|
||||
NEXT_INSN (insn));
|
||||
#else
|
||||
ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (insn));
|
||||
if (LABEL_ALTERNATE_NAME (insn))
|
||||
ASM_OUTPUT_ALTERNATE_LABEL_NAME (file, insn);
|
||||
else
|
||||
ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (insn));
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (insn));
|
||||
if (LABEL_ALTERNATE_NAME (insn))
|
||||
ASM_OUTPUT_ALTERNATE_LABEL_NAME (file, insn);
|
||||
else
|
||||
ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (insn));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -252,6 +252,7 @@ ggc_mark_rtx_children (r)
|
||||
break;
|
||||
case CODE_LABEL:
|
||||
ggc_mark_rtx (LABEL_REFS (r));
|
||||
ggc_mark_string (LABEL_ALTERNATE_NAME (r));
|
||||
break;
|
||||
case LABEL_REF:
|
||||
ggc_mark_rtx (LABEL_NEXTREF (r));
|
||||
|
@ -2433,7 +2433,9 @@ delete_unreferenced_labels (f)
|
||||
|
||||
for (insn = f; insn; )
|
||||
{
|
||||
if (GET_CODE (insn) == CODE_LABEL && LABEL_NUSES (insn) == 0)
|
||||
if (GET_CODE (insn) == CODE_LABEL
|
||||
&& LABEL_NUSES (insn) == 0
|
||||
&& LABEL_ALTERNATE_NAME (insn) == NULL)
|
||||
insn = delete_insn (insn);
|
||||
else
|
||||
{
|
||||
|
@ -354,7 +354,11 @@ print_rtx (in_rtx)
|
||||
#endif
|
||||
|
||||
if (GET_CODE (in_rtx) == CODE_LABEL)
|
||||
fprintf (outfile, " [num uses: %d]", LABEL_NUSES (in_rtx));
|
||||
{
|
||||
fprintf (outfile, " [num uses: %d]", LABEL_NUSES (in_rtx));
|
||||
if (LABEL_ALTERNATE_NAME (in_rtx))
|
||||
fprintf (outfile, " [alternate name: %s]", LABEL_ALTERNATE_NAME (in_rtx));
|
||||
}
|
||||
|
||||
if (dump_for_graph
|
||||
&& (is_insn || GET_CODE (in_rtx) == NOTE
|
||||
|
@ -376,8 +376,9 @@ DEF_RTL_EXPR(BARRIER, "barrier", "iuu", 'x')
|
||||
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. */
|
||||
DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuuis00", 'x')
|
||||
6: is used in flow.c to point to the chain of label_ref's to this label.
|
||||
7: is the alternate label name. */
|
||||
DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuuis00s", 'x')
|
||||
|
||||
/* Say where in the code a source line starts, for symbol table's sake.
|
||||
Contains a filename and a line number. Line numbers <= 0 are special:
|
||||
|
@ -597,6 +597,9 @@ extern const char * const note_insn_name[];
|
||||
of LABEL_REFs that point at it, so unused labels can be deleted. */
|
||||
#define LABEL_NUSES(RTX) XCINT(RTX, 5, CODE_LABEL)
|
||||
|
||||
/* Associate a name with a CODE_LABEL. */
|
||||
#define LABEL_ALTERNATE_NAME(RTX) XCSTR(RTX, 7, CODE_LABEL)
|
||||
|
||||
/* The original regno this ADDRESSOF was built for. */
|
||||
#define ADDRESSOF_REGNO(RTX) XCINT(RTX, 1, ADDRESSOF)
|
||||
|
||||
|
@ -2384,6 +2384,11 @@ The field @code{LABEL_NUSES} is only defined once the jump optimization
|
||||
phase is completed and contains the number of times this label is
|
||||
referenced in the current function.
|
||||
|
||||
@findex LABEL_ALTERNATE_NAME
|
||||
The field @code{LABEL_ALTERNATE_NAME} is used to associate a name with
|
||||
a @code{code_label}. If this field is defined, the alternate name will
|
||||
be emitted instead of an internally generated label name.
|
||||
|
||||
@findex barrier
|
||||
@item barrier
|
||||
Barriers are placed in the instruction stream when control cannot flow
|
||||
|
11
gcc/tm.texi
11
gcc/tm.texi
@ -5736,6 +5736,17 @@ The usual definition of this macro is as follows:
|
||||
fprintf (@var{stream}, "L%s%d:\n", @var{prefix}, @var{num})
|
||||
@end example
|
||||
|
||||
@findex ASM_OUTPUT_ALTERNATE_LABEL_NAME
|
||||
@item ASM_OUTPUT_ALTERNATE_LABEL_NAME (@var{stream}, @var{string})
|
||||
A C statement to output to the stdio stream @var{stream} the string
|
||||
@var{string}.
|
||||
|
||||
The default definition of this macro is as follows:
|
||||
|
||||
@example
|
||||
fprintf (@var{stream}, "%s:\n", LABEL_ALTERNATE_NAME (INSN))
|
||||
@end example
|
||||
|
||||
@findex ASM_GENERATE_INTERNAL_LABEL
|
||||
@item ASM_GENERATE_INTERNAL_LABEL (@var{string}, @var{prefix}, @var{num})
|
||||
A C statement to store into the string @var{string} a label whose name
|
||||
|
Loading…
Reference in New Issue
Block a user