Commit edb30094 by Uros Bizjak

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
parent f3d9e91b
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> 2009-09-10 Hariharan Sandanagobalane <hariharan@picochip.com>
* config/picochip/picochip.c : Ignore DEBUG_INSN_P instructions * config/picochip/picochip.c : Ignore DEBUG_INSN_P instructions
......
...@@ -546,10 +546,10 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags, ...@@ -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 /* Both maybe_hot_bb_p & probably_never_executed_bb_p functions
crash without cfun. */ crash without cfun. */
if (cfun && maybe_hot_bb_p (bb)) if (cfun && maybe_hot_bb_p (bb))
fprintf (file, ", maybe hot"); fputs (", maybe hot", file);
if (cfun && probably_never_executed_bb_p (bb)) if (cfun && probably_never_executed_bb_p (bb))
fprintf (file, ", probably never executed"); fputs (", probably never executed", file);
fprintf (file, ".\n"); fputs (".\n", file);
fprintf (file, "%sPredecessors: ", prefix); fprintf (file, "%sPredecessors: ", prefix);
FOR_EACH_EDGE (e, ei, bb->preds) FOR_EACH_EDGE (e, ei, bb->preds)
...@@ -559,7 +559,7 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags, ...@@ -559,7 +559,7 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags,
&& (bb->flags & BB_RTL) && (bb->flags & BB_RTL)
&& df) && df)
{ {
fprintf (file, "\n"); putc ('\n', file);
df_dump_top (bb, file); df_dump_top (bb, file);
} }
} }
...@@ -574,7 +574,7 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags, ...@@ -574,7 +574,7 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags,
&& (bb->flags & BB_RTL) && (bb->flags & BB_RTL)
&& df) && df)
{ {
fprintf (file, "\n"); putc ('\n', file);
df_dump_bottom (bb, file); df_dump_bottom (bb, file);
} }
} }
...@@ -615,11 +615,11 @@ dump_reg_info (FILE *file) ...@@ -615,11 +615,11 @@ dump_reg_info (FILE *file)
fprintf (file, "; set %d time%s", DF_REG_DEF_COUNT (i), fprintf (file, "; set %d time%s", DF_REG_DEF_COUNT (i),
(DF_REG_DEF_COUNT (i) == 1) ? "" : "s"); (DF_REG_DEF_COUNT (i) == 1) ? "" : "s");
if (regno_reg_rtx[i] != NULL && REG_USERVAR_P (regno_reg_rtx[i])) 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) if (REG_N_DEATHS (i) != 1)
fprintf (file, "; dies in %d places", REG_N_DEATHS (i)); fprintf (file, "; dies in %d places", REG_N_DEATHS (i));
if (REG_N_CALLS_CROSSED (i) == 1) if (REG_N_CALLS_CROSSED (i) == 1)
fprintf (file, "; crosses 1 call"); fputs ("; crosses 1 call", file);
else if (REG_N_CALLS_CROSSED (i)) else if (REG_N_CALLS_CROSSED (i))
fprintf (file, "; crosses %d calls", REG_N_CALLS_CROSSED (i)); fprintf (file, "; crosses %d calls", REG_N_CALLS_CROSSED (i));
if (REG_FREQ_CALLS_CROSSED (i)) if (REG_FREQ_CALLS_CROSSED (i))
...@@ -643,8 +643,8 @@ dump_reg_info (FILE *file) ...@@ -643,8 +643,8 @@ dump_reg_info (FILE *file)
} }
if (regno_reg_rtx[i] != NULL && REG_POINTER (regno_reg_rtx[i])) if (regno_reg_rtx[i] != NULL && REG_POINTER (regno_reg_rtx[i]))
fprintf (file, "; pointer"); fputs ("; pointer", file);
fprintf (file, ".\n"); fputs (".\n", file);
} }
} }
...@@ -691,7 +691,7 @@ dump_edge_info (FILE *file, edge e, int do_succ) ...@@ -691,7 +691,7 @@ dump_edge_info (FILE *file, edge e, int do_succ)
if (e->count) if (e->count)
{ {
fprintf (file, " count:"); fputs (" count:", file);
fprintf (file, HOST_WIDEST_INT_PRINT_DEC, e->count); fprintf (file, HOST_WIDEST_INT_PRINT_DEC, e->count);
} }
...@@ -904,24 +904,24 @@ dump_cfg_bb_info (FILE *file, basic_block bb) ...@@ -904,24 +904,24 @@ dump_cfg_bb_info (FILE *file, basic_block bb)
if (bb->flags & (1 << i)) if (bb->flags & (1 << i))
{ {
if (first) if (first)
fprintf (file, " ("); fputs (" (", file);
else else
fprintf (file, ", "); fputs (", ", file);
first = false; first = false;
fprintf (file, bb_bitnames[i]); fputs (bb_bitnames[i], file);
} }
if (!first) if (!first)
fprintf (file, ")"); putc (')', file);
fprintf (file, "\n"); putc ('\n', file);
fprintf (file, "Predecessors: "); fputs ("Predecessors: ", file);
FOR_EACH_EDGE (e, ei, bb->preds) FOR_EACH_EDGE (e, ei, bb->preds)
dump_edge_info (file, e, 0); dump_edge_info (file, e, 0);
fprintf (file, "\nSuccessors: "); fprintf (file, "\nSuccessors: ");
FOR_EACH_EDGE (e, ei, bb->succs) FOR_EACH_EDGE (e, ei, bb->succs)
dump_edge_info (file, e, 1); dump_edge_info (file, e, 1);
fprintf (file, "\n\n"); fputs ("\n\n", file);
} }
/* Dumps a brief description of cfg to FILE. */ /* Dumps a brief description of cfg to FILE. */
......
...@@ -662,7 +662,7 @@ print_hard_reg_set (FILE *file, const char *title, HARD_REG_SET set) ...@@ -662,7 +662,7 @@ print_hard_reg_set (FILE *file, const char *title, HARD_REG_SET set)
{ {
int i, start; int i, start;
fprintf (file, title); fputs (title, file);
for (start = -1, i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (start = -1, i = 0; i < FIRST_PSEUDO_REGISTER; i++)
{ {
if (TEST_HARD_REG_BIT (set, 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) ...@@ -682,7 +682,7 @@ print_hard_reg_set (FILE *file, const char *title, HARD_REG_SET set)
start = -1; start = -1;
} }
} }
fprintf (file, "\n"); putc ('\n', file);
} }
/* Print information about allocno or only regno (if REG_P) conflicts /* Print information about allocno or only regno (if REG_P) conflicts
...@@ -709,9 +709,9 @@ print_conflicts (FILE *file, bool reg_p) ...@@ -709,9 +709,9 @@ print_conflicts (FILE *file, bool reg_p)
fprintf (file, "b%d", bb->index); fprintf (file, "b%d", bb->index);
else else
fprintf (file, "l%d", ALLOCNO_LOOP_TREE_NODE (a)->loop->num); 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) if (ALLOCNO_CONFLICT_ALLOCNO_ARRAY (a) != NULL)
FOR_EACH_ALLOCNO_CONFLICT (a, conflict_a, aci) FOR_EACH_ALLOCNO_CONFLICT (a, conflict_a, aci)
{ {
...@@ -743,7 +743,7 @@ print_conflicts (FILE *file, bool reg_p) ...@@ -743,7 +743,7 @@ print_conflicts (FILE *file, bool reg_p)
print_hard_reg_set (file, ";; conflict hard regs:", print_hard_reg_set (file, ";; conflict hard regs:",
conflicting_hard_regs); conflicting_hard_regs);
} }
fprintf (file, "\n"); putc ('\n', file);
} }
/* Print information about allocno or only regno (if REG_P) conflicts /* Print information about allocno or only regno (if REG_P) conflicts
......
...@@ -711,7 +711,7 @@ output_file_directive (FILE *asm_file, const char *input_name) ...@@ -711,7 +711,7 @@ output_file_directive (FILE *asm_file, const char *input_name)
#else #else
fprintf (asm_file, "\t.file\t"); fprintf (asm_file, "\t.file\t");
output_quoted_string (asm_file, na); output_quoted_string (asm_file, na);
fputc ('\n', asm_file); putc ('\n', asm_file);
#endif #endif
} }
...@@ -1271,7 +1271,7 @@ print_to_asm_out_file (print_switch_type type, const char * text) ...@@ -1271,7 +1271,7 @@ print_to_asm_out_file (print_switch_type type, const char * text)
case SWITCH_TYPE_ENABLED: case SWITCH_TYPE_ENABLED:
if (prepend_sep) if (prepend_sep)
fputc (' ', asm_out_file); fputc (' ', asm_out_file);
fprintf (asm_out_file, text); fputs (text, asm_out_file);
/* No need to return the length here as /* No need to return the length here as
print_single_switch has already done it. */ print_single_switch has already done it. */
return 0; return 0;
...@@ -1300,7 +1300,7 @@ print_to_stderr (print_switch_type type, const char * text) ...@@ -1300,7 +1300,7 @@ print_to_stderr (print_switch_type type, const char * text)
/* Drop through. */ /* Drop through. */
case SWITCH_TYPE_DESCRIPTIVE: case SWITCH_TYPE_DESCRIPTIVE:
fprintf (stderr, text); fputs (text, stderr);
/* No need to return the length here as /* No need to return the length here as
print_single_switch has already done it. */ print_single_switch has already done it. */
return 0; return 0;
...@@ -1460,7 +1460,7 @@ init_asm_output (const char *name) ...@@ -1460,7 +1460,7 @@ init_asm_output (const char *name)
into the assembler file as comments. */ into the assembler file as comments. */
print_version (asm_out_file, ASM_COMMENT_START); print_version (asm_out_file, ASM_COMMENT_START);
print_switch_values (print_to_asm_out_file); print_switch_values (print_to_asm_out_file);
fprintf (asm_out_file, "\n"); putc ('\n', asm_out_file);
} }
#endif #endif
} }
......
...@@ -875,7 +875,7 @@ do_switchconv (void) ...@@ -875,7 +875,7 @@ do_switchconv (void)
"SWITCH statement (%s:%d) : ------- \n", "SWITCH statement (%s:%d) : ------- \n",
loc.file, loc.line); loc.file, loc.line);
print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM); print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
fprintf (dump_file, "\n"); putc ('\n', dump_file);
} }
info.reason = NULL; info.reason = NULL;
...@@ -883,8 +883,8 @@ do_switchconv (void) ...@@ -883,8 +883,8 @@ do_switchconv (void)
{ {
if (dump_file) if (dump_file)
{ {
fprintf (dump_file, "Switch converted\n"); fputs ("Switch converted\n", dump_file);
fprintf (dump_file, "--------------------------------\n"); fputs ("--------------------------------\n", dump_file);
} }
} }
else else
...@@ -892,9 +892,9 @@ do_switchconv (void) ...@@ -892,9 +892,9 @@ do_switchconv (void)
if (dump_file) if (dump_file)
{ {
gcc_assert (info.reason); gcc_assert (info.reason);
fprintf (dump_file, "Bailing out - "); fputs ("Bailing out - ", dump_file);
fprintf (dump_file, info.reason); fputs (info.reason, dump_file);
fprintf (dump_file, "--------------------------------\n"); fputs ("--------------------------------\n", dump_file);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment