From ee137b400cc9dd69dc1d803e6b70c5e69769eb25 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 6 Jun 2019 09:19:58 +0200 Subject: [PATCH] IPA ICF: enhance dump output 2019-06-06 Martin Liska * ipa-icf-gimple.h (dump_message_1): Remove. (dump_message): Likewise. (return_false_with_message_1): Print also file. (return_false_with_msg): Likewise. (return_with_result): Likewise. (return_with_debug): Likewise. * ipa-icf.c (sem_function::equals_private): Remove call to dump_message. From-SVN: r271987 --- gcc/ChangeLog | 11 +++++++++++ gcc/ipa-icf-gimple.h | 31 +++++++++++-------------------- gcc/ipa-icf.c | 2 -- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 464982ef4dc..27cff9a1bc9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2019-06-06 Martin Liska + + * ipa-icf-gimple.h (dump_message_1): Remove. + (dump_message): Likewise. + (return_false_with_message_1): Print also file. + (return_false_with_msg): Likewise. + (return_with_result): Likewise. + (return_with_debug): Likewise. + * ipa-icf.c (sem_function::equals_private): Remove call + to dump_message. + 2019-06-05 Hongtao Liu * config/i386/sse.md (define_mode_suffix vecmemsuffix): New. diff --git a/gcc/ipa-icf-gimple.h b/gcc/ipa-icf-gimple.h index 51aadced9ea..351bddfb2f6 100644 --- a/gcc/ipa-icf-gimple.h +++ b/gcc/ipa-icf-gimple.h @@ -36,34 +36,22 @@ along with GCC; see the file COPYING3. If not see #define FPRINTF_SPACES(file, space_count, format, ...) \ fprintf (file, "%*s" format, space_count, " ", ##__VA_ARGS__); -/* Prints a MESSAGE to dump_file if exists. FUNC is name of function and - LINE is location in the source file. */ - -static inline void -dump_message_1 (const char *message, const char *func, unsigned int line) -{ - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " debug message: %s (%s:%u)\n", message, func, line); -} - -/* Prints a MESSAGE to dump_file if exists. */ -#define dump_message(message) dump_message_1 (message, __func__, __LINE__) - /* Logs a MESSAGE to dump_file if exists and returns false. FUNC is name of function and LINE is location in the source file. */ static inline bool -return_false_with_message_1 (const char *message, const char *func, - unsigned int line) +return_false_with_message_1 (const char *message, const char *filename, + const char *func, unsigned int line) { if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " false returned: '%s' (%s:%u)\n", message, func, line); + fprintf (dump_file, " false returned: '%s' in %s at %s:%u\n", message, func, + filename, line); return false; } /* Logs a MESSAGE to dump_file if exists and returns false. */ #define return_false_with_msg(message) \ - return_false_with_message_1 (message, __func__, __LINE__) + return_false_with_message_1 (message, __FILE__, __func__, __LINE__) /* Return false and log that false value is returned. */ #define return_false() return_false_with_msg ("") @@ -72,16 +60,19 @@ return_false_with_message_1 (const char *message, const char *func, is location in the source file. */ static inline bool -return_with_result (bool result, const char *func, unsigned int line) +return_with_result (bool result, const char *filename, + const char *func, unsigned int line) { if (!result && dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, " false returned: (%s:%u)\n", func, line); + fprintf (dump_file, " false returned: '' in %s at %s:%u\n", func, + filename, line); return result; } /* Logs return value if RESULT is false. */ -#define return_with_debug(result) return_with_result (result, __func__, __LINE__) +#define return_with_debug(result) return_with_result \ + (result, __FILE__, __func__, __LINE__) /* Verbose logging function logging statements S1 and S2 of a CODE. FUNC is name of function and LINE is location in the source file. */ diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 7b26820266a..6307407935f 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -882,8 +882,6 @@ sem_function::equals_private (sem_item *item) if(!m_checker->compare_bb (bb_sorted[i], m_compared_func->bb_sorted[i])) return return_false(); - dump_message ("All BBs are equal\n"); - auto_vec bb_dict; /* Basic block edges check. */ -- 2.30.2