aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pretty-print.c
diff options
context:
space:
mode:
authorDavid Li <davidxl@google.com>2011-05-30 04:38:42 +0000
committerDavid Li <davidxl@google.com>2011-05-30 04:38:42 +0000
commit9e57f1fb6b7b583fedbe740bc6ef2f77b0524822 (patch)
treec675ad7ddeb009e2d055e547eb38270b557653cd /gcc/tree-pretty-print.c
parentb89c44165d7c6ba64a297624b79d0277d800c42c (diff)
New option to disable/enable optimization passes.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174423 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r--gcc/tree-pretty-print.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index f2f5a220018..b62417a7797 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -3013,3 +3013,25 @@ pp_base_tree_identifier (pretty_printer *pp, tree id)
pp_append_text (pp, IDENTIFIER_POINTER (id),
IDENTIFIER_POINTER (id) + IDENTIFIER_LENGTH (id));
}
+
+#if 0
+void
+pass_dump_function_header (FILE *dump_file, tree fdecl, struct function *fun)
+{
+ const char *dname, *aname;
+ struct cgraph_node *node = cgraph_get_node (fdecl);
+ dname = lang_hooks.decl_printable_name (fdecl, 2);
+ aname = (IDENTIFIER_POINTER
+ (DECL_ASSEMBLER_NAME (fdecl)));
+ fprintf (dump_file, "\n;; Function %s (%s)[fundef_no:%d][uid=%d]",
+ dname, aname, fun->funcdef_no, node->uid);
+ fprintf (dump_file, "%s\n\n",
+ node->frequency == NODE_FREQUENCY_HOT
+ ? " (hot)"
+ : node->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED
+ ? " (unlikely executed)"
+ : node->frequency == NODE_FREQUENCY_EXECUTED_ONCE
+ ? " (executed once)"
+ : "");
+}
+#endif