/* Switch Conversion converts variable initializations based on switch
statements to initializations from a static array.
- Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
Contributed by Martin Jambor <jamborm@suse.cz>
This file is part of GCC.
#include "input.h"
#include "tree-pass.h"
#include "diagnostic.h"
+#include "gimple-pretty-print.h"
#include "tree-dump.h"
#include "timevar.h"
tree low = CASE_LOW (cs);
pos = CASE_LOW (cs);
- do
+ do
{
constructor_elt *elt;
for (i = 0; i < len; i++)
{
constructor_elt *elt = VEC_index (constructor_elt, vec, i);
-
+
if (!prev)
prev = elt->value;
else if (!operand_equal_p (elt->value, prev, OEP_ONLY_CONST))
!gsi_end_p (gsi); gsi_next (&gsi), i++)
{
gimple phi = gsi_stmt (gsi);
- add_phi_arg (phi, info.target_inbound_names[i], e1f);
- add_phi_arg (phi, info.target_outbound_names[i], e2f);
+ add_phi_arg (phi, info.target_inbound_names[i], e1f, UNKNOWN_LOCATION);
+ add_phi_arg (phi, info.target_outbound_names[i], e2f, UNKNOWN_LOCATION);
}
}
"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;
{
if (dump_file)
{
- fprintf (dump_file, "Switch converted\n");
- fprintf (dump_file, "--------------------------------\n");
+ fputs ("Switch converted\n", dump_file);
+ fputs ("--------------------------------\n", dump_file);
}
}
else
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);
}
}
}