#include "diagnostic.h"
#include "gimple-pretty-print.h"
#include "hashtab.h"
-#include "tree-ssa.h"
-#include "dumpfile.h" /* for dump_flags */
+#include "bitmap.h"
#include "gimple.h"
+#include "gimple-ssa.h"
+#include "cgraph.h"
+#include "tree-cfg.h"
+#include "tree-ssanames.h"
+#include "dumpfile.h" /* for dump_flags */
#include "value-prof.h"
#include "trans-mem.h"
static void
dump_gimple_return (pretty_printer *buffer, gimple gs, int spc, int flags)
{
- tree t;
+ tree t, t2;
t = gimple_return_retval (gs);
+ t2 = gimple_return_retbnd (gs);
if (flags & TDF_RAW)
- dump_gimple_fmt (buffer, spc, flags, "%G <%T>", gs, t);
+ dump_gimple_fmt (buffer, spc, flags, "%G <%T %T>", gs, t, t2);
else
{
pp_string (buffer, "return");
pp_space (buffer);
dump_generic_node (buffer, t, spc, flags, false);
}
+ if (t2)
+ {
+ pp_string (buffer, ", ");
+ dump_generic_node (buffer, t2, spc, flags, false);
+ }
pp_semicolon (buffer);
}
}
{
unsigned int align, misalign;
struct ptr_info_def *pi = SSA_NAME_PTR_INFO (node);
- pp_string (buffer, "PT = ");
+ pp_string (buffer, "# PT = ");
pp_points_to_solution (buffer, &pi->pt);
newline_and_indent (buffer, spc);
if (get_ptr_info_alignment (pi, &align, &misalign))
pp_printf (buffer, "# ALIGN = %u, MISALIGN = %u", align, misalign);
newline_and_indent (buffer, spc);
}
- pp_string (buffer, "# ");
}
if (!POINTER_TYPE_P (TREE_TYPE (node))
&& SSA_NAME_RANGE_INFO (node))
{
- widest_int min, max;
+ widest_int min, max, nonzero_bits;
value_range_type range_type = get_range_info (node, &min, &max);
if (range_type == VR_VARYING)
- pp_printf (buffer, "# RANGE VR_VARYING");
+ pp_printf (buffer, "# RANGE VR_VARYING");
else if (range_type == VR_RANGE || range_type == VR_ANTI_RANGE)
{
pp_printf (buffer, "# RANGE ");
pp_printf (buffer, ", ");
pp_wide_int (buffer, max, TYPE_SIGN (TREE_TYPE (node)));
pp_printf (buffer, "]");
- newline_and_indent (buffer, spc);
}
+ nonzero_bits = get_nonzero_bits (node);
+ if (nonzero_bits != -1
+ && (nonzero_bits
+ != wi::mask <widest_int> (TYPE_PRECISION (TREE_TYPE (node)), false)))
+ {
+ pp_string (buffer, " NONZERO ");
+ pp_wide_int (buffer, nonzero_bits, UNSIGNED);
+ }
+ newline_and_indent (buffer, spc);
}
}
/* Dump a PHI node PHI. BUFFER, SPC and FLAGS are as in pp_gimple_stmt_1.
The caller is responsible for calling pp_flush on BUFFER to finalize
- pretty printer. */
+ pretty printer. If COMMENT is true, print this after #. */
static void
-dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, int flags)
+dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, bool comment,
+ int flags)
{
size_t i;
tree lhs = gimple_phi_result (phi);
if (flags & TDF_ALIAS)
dump_ssaname_info (buffer, lhs, spc);
+ if (comment)
+ pp_string (buffer, "# ");
+
if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%T, ", phi,
gimple_phi_result (phi));
break;
case GIMPLE_PHI:
- dump_gimple_phi (buffer, gs, spc, flags);
+ dump_gimple_phi (buffer, gs, spc, false, flags);
break;
case GIMPLE_OMP_PARALLEL:
if (!virtual_operand_p (gimple_phi_result (phi)) || (flags & TDF_VOPS))
{
INDENT (indent);
- pp_string (buffer, "# ");
- dump_gimple_phi (buffer, phi, indent, flags);
+ dump_gimple_phi (buffer, phi, indent, true, flags);
pp_newline (buffer);
}
}