aboutsummaryrefslogtreecommitdiff
path: root/gcc/dumpfile.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2018-10-04 17:50:52 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2018-10-04 17:50:52 +0000
commitf4ebbd243f887b3c5e01c65ad80a8f64a8261e61 (patch)
treef76bbe59cb30638b7432efe17c3ddd67c6378b9d /gcc/dumpfile.c
parent7db960c5b6adad2fd11789870aa514985ea0da04 (diff)
downloadgcc-f4ebbd243f887b3c5e01c65ad80a8f64a8261e61.zip
gcc-f4ebbd243f887b3c5e01c65ad80a8f64a8261e61.tar.gz
gcc-f4ebbd243f887b3c5e01c65ad80a8f64a8261e61.tar.bz2
Report vectorization problems via a new opt_problem class
This is v3 of the patch; previous versions were: v2: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00446.html v1: https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01462.html This patch introduces a class opt_problem, along with wrapper classes for bool (opt_result) and for pointers (e.g. opt_loop_vec_info for loop_vec_info). opt_problem instances are created when an optimization problem is encountered, but only if dump_enabled_p. They are manually propagated up the callstack, and are manually reported at the "top level" of an optimization if dumping is enabled, to give the user a concise summary of the problem *after* the failure is reported. In particular, the location of the problematic statement is captured and emitted, rather than just the loop's location. For example: no-vfa-vect-102.c:24:3: missed: couldn't vectorize loop no-vfa-vect-102.c:27:7: missed: statement clobbers memory: __asm__ __volatile__("" : : : "memory"); Changed in v3: * This version bootstraps and passes regression testing (on x86_64-pc-linux-gnu). * added selftests, to exercise the opt_problem machinery * removed the "bool to opt_result" ctor, so that attempts to use e.g. return a bool from an opt_result-returning function will fail at compile time * use formatted printing within opt_problem ctor to replace the various dump_printf_loc calls * dropped i18n * changed the sense of vect_analyze_data_ref_dependence's return value (see the ChangeLog) * add MSG_PRIORITY_REEMITTED, so that -fopt-info can show the messages, without them messing up the counts in scan-tree-dump-times in DejaGnu tests gcc/ChangeLog: * Makefile.in (OBJS): Add opt-problem.o. * dump-context.h: Include "selftest.h. (selftest::temp_dump_context): New forward decl. (class dump_context): Make friend of class selftest::temp_dump_context. (dump_context::dump_loc_immediate): New decl. (class dump_pretty_printer): Move here from dumpfile.c. (class temp_dump_context): Move to namespace selftest. (temp_dump_context::temp_dump_context): Add param "forcibly_enable_dumping". (selftest::verify_dumped_text): (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c. (selftest::verify_item): (ASSERT_IS_TEXT): Move here from dumpfile.c. (ASSERT_IS_TREE): Likewise. (ASSERT_IS_GIMPLE): Likewise. * dumpfile.c (dump_context::dump_loc): Move immediate dumping to... (dump_context::dump_loc_immediate): ...this new function. (class dump_pretty_printer): Move to dump-context.h. (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED. (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED. (temp_dump_context::temp_dump_context): Move to "selftest" namespace. Add param "forcibly_enable_dumping", and use it to conditionalize the use of m_pp; (selftest::verify_dumped_text): Make non-static. (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h. (selftest::verify_item): Make non-static. (ASSERT_IS_TEXT): Move to dump-context.h. (ASSERT_IS_TREE): Likewise. (ASSERT_IS_GIMPLE): Likewise. (selftest::test_capture_of_dump_calls): Pass "true" for new param of temp_dump_context. * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and TDF_COMPARE_DEBUG. * opt-problem.cc: New file. * opt-problem.h: New file. * optinfo-emit-json.cc (selftest::test_building_json_from_dump_calls): Pass "true" for new param of temp_dump_context. * optinfo.cc (optinfo_kind_to_dump_flag): New function. (optinfo::emit_for_opt_problem): New function. (optinfo::emit): Clarity which emit_item is used. * optinfo.h (optinfo::get_dump_location): New accessor. (optinfo::emit_for_opt_problem): New decl. (optinfo::emit): Make const. * selftest-run-tests.c (selftest::run_tests): Call selftest::opt_problem_cc_tests. * selftest.h (selftest::opt_problem_cc_tests): New decl. * tree-data-ref.c (dr_analyze_innermost): Convert return type from bool to opt_result, converting fprintf messages to opt_result::failure_at calls. Add "stmt" param for use by the failure_at calls. (create_data_ref): Pass "stmt" to the dr_analyze_innermost call. (runtime_alias_check_p): Convert return type from bool to opt_result, converting dump_printf calls to opt_result::failure_at, using the statement DDR_A for their location. (find_data_references_in_stmt): Convert return type from bool to opt_result, converting "return false" to opt_result::failure_at with a new message. * tree-data-ref.h: Include "opt-problem.h". (dr_analyze_innermost): Convert return type from bool to opt_result, and add a const gimple * param. (find_data_references_in_stmt): Convert return type from bool to opt_result. (runtime_alias_check_p): Likewise. * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to dr_analyze_innermost. * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Convert return type from bool to opt_result, adding a message for the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case. (vect_analyze_data_ref_dependence): Convert return type from bool to opt_result. Change sense of return type from "false" effectively meaning "no problems" to "false" meaning a problem, so that "return false" becomes "return opt_result::success". Convert "return true" calls to opt_result::failure_at, using the location of statement A rather than vect_location. (vect_analyze_data_ref_dependences): Convert return type from bool to opt_result. (verify_data_ref_alignment): Likewise, converting dump_printf_loc calls to opt_result::failure_at, using the stmt location rather than vect_location. (vect_verify_datarefs_alignment): Convert return type from bool to opt_result. (vect_enhance_data_refs_alignment): Likewise. Split local "stat" into multiple more-tightly-scoped copies. (vect_analyze_data_refs_alignment): Convert return type from bool to opt_result. (vect_analyze_data_ref_accesses): Likewise, converting a "return false" to a "return opt_result::failure_at", adding a new message. (vect_prune_runtime_alias_test_list): Convert return type from bool to opt_result, converting dump_printf_loc to opt_result::failure_at. Add a %G to show the pertinent statement, and use the stmt's location rather than vect_location. (vect_find_stmt_data_reference): Convert return type from bool to opt_result, converting dump_printf_loc to opt_result::failure_at, using stmt's location. (vect_analyze_data_refs): Convert return type from bool to opt_result. Convert "return false" to "return opt_result::failure_at", adding messages as needed. * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return type from bool to opt_result. (vect_determine_vf_for_stmt): Likewise. (vect_determine_vectorization_factor): Likewise, converting dump_printf_loc to opt_result::failure_at, using location of phi rather than vect_location. (vect_analyze_loop_form_1): Convert return type from bool to opt_result, converting dump_printf_loc calls, retaining the use of vect_location. (vect_analyze_loop_form): Convert return type from loop_vec_info to opt_loop_vec_info. (vect_analyze_loop_operations): Convert return type from bool to opt_result, converting dump_printf_loc calls, using the location of phi/stmt rather than vect_location where available. Convert various "return false" to "return opt_result::failure_at" with "unsupported phi" messages. (vect_get_datarefs_in_loop): Convert return type from bool to opt_result. Add a message for the PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure. (vect_analyze_loop_2): Convert return type from bool to opt_result. Ensure "ok" is set to a opt_result::failure_at before each "goto again;", adding new messages where needed. Add "unsupported grouped {store|load}" messages. (vect_analyze_loop): Convert return type from loop_vec_info to opt_loop_vec_info. * tree-vect-slp.c (vect_analyze_slp): Convert return type from bool to opt_result. * tree-vect-stmts.c (process_use): Likewise, converting dump_printf_loc call and using stmt location, rather than vect_location. (vect_mark_stmts_to_be_vectorized): Likeise. (vect_analyze_stmt): Likewise, adding a %G. (vect_get_vector_types_for_stmt): Convert return type from bool to opt_result, converting dump_printf_loc calls and using stmt location, rather than vect_location. (vect_get_mask_type_for_stmt): Convert return type from tree to opt_tree, converting dump_printf_loc calls and using stmt location. * tree-vectorizer.c: Include "opt-problem.h. (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from loop_vec_info to opt_loop_vec_info. If if fails, and dumping is enabled, use it to report at the top level "couldn't vectorize loop" followed by the problem. * tree-vectorizer.h (opt_loop_vec_info): New typedef. (vect_mark_stmts_to_be_vectorized): Convert return type from bool to opt_result. (vect_analyze_stmt): Likewise. (vect_get_vector_types_for_stmt): Likewise. (tree vect_get_mask_type_for_stmt): Likewise. (vect_analyze_data_ref_dependences): Likewise. (vect_enhance_data_refs_alignment): Likewise. (vect_analyze_data_refs_alignment): Likewise. (vect_verify_datarefs_alignment): Likewise. (vect_analyze_data_ref_accesses): Likewise. (vect_prune_runtime_alias_test_list): Likewise. (vect_find_stmt_data_reference): Likewise. (vect_analyze_data_refs): Likewise. (vect_analyze_loop): Convert return type from loop_vec_info to opt_loop_vec_info. (vect_analyze_loop_form): Likewise. (vect_analyze_slp): Convert return type from bool to opt_result. gcc/testsuite/ChangeLog: * gcc.dg/vect/nodump-vect-opt-info-2.c: New test. * gcc.dg/vect/vect-alias-check-4.c: Add "-fopt-info-vec-all" to dg-additional-options. Add dg-message and dg-missed directives to verify that -fopt-info messages are written at the correct locations. From-SVN: r264852
Diffstat (limited to 'gcc/dumpfile.c')
-rw-r--r--gcc/dumpfile.c160
1 files changed, 52 insertions, 108 deletions
diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c
index e15edc7..0b140ff 100644
--- a/gcc/dumpfile.c
+++ b/gcc/dumpfile.c
@@ -562,6 +562,21 @@ dump_context::dump_loc (dump_flags_t dump_kind, const dump_location_t &loc)
{
end_any_optinfo ();
+ dump_loc_immediate (dump_kind, loc);
+
+ if (optinfo_enabled_p ())
+ {
+ optinfo &info = begin_next_optinfo (loc);
+ info.handle_dump_file_kind (dump_kind);
+ }
+}
+
+/* As dump_loc above, but without starting a new optinfo. */
+
+void
+dump_context::dump_loc_immediate (dump_flags_t dump_kind,
+ const dump_location_t &loc)
+{
location_t srcloc = loc.get_location_t ();
if (dump_file && apply_dump_filter_p (dump_kind, pflags))
@@ -573,12 +588,6 @@ dump_context::dump_loc (dump_flags_t dump_kind, const dump_location_t &loc)
/* Support for temp_dump_context in selftests. */
if (m_test_pp && apply_dump_filter_p (dump_kind, m_test_pp_flags))
::dump_loc (dump_kind, m_test_pp, srcloc);
-
- if (optinfo_enabled_p ())
- {
- optinfo &info = begin_next_optinfo (loc);
- info.handle_dump_file_kind (dump_kind);
- }
}
/* Make an item for the given dump call, equivalent to print_gimple_stmt. */
@@ -739,49 +748,6 @@ dump_context::dump_generic_expr_loc (dump_flags_t dump_kind,
dump_generic_expr (dump_kind, extra_dump_flags, t);
}
-/* A subclass of pretty_printer for implementing dump_context::dump_printf_va.
- In particular, the formatted chunks are captured as optinfo_item instances,
- thus retaining metadata about the entities being dumped (e.g. source
- locations), rather than just as plain text. */
-
-class dump_pretty_printer : public pretty_printer
-{
-public:
- dump_pretty_printer (dump_context *context, dump_flags_t dump_kind);
-
- void emit_items (optinfo *dest);
-
-private:
- /* Information on an optinfo_item that was generated during phase 2 of
- formatting. */
- struct stashed_item
- {
- stashed_item (const char **buffer_ptr_, optinfo_item *item_)
- : buffer_ptr (buffer_ptr_), item (item_) {}
- const char **buffer_ptr;
- optinfo_item *item;
- };
-
- static bool format_decoder_cb (pretty_printer *pp, text_info *text,
- const char *spec, int /*precision*/,
- bool /*wide*/, bool /*set_locus*/,
- bool /*verbose*/, bool */*quoted*/,
- const char **buffer_ptr);
-
- bool decode_format (text_info *text, const char *spec,
- const char **buffer_ptr);
-
- void stash_item (const char **buffer_ptr, optinfo_item *item);
-
- void emit_any_pending_textual_chunks (optinfo *dest);
-
- void emit_item (optinfo_item *item, optinfo *dest);
-
- dump_context *m_context;
- dump_flags_t m_dump_kind;
- auto_vec<stashed_item> m_stashed_items;
-};
-
/* dump_pretty_printer's ctor. */
dump_pretty_printer::dump_pretty_printer (dump_context *context,
@@ -1732,7 +1698,12 @@ dump_switch_p_1 (const char *arg, struct dump_file_info *dfi, bool doglob)
return 0;
ptr = option_value;
- flags = MSG_ALL_PRIORITIES;
+
+ /* Retain "user-facing" and "internals" messages, but filter out
+ those from an opt_problem being re-emitted at the top level
+ (MSG_PRIORITY_REEMITTED), so as to avoid duplicate messages
+ messing up scan-tree-dump-times" in DejaGnu tests. */
+ flags = MSG_PRIORITY_USER_FACING | MSG_PRIORITY_INTERNALS;
while (*ptr)
{
@@ -1830,8 +1801,9 @@ opt_info_switch_p_1 (const char *arg, dump_flags_t *flags,
*filename = NULL;
/* Default to filtering out "internals" messages, and retaining
- "user-facing" messages. */
- *flags = MSG_PRIORITY_USER_FACING;
+ "user-facing" messages, and those from an opt_problem being
+ re-emitted at the top level. */
+ *flags = MSG_PRIORITY_USER_FACING | MSG_PRIORITY_REEMITTED;
*optgroup_flags = OPTGROUP_NONE;
@@ -1981,19 +1953,26 @@ enable_rtl_dump_file (void)
#if CHECKING_P
+namespace selftest {
+
/* temp_dump_context's ctor. Temporarily override the dump_context
(to forcibly enable optinfo-generation). */
temp_dump_context::temp_dump_context (bool forcibly_enable_optinfo,
+ bool forcibly_enable_dumping,
dump_flags_t test_pp_flags)
-
: m_context (),
m_saved (&dump_context ().get ())
{
dump_context::s_current = &m_context;
m_context.m_forcibly_enable_optinfo = forcibly_enable_optinfo;
- m_context.m_test_pp = &m_pp;
- m_context.m_test_pp_flags = test_pp_flags;
+ /* Conditionally enable the test dump, so that we can verify both the
+ dump_enabled_p and the !dump_enabled_p cases in selftests. */
+ if (forcibly_enable_dumping)
+ {
+ m_context.m_test_pp = &m_pp;
+ m_context.m_test_pp_flags = test_pp_flags;
+ }
dump_context::get ().refresh_dumps_are_enabled ();
}
@@ -2015,8 +1994,6 @@ temp_dump_context::get_dumped_text ()
return pp_formatted_text (&m_pp);
}
-namespace selftest {
-
/* Verify that the dump_location_t constructors capture the source location
at which they were called (provided that the build compiler is sufficiently
recent). */
@@ -2055,7 +2032,7 @@ test_impl_location ()
EXPECTED_TEXT, using LOC for the location of any failure.
As a side-effect, the internal buffer is 0-terminated. */
-static void
+void
verify_dumped_text (const location &loc,
temp_dump_context *context,
const char *expected_text)
@@ -2065,18 +2042,9 @@ verify_dumped_text (const location &loc,
expected_text);
}
-/* Verify that the text dumped so far in CONTEXT equals
- EXPECTED_TEXT.
- As a side-effect, the internal buffer is 0-terminated. */
-
-#define ASSERT_DUMPED_TEXT_EQ(CONTEXT, EXPECTED_TEXT) \
- SELFTEST_BEGIN_STMT \
- verify_dumped_text (SELFTEST_LOCATION, &(CONTEXT), (EXPECTED_TEXT)); \
- SELFTEST_END_STMT
-
/* Verify that ITEM has the expected values. */
-static void
+void
verify_item (const location &loc,
const optinfo_item *item,
enum optinfo_item_kind expected_kind,
@@ -2088,30 +2056,6 @@ verify_item (const location &loc,
ASSERT_STREQ_AT (loc, item->get_text (), expected_text);
}
-/* Verify that ITEM is a text item, with EXPECTED_TEXT. */
-
-#define ASSERT_IS_TEXT(ITEM, EXPECTED_TEXT) \
- SELFTEST_BEGIN_STMT \
- verify_item (SELFTEST_LOCATION, (ITEM), OPTINFO_ITEM_KIND_TEXT, \
- UNKNOWN_LOCATION, (EXPECTED_TEXT)); \
- SELFTEST_END_STMT
-
-/* Verify that ITEM is a tree item, with the expected values. */
-
-#define ASSERT_IS_TREE(ITEM, EXPECTED_LOCATION, EXPECTED_TEXT) \
- SELFTEST_BEGIN_STMT \
- verify_item (SELFTEST_LOCATION, (ITEM), OPTINFO_ITEM_KIND_TREE, \
- (EXPECTED_LOCATION), (EXPECTED_TEXT)); \
- SELFTEST_END_STMT
-
-/* Verify that ITEM is a gimple item, with the expected values. */
-
-#define ASSERT_IS_GIMPLE(ITEM, EXPECTED_LOCATION, EXPECTED_TEXT) \
- SELFTEST_BEGIN_STMT \
- verify_item (SELFTEST_LOCATION, (ITEM), OPTINFO_ITEM_KIND_GIMPLE, \
- (EXPECTED_LOCATION), (EXPECTED_TEXT)); \
- SELFTEST_END_STMT
-
/* Verify that calls to the dump_* API are captured and consolidated into
optimization records. */
@@ -2144,7 +2088,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* Test of dump_printf. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_printf (MSG_NOTE, "int: %i str: %s", 42, "foo");
@@ -2161,7 +2105,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* Test of dump_printf with %T. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_printf (MSG_NOTE, "tree: %T", integer_zero_node);
@@ -2179,7 +2123,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* Test of dump_printf with %E. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_printf (MSG_NOTE, "gimple: %E", stmt);
@@ -2197,7 +2141,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* Test of dump_printf with %G. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_printf (MSG_NOTE, "gimple: %G", stmt);
@@ -2220,7 +2164,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
- multiple dump-specific format codes: some consecutive, others
separated by text, trailing text after the final one. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_printf_loc (MSG_NOTE, loc, "before %T and %T"
" %i consecutive %E%E after\n",
@@ -2248,7 +2192,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* Tree, via dump_generic_expr. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_printf_loc (MSG_NOTE, loc, "test of tree: ");
dump_generic_expr (MSG_NOTE, TDF_SLIM, integer_zero_node);
@@ -2268,7 +2212,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* Tree, via dump_generic_expr_loc. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_generic_expr_loc (MSG_NOTE, loc, TDF_SLIM, integer_one_node);
@@ -2288,7 +2232,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
{
/* dump_gimple_stmt_loc. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_gimple_stmt_loc (MSG_NOTE, loc, TDF_SLIM, stmt, 2);
@@ -2304,7 +2248,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* dump_gimple_stmt. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 2);
@@ -2320,7 +2264,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* dump_gimple_expr_loc. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_gimple_expr_loc (MSG_NOTE, loc, TDF_SLIM, stmt, 2);
@@ -2336,7 +2280,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* dump_gimple_expr. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_gimple_expr (MSG_NOTE, TDF_SLIM, stmt, 2);
@@ -2353,7 +2297,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* poly_int. */
{
- temp_dump_context tmp (with_optinfo,
+ temp_dump_context tmp (with_optinfo, true,
MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING);
dump_dec (MSG_NOTE, poly_int64 (42));
@@ -2378,7 +2322,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
if (j / 2)
dump_filter |= MSG_PRIORITY_INTERNALS;
- temp_dump_context tmp (with_optinfo, dump_filter);
+ temp_dump_context tmp (with_optinfo, true, dump_filter);
/* Emit various messages, mostly with implicit priority. */
dump_printf_loc (MSG_NOTE, stmt, "msg 1\n");
dump_printf_loc (MSG_NOTE | MSG_PRIORITY_INTERNALS, stmt,
@@ -2460,7 +2404,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
{
/* MSG_OPTIMIZED_LOCATIONS. */
{
- temp_dump_context tmp (true, MSG_ALL_KINDS);
+ temp_dump_context tmp (true, true, MSG_ALL_KINDS);
dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, "test");
ASSERT_EQ (tmp.get_pending_optinfo ()->get_kind (),
OPTINFO_KIND_SUCCESS);
@@ -2468,7 +2412,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* MSG_MISSED_OPTIMIZATION. */
{
- temp_dump_context tmp (true, MSG_ALL_KINDS);
+ temp_dump_context tmp (true, true, MSG_ALL_KINDS);
dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc, "test");
ASSERT_EQ (tmp.get_pending_optinfo ()->get_kind (),
OPTINFO_KIND_FAILURE);
@@ -2477,7 +2421,7 @@ test_capture_of_dump_calls (const line_table_case &case_)
/* Verify that MSG_* affect AUTO_DUMP_SCOPE and the dump calls. */
{
- temp_dump_context tmp (false,
+ temp_dump_context tmp (false, true,
MSG_OPTIMIZED_LOCATIONS | MSG_ALL_PRIORITIES);
dump_printf_loc (MSG_NOTE, stmt, "msg 1\n");
{