aboutsummaryrefslogtreecommitdiff
path: root/gcc/dumpfile.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-07-03 09:39:59 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-07-03 09:39:59 +0000
commit30f502eddecac8ecfbec4b86f3a80f1859076b6d (patch)
tree26d48636b7712963d8eecf6332e4650812b40652 /gcc/dumpfile.c
parentcbdb1229e3a822bf84d93586d18540d0650d54da (diff)
downloadgcc-30f502eddecac8ecfbec4b86f3a80f1859076b6d.zip
gcc-30f502eddecac8ecfbec4b86f3a80f1859076b6d.tar.gz
gcc-30f502eddecac8ecfbec4b86f3a80f1859076b6d.tar.bz2
tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping, always set *dt.
2018-07-03 Richard Biener <rguenther@suse.de> * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping, always set *dt. Dump vectype in vectype overload. * dumpfile.h (dump_gimple_expr): New function. (dump_gimple_expr_loc): Likewise. * dumpfile.c (dump_gimple_expr): New function. (dump_gimple_expr_loc): Likewise. From-SVN: r262330
Diffstat (limited to 'gcc/dumpfile.c')
-rw-r--r--gcc/dumpfile.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c
index 5f69f9b..3296299 100644
--- a/gcc/dumpfile.c
+++ b/gcc/dumpfile.c
@@ -492,6 +492,42 @@ dump_gimple_stmt_loc (dump_flags_t dump_kind, const dump_location_t &loc,
}
}
+/* Dump gimple statement GS with SPC indentation spaces and
+ EXTRA_DUMP_FLAGS on the dump streams if DUMP_KIND is enabled.
+ Do not terminate with a newline or semicolon. */
+
+void
+dump_gimple_expr (dump_flags_t dump_kind, dump_flags_t extra_dump_flags,
+ gimple *gs, int spc)
+{
+ if (dump_file && (dump_kind & pflags))
+ print_gimple_expr (dump_file, gs, spc, dump_flags | extra_dump_flags);
+
+ if (alt_dump_file && (dump_kind & alt_flags))
+ print_gimple_expr (alt_dump_file, gs, spc, dump_flags | extra_dump_flags);
+}
+
+/* Similar to dump_gimple_expr, except additionally print source location. */
+
+void
+dump_gimple_expr_loc (dump_flags_t dump_kind, const dump_location_t &loc,
+ dump_flags_t extra_dump_flags, gimple *gs, int spc)
+{
+ location_t srcloc = loc.get_location_t ();
+ if (dump_file && (dump_kind & pflags))
+ {
+ dump_loc (dump_kind, dump_file, srcloc);
+ print_gimple_expr (dump_file, gs, spc, dump_flags | extra_dump_flags);
+ }
+
+ if (alt_dump_file && (dump_kind & alt_flags))
+ {
+ dump_loc (dump_kind, alt_dump_file, srcloc);
+ print_gimple_expr (alt_dump_file, gs, spc, dump_flags | extra_dump_flags);
+ }
+}
+
+
/* Dump expression tree T using EXTRA_DUMP_FLAGS on dump streams if
DUMP_KIND is enabled. */