diff options
author | dehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-02 10:13:52 +0000 |
---|---|---|
committer | dehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-02 10:13:52 +0000 |
commit | a34e128b03f46a5e32811ae76697893c4aafd26e (patch) | |
tree | b0ca0f9cd3ec2f3ddb359c7852eb11d94cbfdc98 | |
parent | d3856e6de16fdc4e55ed5e1ab0b191998691997b (diff) |
* ipa-inline.c (cgraph_node_opt_info): Print more concise info when
dumping inline decisions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6@182782 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.google-4_6 | 5 | ||||
-rw-r--r-- | gcc/ipa-inline.c | 18 |
2 files changed, 11 insertions, 12 deletions
diff --git a/gcc/ChangeLog.google-4_6 b/gcc/ChangeLog.google-4_6 index ebcff79003a..38d64aeec05 100644 --- a/gcc/ChangeLog.google-4_6 +++ b/gcc/ChangeLog.google-4_6 @@ -1,3 +1,8 @@ +2012-01-02 Dehao Chen <dehao@google.com> + + * ipa-inline.c (cgraph_node_opt_info): Print more concise info when + dumping inline decisions. + 2011-12-17 Sriraman Tallam <tmsriram@google.com> * mversn-dispatch.c (make_name): Use '.' to concatenate to suffix diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index b11cc4c2f20..cfd9aff6b9e 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -303,26 +303,20 @@ cgraph_node_opt_info (struct cgraph_node *node) char *buf; size_t buf_size; const char *bfd_name = lang_hooks.dwarf_name (node->decl, 0); - const char *count_text = "count="; - const char *max_count_text = "max_count="; if (!bfd_name) bfd_name = "unknown"; buf_size = strlen (bfd_name) + 1; - if (flag_opt_info >= OPT_INFO_MED) - buf_size += (strlen (count_text) + MAX_INT_LENGTH + 1); - if (flag_opt_info >= OPT_INFO_MAX) - buf_size += (strlen (max_count_text) + MAX_INT_LENGTH + 1); + if (flag_opt_info >= OPT_INFO_MED && profile_info) + buf_size += (2 * MAX_INT_LENGTH + 5); buf = (char *) xmalloc (buf_size); strcpy (buf, bfd_name); - if (flag_opt_info >= OPT_INFO_MED) - sprintf (buf, "%s,%s"HOST_WIDEST_INT_PRINT_DEC, - buf, count_text, node->count); - if (flag_opt_info >= OPT_INFO_MAX) - sprintf (buf, "%s,%s"HOST_WIDEST_INT_PRINT_DEC, - buf, max_count_text, node->max_bb_count); + if (flag_opt_info >= OPT_INFO_MED && profile_info) + sprintf (buf, + "%s ("HOST_WIDEST_INT_PRINT_DEC", "HOST_WIDEST_INT_PRINT_DEC")", + buf, node->count, node->max_bb_count); return buf; } |