summaryrefslogtreecommitdiff
path: root/gcc/print-rtl.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-12 16:26:15 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-12 16:26:15 +0000
commit74b0991dfaf52eb1f152e64b4afc0d1cb05ddc28 (patch)
treed0c01aedfa0c100dbc8cf6e908311acdea960127 /gcc/print-rtl.c
parent27d1c59cbab6ccce71a1a15d1e0471c6850dc50b (diff)
downloadgcc-74b0991dfaf52eb1f152e64b4afc0d1cb05ddc28.tar.gz
* Makefile.in (final.o): Depend on BASIC_BLOCK_H.
* final.c (final_end_function): Use app_disable. Rearrange note handling into a switch. Emit deleted labels. (output_asm_label): Generate label strings for deleted labels. * flow.c (tail_recursion_label_list): New. (find_basic_blocks_1): Set label_value_list directly. Collect list of tail recursion labels from call_placeholders. Don't add deleted labels to the label value list. (cleanup_cfg): Use free_EXPR_LIST_list. (flow_delete_insn_chain): Turn non-removable labels into notes. (flow_delete_block): Don't disable deleting the block because of a non-removable label. (tail_recursion_label_p): New. (merge_blocks_move_predecessor_nojumps): Don't disable the merge because of a label. (merge_blocks_move_successor_nojumps): Likewise. Also move a jump table. (merge_blocks): Disable a merge because of tail recursion labels. * ifcvt.c (merge_if_block): Don't disable a merge because of a label. Use a more accurate measure of not merging the join block. (find_if_block): Don't disable conversion because of a label. (find_if_case_1, find_if_case_2): Likewise. * jump.c (duplicate_loop_exit_test): Preserve the kind of list element when copying. (squeeze_notes): Also leave EH notes. (mark_jump_label): Ignore deleted labels. Use an INSN_LIST for REG_LABEL notes. (delete_insn): Preserve LABEL_NAME in NOTE_SOURCE_FILE when deleting a label. * print-rtl.c (print_rtx): Print NOTE_SOURCE_FILE for NOTE_INSN_DELETED_LABEL. Print `[# deleted]' for a label_ref referring to a deleted label. Convert tail handling to a switch. * rtl.def (CODE_LABEL): Rearrange elements to be compatible with NOTE for NOTE_INSN_DELETED_LABEL. (NOTE): Fix commentary. * rtl.h (REG_LABEL): Update commentary wrt INSN_LIST. (REG_CC_SETTER, REG_CC_USER, REG_LIBCALL): Likewise. (CODE_LABEL_NUMBER, LABEL_NAME): Update index. (LABEL_NUSES, LABEL_REFS): Likewise. * unroll.c (copy_loop_body): Don't copy NOTE_INSN_DELETED_LABEL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33876 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-rtl.c')
-rw-r--r--gcc/print-rtl.c74
1 files changed, 52 insertions, 22 deletions
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 140ac36bdb7..d8008380215 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -210,6 +210,13 @@ print_rtx (in_rtx)
indent -= 2;
break;
+ case NOTE_INSN_DELETED_LABEL:
+ if (NOTE_SOURCE_FILE (in_rtx))
+ fprintf (outfile, " (\"%s\")", NOTE_SOURCE_FILE (in_rtx));
+ else
+ fprintf (outfile, " \"\"");
+ break;
+
default:
{
const char * const str = X0STR (in_rtx, i);
@@ -334,11 +341,25 @@ print_rtx (in_rtx)
rtx sub = XEXP (in_rtx, i);
enum rtx_code subc = GET_CODE (sub);
- if (GET_CODE (in_rtx) == LABEL_REF && subc != CODE_LABEL)
- goto do_e;
+ if (GET_CODE (in_rtx) == LABEL_REF)
+ {
+ if (subc == NOTE
+ && NOTE_LINE_NUMBER (sub) == NOTE_INSN_DELETED_LABEL)
+ {
+ if (flag_dump_unnumbered)
+ fprintf (outfile, " [# deleted]");
+ else
+ fprintf (outfile, " [%d deleted]", INSN_UID (sub));
+ sawclose = 0;
+ break;
+ }
+
+ if (subc != CODE_LABEL)
+ goto do_e;
+ }
if (flag_dump_unnumbered)
- fputc ('#', outfile);
+ fputs (" #", outfile);
else
fprintf (outfile, " %d", INSN_UID (sub));
}
@@ -372,34 +393,43 @@ print_rtx (in_rtx)
abort ();
}
- if (GET_CODE (in_rtx) == MEM)
- fprintf (outfile, " %d", MEM_ALIAS_SET (in_rtx));
+ switch (GET_CODE (in_rtx))
+ {
+ case MEM:
+ fprintf (outfile, " %d", MEM_ALIAS_SET (in_rtx));
+ break;
#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && MAX_LONG_DOUBLE_TYPE_SIZE == 64
- if (GET_CODE (in_rtx) == CONST_DOUBLE && FLOAT_MODE_P (GET_MODE (in_rtx)))
- {
- double val;
- REAL_VALUE_FROM_CONST_DOUBLE (val, in_rtx);
- fprintf (outfile, " [%.16g]", val);
- }
+ case CONST_DOUBLE:
+ if (FLOAT_MODE_P (GET_MODE (in_rtx)))
+ {
+ double val;
+ REAL_VALUE_FROM_CONST_DOUBLE (val, in_rtx);
+ fprintf (outfile, " [%.16g]", val);
+ }
+ break;
#endif
- if (GET_CODE (in_rtx) == CODE_LABEL)
- {
+ case CODE_LABEL:
fprintf (outfile, " [%d uses]", LABEL_NUSES (in_rtx));
if (LABEL_ALTERNATE_NAME (in_rtx))
fprintf (outfile, " [alternate name: %s]",
LABEL_ALTERNATE_NAME (in_rtx));
+ break;
+
+ case CALL_PLACEHOLDER:
+ for (tem = XEXP (in_rtx, 0); tem != 0; tem = NEXT_INSN (tem))
+ if (GET_CODE (tem) == CALL_INSN)
+ {
+ fprintf (outfile, " ");
+ print_rtx (tem);
+ break;
+ }
+ break;
+
+ default:
+ break;
}
-
- if (GET_CODE (in_rtx) == CALL_PLACEHOLDER)
- for (tem = XEXP (in_rtx, 0); tem != 0; tem = NEXT_INSN (tem))
- if (GET_CODE (tem) == CALL_INSN)
- {
- fprintf (outfile, " ");
- print_rtx (tem);
- break;
- }
if (dump_for_graph
&& (is_insn || GET_CODE (in_rtx) == NOTE