ira-conflicts.c: Use fputs or putc instead of fprintf where appropriate.

* ira-conflicts.c: Use fputs or putc instead of fprintf
	where appropriate.
	* cfg.c: Ditto.
	* toplev.c: Ditto.
	* tree-switch-conversion.c: Ditto.

From-SVN: r151598
This commit is contained in:
Uros Bizjak 2009-09-10 18:21:45 +02:00
parent f3d9e91bcc
commit edb30094a6
5 changed files with 42 additions and 34 deletions

View File

@ -1,9 +1,17 @@
2009-09-10 Hariharan Sandanagobalane <hariharan@picochip.com>
2009-09-10 Uros Bizjak <ubizjak@gmail.com>
* ira-conflicts.c: Use fputs or putc instead of fprintf
where appropriate.
* cfg.c: Ditto.
* toplev.c: Ditto.
* tree-switch-conversion.c: Ditto.
2009-09-10 Hariharan Sandanagobalane <hariharan@picochip.com>
* config/picochip/picochip.c : Ignore DEBUG_INSN_P instructions
introduced by the VTA branch merge.
2009-09-10 Uros Bizjak <ubizjak@gmail.com>
2009-09-10 Uros Bizjak <ubizjak@gmail.com>
Revert:
2009-09-09 Uros Bizjak <ubizjak@gmail.com>

View File

@ -546,10 +546,10 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags,
/* Both maybe_hot_bb_p & probably_never_executed_bb_p functions
crash without cfun. */
if (cfun && maybe_hot_bb_p (bb))
fprintf (file, ", maybe hot");
fputs (", maybe hot", file);
if (cfun && probably_never_executed_bb_p (bb))
fprintf (file, ", probably never executed");
fprintf (file, ".\n");
fputs (", probably never executed", file);
fputs (".\n", file);
fprintf (file, "%sPredecessors: ", prefix);
FOR_EACH_EDGE (e, ei, bb->preds)
@ -559,7 +559,7 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags,
&& (bb->flags & BB_RTL)
&& df)
{
fprintf (file, "\n");
putc ('\n', file);
df_dump_top (bb, file);
}
}
@ -574,7 +574,7 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags,
&& (bb->flags & BB_RTL)
&& df)
{
fprintf (file, "\n");
putc ('\n', file);
df_dump_bottom (bb, file);
}
}
@ -615,11 +615,11 @@ dump_reg_info (FILE *file)
fprintf (file, "; set %d time%s", DF_REG_DEF_COUNT (i),
(DF_REG_DEF_COUNT (i) == 1) ? "" : "s");
if (regno_reg_rtx[i] != NULL && REG_USERVAR_P (regno_reg_rtx[i]))
fprintf (file, "; user var");
fputs ("; user var", file);
if (REG_N_DEATHS (i) != 1)
fprintf (file, "; dies in %d places", REG_N_DEATHS (i));
if (REG_N_CALLS_CROSSED (i) == 1)
fprintf (file, "; crosses 1 call");
fputs ("; crosses 1 call", file);
else if (REG_N_CALLS_CROSSED (i))
fprintf (file, "; crosses %d calls", REG_N_CALLS_CROSSED (i));
if (REG_FREQ_CALLS_CROSSED (i))
@ -643,8 +643,8 @@ dump_reg_info (FILE *file)
}
if (regno_reg_rtx[i] != NULL && REG_POINTER (regno_reg_rtx[i]))
fprintf (file, "; pointer");
fprintf (file, ".\n");
fputs ("; pointer", file);
fputs (".\n", file);
}
}
@ -691,7 +691,7 @@ dump_edge_info (FILE *file, edge e, int do_succ)
if (e->count)
{
fprintf (file, " count:");
fputs (" count:", file);
fprintf (file, HOST_WIDEST_INT_PRINT_DEC, e->count);
}
@ -904,24 +904,24 @@ dump_cfg_bb_info (FILE *file, basic_block bb)
if (bb->flags & (1 << i))
{
if (first)
fprintf (file, " (");
fputs (" (", file);
else
fprintf (file, ", ");
fputs (", ", file);
first = false;
fprintf (file, bb_bitnames[i]);
fputs (bb_bitnames[i], file);
}
if (!first)
fprintf (file, ")");
fprintf (file, "\n");
putc (')', file);
putc ('\n', file);
fprintf (file, "Predecessors: ");
fputs ("Predecessors: ", file);
FOR_EACH_EDGE (e, ei, bb->preds)
dump_edge_info (file, e, 0);
fprintf (file, "\nSuccessors: ");
FOR_EACH_EDGE (e, ei, bb->succs)
dump_edge_info (file, e, 1);
fprintf (file, "\n\n");
fputs ("\n\n", file);
}
/* Dumps a brief description of cfg to FILE. */

View File

@ -662,7 +662,7 @@ print_hard_reg_set (FILE *file, const char *title, HARD_REG_SET set)
{
int i, start;
fprintf (file, title);
fputs (title, file);
for (start = -1, i = 0; i < FIRST_PSEUDO_REGISTER; i++)
{
if (TEST_HARD_REG_BIT (set, i))
@ -682,7 +682,7 @@ print_hard_reg_set (FILE *file, const char *title, HARD_REG_SET set)
start = -1;
}
}
fprintf (file, "\n");
putc ('\n', file);
}
/* Print information about allocno or only regno (if REG_P) conflicts
@ -709,9 +709,9 @@ print_conflicts (FILE *file, bool reg_p)
fprintf (file, "b%d", bb->index);
else
fprintf (file, "l%d", ALLOCNO_LOOP_TREE_NODE (a)->loop->num);
fprintf (file, ")");
putc (')', file);
}
fprintf (file, " conflicts:");
fputs (" conflicts:", file);
if (ALLOCNO_CONFLICT_ALLOCNO_ARRAY (a) != NULL)
FOR_EACH_ALLOCNO_CONFLICT (a, conflict_a, aci)
{
@ -743,7 +743,7 @@ print_conflicts (FILE *file, bool reg_p)
print_hard_reg_set (file, ";; conflict hard regs:",
conflicting_hard_regs);
}
fprintf (file, "\n");
putc ('\n', file);
}
/* Print information about allocno or only regno (if REG_P) conflicts

View File

@ -711,7 +711,7 @@ output_file_directive (FILE *asm_file, const char *input_name)
#else
fprintf (asm_file, "\t.file\t");
output_quoted_string (asm_file, na);
fputc ('\n', asm_file);
putc ('\n', asm_file);
#endif
}
@ -1271,7 +1271,7 @@ print_to_asm_out_file (print_switch_type type, const char * text)
case SWITCH_TYPE_ENABLED:
if (prepend_sep)
fputc (' ', asm_out_file);
fprintf (asm_out_file, text);
fputs (text, asm_out_file);
/* No need to return the length here as
print_single_switch has already done it. */
return 0;
@ -1300,7 +1300,7 @@ print_to_stderr (print_switch_type type, const char * text)
/* Drop through. */
case SWITCH_TYPE_DESCRIPTIVE:
fprintf (stderr, text);
fputs (text, stderr);
/* No need to return the length here as
print_single_switch has already done it. */
return 0;
@ -1460,7 +1460,7 @@ init_asm_output (const char *name)
into the assembler file as comments. */
print_version (asm_out_file, ASM_COMMENT_START);
print_switch_values (print_to_asm_out_file);
fprintf (asm_out_file, "\n");
putc ('\n', asm_out_file);
}
#endif
}

View File

@ -875,7 +875,7 @@ do_switchconv (void)
"SWITCH statement (%s:%d) : ------- \n",
loc.file, loc.line);
print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
fprintf (dump_file, "\n");
putc ('\n', dump_file);
}
info.reason = NULL;
@ -883,8 +883,8 @@ do_switchconv (void)
{
if (dump_file)
{
fprintf (dump_file, "Switch converted\n");
fprintf (dump_file, "--------------------------------\n");
fputs ("Switch converted\n", dump_file);
fputs ("--------------------------------\n", dump_file);
}
}
else
@ -892,9 +892,9 @@ do_switchconv (void)
if (dump_file)
{
gcc_assert (info.reason);
fprintf (dump_file, "Bailing out - ");
fprintf (dump_file, info.reason);
fprintf (dump_file, "--------------------------------\n");
fputs ("Bailing out - ", dump_file);
fputs (info.reason, dump_file);
fputs ("--------------------------------\n", dump_file);
}
}
}