diff options
Diffstat (limited to 'gcc/print-rtl.c')
-rw-r--r-- | gcc/print-rtl.c | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index fa02699707e..cb09597b579 100644 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see #include "hard-reg-set.h" #include "basic-block.h" #include "diagnostic.h" +#include "cselib.h" #endif static FILE *outfile; @@ -165,6 +166,23 @@ print_rtx (const_rtx in_rtx) /* For other rtl, print the mode if it's not VOID. */ else if (GET_MODE (in_rtx) != VOIDmode) fprintf (outfile, ":%s", GET_MODE_NAME (GET_MODE (in_rtx))); + +#ifndef GENERATOR_FILE + if (GET_CODE (in_rtx) == VAR_LOCATION) + { + if (TREE_CODE (PAT_VAR_LOCATION_DECL (in_rtx)) == STRING_CST) + fputs (" <debug string placeholder>", outfile); + else + print_mem_expr (outfile, PAT_VAR_LOCATION_DECL (in_rtx)); + fputc (' ', outfile); + print_rtx (PAT_VAR_LOCATION_LOC (in_rtx)); + if (PAT_VAR_LOCATION_STATUS (in_rtx) + == VAR_INIT_STATUS_UNINITIALIZED) + fprintf (outfile, " [uninit]"); + sawclose = 1; + i = GET_RTX_LENGTH (VAR_LOCATION); + } +#endif } } @@ -278,14 +296,8 @@ print_rtx (const_rtx in_rtx) case NOTE_INSN_VAR_LOCATION: #ifndef GENERATOR_FILE - fprintf (outfile, " ("); - print_mem_expr (outfile, NOTE_VAR_LOCATION_DECL (in_rtx)); - fprintf (outfile, " "); - print_rtx (NOTE_VAR_LOCATION_LOC (in_rtx)); - if (NOTE_VAR_LOCATION_STATUS (in_rtx) == - VAR_INIT_STATUS_UNINITIALIZED) - fprintf (outfile, " [uninit]"); - fprintf (outfile, ")"); + fputc (' ', outfile); + print_rtx (NOTE_VAR_LOCATION (in_rtx)); #endif break; @@ -296,6 +308,16 @@ print_rtx (const_rtx in_rtx) else if (i == 9 && JUMP_P (in_rtx) && XEXP (in_rtx, i) != NULL) /* Output the JUMP_LABEL reference. */ fprintf (outfile, "\n -> %d", INSN_UID (XEXP (in_rtx, i))); + else if (i == 0 && GET_CODE (in_rtx) == VALUE) + { +#ifndef GENERATOR_FILE + cselib_val *val = CSELIB_VAL_PTR (in_rtx); + + fprintf (outfile, " %i", val->value); + dump_addr (outfile, " @", in_rtx); + dump_addr (outfile, "/", (void*)val); +#endif + } break; case 'e': |