rtx_writer::rtx_writer (FILE *outf, int ind, bool simple, bool compact,
rtx_reuse_manager *reuse_manager ATTRIBUTE_UNUSED)
-: m_outfile (outf), m_sawclose (0), m_indent (ind),
+: m_outfile (outf), m_indent (ind), m_sawclose (false),
m_in_call_function_usage (false), m_simple (simple), m_compact (compact)
#ifndef GENERATOR_FILE
, m_rtx_reuse_manager (reuse_manager)
fprintf (m_outfile, " #");
else
fprintf (m_outfile, " %d", NOTE_EH_HANDLER (in_rtx));
- m_sawclose = 1;
+ m_sawclose = true;
break;
case NOTE_INSN_BLOCK_BEG:
case NOTE_INSN_BLOCK_END:
dump_addr (m_outfile, " ", NOTE_BLOCK (in_rtx));
- m_sawclose = 1;
+ m_sawclose = true;
break;
case NOTE_INSN_BASIC_BLOCK:
{
fprintf (m_outfile, "\n%s%*s",
print_rtx_head, m_indent * 2, "");
- m_sawclose = 0;
+ m_sawclose = false;
}
if (GET_CODE (in_rtx) == CONST_VECTOR
&& !GET_MODE_NUNITS (GET_MODE (in_rtx)).is_constant ()
{
m_indent += 2;
if (XVECLEN (in_rtx, idx))
- m_sawclose = 1;
+ m_sawclose = true;
int barrier = XVECLEN (in_rtx, idx);
if (GET_CODE (in_rtx) == CONST_VECTOR
fprintf (m_outfile, "\n%s%*s", print_rtx_head, m_indent * 2, "");
fputs ("]", m_outfile);
- m_sawclose = 1;
+ m_sawclose = true;
m_indent -= 2;
}
/* Don't print INSN_CODEs in compact mode. */
if (m_compact && is_insn && &INSN_CODE (in_rtx) == &XINT (in_rtx, idx))
{
- m_sawclose = 0;
+ m_sawclose = false;
return;
}
&& XINT (in_rtx, idx) >= 0
&& (name = get_insn_name (XINT (in_rtx, idx))) != NULL)
fprintf (m_outfile, " {%s}", name);
- m_sawclose = 0;
+ m_sawclose = false;
}
}
fprintf (m_outfile, " [# deleted]");
else
fprintf (m_outfile, " [%d deleted]", INSN_UID (sub));
- m_sawclose = 0;
+ m_sawclose = false;
return;
}
}
else
fputs (" 0", m_outfile);
- m_sawclose = 0;
+ m_sawclose = false;
}
/* Subroutine of print_rtx. Print operand IDX of IN_RTX. */
fputs (" (nil)", m_outfile);
else
fprintf (m_outfile, " (\"%s\")", str);
- m_sawclose = 1;
+ m_sawclose = true;
break;
case '0':
case 'n':
fprintf (m_outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, idx)));
- m_sawclose = 0;
+ m_sawclose = false;
break;
case 'u':
case '*':
fputs (" Unknown", m_outfile);
- m_sawclose = 0;
+ m_sawclose = false;
break;
case 'B':
fputc (' ', m_outfile);
else
fprintf (m_outfile, "\n%s%*s", print_rtx_head, m_indent * 2, "");
- m_sawclose = 0;
+ m_sawclose = false;
}
if (in_rtx == 0)
{
fputs ("(nil)", m_outfile);
- m_sawclose = 1;
+ m_sawclose = true;
return;
}
else if (GET_CODE (in_rtx) > NUM_RTX_CODE)
{
fprintf (m_outfile, "(??? bad code %d\n%s%*s)", GET_CODE (in_rtx),
print_rtx_head, m_indent * 2, "");
- m_sawclose = 1;
+ m_sawclose = true;
return;
}
if (m_rtx_reuse_manager->seen_def_p (reuse_id))
{
fprintf (m_outfile, "reuse_rtx %i)", reuse_id);
- m_sawclose = 1;
+ m_sawclose = true;
return;
}
else
if (PAT_VAR_LOCATION_STATUS (in_rtx)
== VAR_INIT_STATUS_UNINITIALIZED)
fprintf (m_outfile, " [uninit]");
- m_sawclose = 1;
+ m_sawclose = true;
idx = GET_RTX_LENGTH (VAR_LOCATION);
}
#endif
}
fputc (')', m_outfile);
- m_sawclose = 1;
+ m_sawclose = true;
}
/* Emit a closing parenthesis and newline. */
rtx_writer::finish_directive ()
{
fprintf (m_outfile, ")\n");
- m_sawclose = 0;
+ m_sawclose = false;
}
/* Print an rtx on the current line of FILE. Initially indent IND
}
/* Like print_rtx, except specify a file. */
-/* Return nonzero if we actually printed anything. */
-int
+void
print_rtl_single (FILE *outf, const_rtx x)
{
rtx_writer w (outf, 0, false, false, NULL);
- return w.print_rtl_single_with_indent (x, 0);
+ w.print_rtl_single_with_indent (x, 0);
}
/* Like print_rtl_single, except specify an indentation. */
-int
+void
rtx_writer::print_rtl_single_with_indent (const_rtx x, int ind)
{
char *s_indent = (char *) alloca ((size_t) ind + 1);
int old_indent = m_indent;
m_indent = ind;
- m_sawclose = 0;
+ m_sawclose = false;
print_rtx (x);
putc ('\n', m_outfile);
m_indent = old_indent;
- return 1;
}