aboutsummaryrefslogtreecommitdiff
path: root/gcc/domwalk.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-09-27 11:09:41 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-09-27 11:09:41 +0000
commitd2552094b8c0a8aaa92d831ee3de2a72cc20d642 (patch)
tree3e306d8393299ba97b86fc3fe866102ac26afda8 /gcc/domwalk.h
parent04620f22b03308e89d0cc2ceefd8bc8eca19979d (diff)
downloadgcc-d2552094b8c0a8aaa92d831ee3de2a72cc20d642.zip
gcc-d2552094b8c0a8aaa92d831ee3de2a72cc20d642.tar.gz
gcc-d2552094b8c0a8aaa92d831ee3de2a72cc20d642.tar.bz2
invoke.texi (graphite-max-bbs-per-function): Remove.
2017-09-27 Richard Biener <rguenther@suse.de> * doc/invoke.texi (graphite-max-bbs-per-function): Remove. (graphite-max-nb-scop-params): Document special value zero. * domwalk.h (dom_walker::STOP): New symbolical constant. (dom_walker::dom_walker): Add optional parameter for bb to RPO mapping. (dom_walker::~dom_walker): Declare. (dom_walker::before_dom_children): Document STOP return value. (dom_walker::m_user_bb_to_rpo): New member. (dom_walker::m_bb_to_rpo): Likewise. * domwalk.c (dom_walker::dom_walker): Compute bb to RPO mapping here if not provided by the user. (dom_walker::~dom_walker): Free bb to RPO mapping if not provided by the user. (dom_walker::STOP): Define. (dom_walker::walk): Do not compute bb to RPO mapping here. Support STOP return value from before_dom_children to stop walking. * graphite-optimize-isl.c (optimize_isl): If the schedule is the same still generate code if -fgraphite-identity or -floop-parallelize-all are given. * graphite-scop-detection.c: Include cfganal.h. (gather_bbs::gather_bbs): Get and pass through bb to RPO mapping. (gather_bbs::before_dom_children): Return STOP for BBs not in the region. (build_scops): Compute bb to RPO mapping and pass it to the domwalk. Treat --param graphite-max-nb-scop-params=0 as not limiting the number of params. * graphite.c (graphite_initialize): Remove limit on the number of basic-blocks in a function. * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove. (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented default value of 10. From-SVN: r253226
Diffstat (limited to 'gcc/domwalk.h')
-rw-r--r--gcc/domwalk.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/gcc/domwalk.h b/gcc/domwalk.h
index 4b9f70a..6ac93eb 100644
--- a/gcc/domwalk.h
+++ b/gcc/domwalk.h
@@ -30,14 +30,22 @@ along with GCC; see the file COPYING3. If not see
class dom_walker
{
public:
+ static const edge STOP;
+
/* Use SKIP_UNREACHBLE_BLOCKS = true when your client can discover
that some edges are not executable.
If a client can discover that a COND, SWITCH or GOTO has a static
target in the before_dom_children callback, the taken edge should
be returned. The generic walker will clear EDGE_EXECUTABLE on all
- edges it can determine are not executable. */
- dom_walker (cdi_direction direction, bool skip_unreachable_blocks = false);
+ edges it can determine are not executable.
+
+ You can provide a mapping of basic-block index to RPO if you
+ have that readily available or you do multiple walks. */
+ dom_walker (cdi_direction direction, bool skip_unreachable_blocks = false,
+ int *bb_index_to_rpo = NULL);
+
+ ~dom_walker ();
/* Walk the dominator tree. */
void walk (basic_block);
@@ -48,7 +56,10 @@ public:
edges, NULL otherwise. When skipping unreachable blocks, the walker
uses the taken edge information to clear EDGE_EXECUTABLE on the other
edges, exposing unreachable blocks. A NULL return value means all
- outgoing edges should still be considered executable. */
+ outgoing edges should still be considered executable. A return value
+ of STOP means to stop the domwalk from processing dominated blocks from
+ here. This can be used to process a SEME region only (note domwalk
+ will still do work linear in function size). */
virtual edge before_dom_children (basic_block) { return NULL; }
/* Function to call after the recursive walk of the dominator children. */
@@ -61,7 +72,9 @@ private:
dominator tree. */
const ENUM_BITFIELD (cdi_direction) m_dom_direction : 2;
bool m_skip_unreachable_blocks;
+ bool m_user_bb_to_rpo;
basic_block m_unreachable_dom;
+ int *m_bb_to_rpo;
/* Query whether or not the given block is reachable or not. */
bool bb_reachable (struct function *, basic_block);