Commit Graph

9 Commits

Author SHA1 Message Date
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Jeff Law b9e59e4f11 [PATCH] Allow vrp to thread across backedges using FSM threader
* cfg-flags.def (IGNORE): New edge flag.
	* tree-vrp.c (identify_jump_threads): Mark and clear edges
	scheduled for removal with EDGE_IGNORE around call into
	jump threader.  Do no thread across edges with EDGE_IGNORE,
	but do allow threading across those with EDGE_DFS_BACK.

	* gcc.dg/tree-ssa/ssa-dom-thread-7.c: Adjust to look for
	realized jump threads.
	* gcc.dg/tree-ssa-pr66752-3.c: Look in vrp1 dump for jump
	threads rather than dom1 dump.

From-SVN: r229902
2015-11-06 16:26:20 -07:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Richard Sandiford 23a5b65a92 Update copyright years in gcc/
From-SVN: r206289
2014-01-02 22:23:26 +00:00
Richard Sandiford d1e082c2c2 Update copyright years in gcc/
From-SVN: r195098
2013-01-10 20:38:27 +00:00
Aldy Hernandez 398b1daa2d tm: Add uninstrumented code path
Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r193271
2012-11-06 15:55:39 -08:00
Eric Botcazou f99ffaa350 cfg-flags.def (ABNORMAL_CALL): Fix comment.
* cfg-flags.def (ABNORMAL_CALL): Fix comment.
	(EH): Likewise.
	(SIBCALL): Likewise.
	* cfgrtl.c (rtl_verify_flow_info_1): Adjust error messages.
	Deal with EDGE_SIBCALL and fix the EDGE_ABNORMAL check.

From-SVN: r193094
2012-11-02 12:10:36 +00:00
Steven Bosscher c466959404 basic-block.h (BB_FLAGS_TO_PRESERVE): New define.
gcc/
	* basic-block.h (BB_FLAGS_TO_PRESERVE): New define.
	(brief_dump_cfg): Update prototype to take flags argument.
	(check_bb_profile): Remove prototype.
	* tracer.c (tracer): Update brief_dump_cfg calls.
	* cfghooks.c (dump_bb): Do not pass TDF_COMMENT to dump_bb_info.
	Call dump_bb_info before and after the cfghook dump_bb.  Terminate
	the dump with a newline.
	(dump_flow_info): Do not call check_bb_profile.
	* cfg.c (clear_bb_flags): Update using BB_FLAGS_TO_PRESERVE.
	(check_bb_profile): Make static.  Take indent and flags arguments.
	(dump_bb_info): Always dump loop depth.  With TDF_DETAILS, call
	check_bb_profile.  Print one edge per line.
	(brief_dump_cfg): Take a flags argument, and filter out
	TDF_COMMENT and TDF_DETAILS.
	* pretty-print.c (pp_base_newline): Set pp_needs_newline to false.
	* gimple-pretty-print.c (dump_gimple_bb_header): Do not use dump_bb_info
	here, it is already called from dump_bb.  Idem for check_bb_profile.
	(dump_gimple_bb_footer): Likewise.
	(gimple_dump_bb_buff): Call pp_flush after dump_gimple_stmt to
	avoid broken dumps for statement histograms.
	(gimple_dump_bb): Handle ENTRY_BLOCK and EXIT_BLOCK.  Do
	not call pp_flush here, the buffer should be empty.
	* sched-rgn.c (debug_region): Pass TDF_BLOCKS to dump_bb.
	* sched-vis.c (debug_bb_slim): Likewise.
	* tree-cfg.c (remove_bb): Pass dump_flags to dump_bb.
	(gimple_debug_bb): Pass TDF_BLOCKS to dump_bb.
	(gimple_dump_cfg): Do brief_dump_cfg with TDF_COMMENT.
	(dump_function_to_file): Do not call check_bb_profile on
	ENTRY_BLOCK and EXIT_BLOCK, check_bb_profile doesn't handle them.
	Use dump_bb instead of gimple_dump_bb.
	(print_loops_bb): Use dump_bb instead of gimple_dump_bb.
	* passes.c (execute_function_dump): Always call print_rtl_with_bb
	for RTL dumps.
	* cfgrtl.c (print_rtl_with_bb): Handle printing without an up-to-date
	CFG.  With TDF_BLOCKS and TDF_DETAILS, do DF dumps at the top and bottom
	of each basic block.

testsuite/
	* gcc.dg/tree-prof/update-loopch.c: Look for counts on the dumps of
	the basic block and check loop depth.
	* gcc.dg/tree-ssa/pr18133-1.c: Dump details, not blocks.  Update
	matching patterns and comments.
	* gcc.dg/tree-ssa/20031021-1.c: Fix check patterns.
	* gcc.dg/tree-ssa/vector-2.c: Likewise.

From-SVN: r189717
2012-07-20 12:25:55 +00:00
Steven Bosscher a315c44ce0 dumpfile.h (TDF_COMMENT): New define.
* dumpfile.h (TDF_COMMENT): New define.
	* basic-block.h (EDGE_FALLTHRU, EDGE_ABNORMAL, EDGE_ABNORMAL_CALL,
	EDGE_EH, EDGE_FAKE, EDGE_DFS_BACK, EDGE_CAN_FALLTHRU,
	EDGE_IRREDUCIBLE_LOOP, EDGE_SIBCALL, EDGE_LOOP_EXIT, EDGE_TRUE_VALUE,
	EDGE_FALSE_VALUE, EDGE_EXECUTABLE, EDGE_CROSSING, EDGE_PRESERVE):
	Move to new file cfg-flags.h.
	(enum cfg_edge_flags): New enum, using cfg-flags.h.
	(EDGE_ALL_FLAGS): Compute value automatically.
	(BB_NEW, BB_REACHABLE, BB_IRREDUCIBLE_LOOP, BB_SUPERBLOCK,
	BB_DISABLE_SCHEDULE, BB_HOT_PARTITION, BB_COLD_PARTITION,
	BB_DUPLICATED, BB_NON_LOCAL_GOTO_TARGET, BB_RTL,
	BB_FORWARDER_BLOCK, BB_NONTHREADABLE_BLOCK, BB_MODIFIED, BB_VISITED,
	BB_IN_TRANSACTION): Move to new file cfg-flags.h.
	(enum bb_flags): Rename to cfg_bb_flags.  Use cfg-flags.h.
	(BB_ALL_FLAGS): New, compute value automatically.
	(dump_bb_info): Update prototype.
	(dump_edge_info): Update prototype.
	* cfg-flags.h: New file.
	* cfg.c (dump_edge_info): Take flags argument.  Be verbose only if
	TDF_DETAILS and not TDF_SLIM.  Include cfg-flags.h for bitnames.
	Check that the edge flags are within the range of EDGE_ALL_FLAGS.
	(debug_bb): Update dump_bb call.
	(dump_cfg_bb_info): Remove.
	(dump_bb_info): New function.  Use cfg-flags.h for bitnames.
	Adjust verbosity using TDF_* flags.  Check that the basic block flags
	are within the range of BB_ALL_FLAGS.
	(brief_dump_cfg): Use dump_bb_info instead of dump_cfg_bb_info.
	* cfghooks.h (struct cfghooks): Update dump_bb hook, take a FILE
	first for consistency with other dump functions.
	(dump_bb): Update prototype accordingly.
	* cfghooks.c: Include dumpfile.h.
	(verify_flow_info): Update dump_edge_info calls.
	(dump_bb): Take a flags argument and pass it around.
	Use dump_bb_info to dump common information about a basic block.
	(dump_flow_info): Moved here from cfgrtl.c.  Make IL agnostic.
	(debug_flow_info): Moved here from cfgrtl.c.
	* profile.c (is_edge_inconsistent): Update dump_bb calls.
	* loop-invariant.c (find_defs): Update print_rtl_with_bb call.
	* rtl.h (debug_bb_n_slim, debug_bb_slim, print_rtl_slim,
	print_rtl_slim_with_bb): Remove prototypes.
	(dump_insn_slim): Adjust prototype to take a const_rtx.
	(print_rtl_with_bb): Adjust prototype.
	* sched-rgn.c (debug_region): Use dump_bb instead of debug_bb_n_slim.
	* sched-vis.c (dump_insn_slim): Take a const_rtx.
	(debug_insn_slim): Prototype here near DEBUG_FUNCTION marker.
	(print_rtl_slim_with_bb): Remove.
	(print_rtl_slim): Rename to debug_rtl_slim.  Print only insn info,
	not basic block info (print_rtl_with_bb with TDF_SLIM should be used
	for that.  Prototype here near DEBUG_FUNCTION marker.
	(debug_bb_slim): Prototype here near DEBUG_FUNCTION marker.
	Use dump_bb.
	(debug_bb_n_slim): Prototype here near DEBUG_FUNCTION marker.
	* tree-cfg.c (gimple_can_merge_blocks_p): Use EDGE_COMPLEX.
	(remove_bb): Update dump_bb call.
	(gimple_debug_bb): Use dump_bb.
	(dump_function_to_file): Update gimple_dump_bb call.
	(print_loops_bb): Likewise.
	* tree-flow.h (gimple_dump_bb): Update prototype.
	* gimple-pretty-print.c (dump_bb_header): Rename to
	dump_gimple_bb_header.  Write to a stream instead of a pretty
	printer.  Use dump_bb_info to dump basic block info.
	(dump_bb_end): Rename to dump_gimple_bb_footer.  Write to a
	stream instead of a pretty printer.  Use dump_bb_info.
	(gimple_dump_bb_buff): Do not call dump_bb_header and dump_bb_end.
	(gimple_dump_bb): Do it here with dump_gimple_bb_header and
	dump_gimple_bb_footer.
	* cfgrtl.c (rtl_dump_bb): Update prototype.  Only dump DF if the
	dump flags have TDF_DETAILS.  Use dump_insn_slim if TDF_SLIM.
	(print_rtl_with_bb): Take a flags argument and pass it around.
	Use dump_insn_slim if TDF_SLIM.
	(dump_bb_info): Removed and re-incarnated in cfg.c.
	(dump_flow_info): Moved to cfghooks.c.
	(debug_flow_info): Moved to cfghooks.c.
	* passes.c (execute_function_dump): Unconditionally use
	print_rtl_with_bb for RTL dumps, now that it understands TDF_SLIM.
	* final.c (dump_basic_block_info): Update dump_edge_info calls.
	* tree-vrp.c (dump_asserts_for): Likewise.
	* ifcvt.c (if_convert): Unconditionally use print_rtl_with_bb.
	* tree-if-conv.c (if_convertible_bb_p): Don't look at
	EDGE_ABNORMAL_CALL, it has no meaning in the GIMPLE world.
	* trans-mem.c (make_tm_edge): Don't set EDGE_ABNORMAL_CALL,
	for the same reason.
	* config/rl78/rl78.c (rl78_reorg): Update print_rtl_with_bb calls.

From-SVN: r189590
2012-07-17 23:17:20 +00:00