This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp4, committed] Revert "Add dom_walker::walk_until"
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>
- Cc: Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 6 Nov 2015 16:06:04 +0100
- Subject: [gomp4, committed] Revert "Add dom_walker::walk_until"
- Authentication-results: sourceware.org; auth=none
Hi,
this patch reverts the "Add dom_walker::walk_until" patch.
The dom_walker::walk_until functionality is no longer required now that
we've reverted pass_dominator::sese_mode_p.
Committed to gomp-4_0-branch.
Thanks,
- Tom
Revert "Add dom_walker::walk_until"
2015-11-06 Tom de Vries <tom@codesourcery.com>
revert:
2015-10-12 Tom de Vries <tom@codesourcery.com>
* domwalk.c (dom_walker::walk): Rename to ...
(dom_walker::walk_until): ... this. Add and handle until and
until_inclusive parameters.
(dom_walker::walk): Reimplement using dom_walker::walk_until.
* domwalk.h (dom_walker::walk_until): Declare.
---
gcc/domwalk.c | 32 +++++---------------------------
gcc/domwalk.h | 2 --
2 files changed, 5 insertions(+), 29 deletions(-)
diff --git a/gcc/domwalk.c b/gcc/domwalk.c
index 6a205f0..167fc38 100644
--- a/gcc/domwalk.c
+++ b/gcc/domwalk.c
@@ -143,18 +143,11 @@ cmp_bb_postorder (const void *a, const void *b)
}
/* Recursively walk the dominator tree.
- BB is the basic block we are currently visiting. UNTIL is a basic_block that
- is the root of a subtree that we won't visit. If UNTIL_INCLUSIVE, we visit
- UNTIL, but not it's children. Otherwise don't visit UNTIL and its
- children. */
+ BB is the basic block we are currently visiting. */
void
-dom_walker::walk_until (basic_block bb, basic_block until, bool until_inclusive)
+dom_walker::walk (basic_block bb)
{
- bool skip_self = (bb == until && !until_inclusive);
- if (skip_self)
- return;
-
basic_block dest;
basic_block *worklist = XNEWVEC (basic_block,
n_basic_blocks_for_fn (cfun) * 2);
@@ -188,15 +181,9 @@ dom_walker::walk_until (basic_block bb, basic_block until, bool until_inclusive)
worklist[sp++] = NULL;
int saved_sp = sp;
- bool skip_children = bb == until && until_inclusive;
- if (!skip_children)
- for (dest = first_dom_son (m_dom_direction, bb);
- dest; dest = next_dom_son (m_dom_direction, dest))
- {
- bool skip_child = (dest == until && !until_inclusive);
- if (!skip_child)
- worklist[sp++] = dest;
- }
+ for (dest = first_dom_son (m_dom_direction, bb);
+ dest; dest = next_dom_son (m_dom_direction, dest))
+ worklist[sp++] = dest;
if (m_dom_direction == CDI_DOMINATORS)
switch (sp - saved_sp)
{
@@ -230,12 +217,3 @@ dom_walker::walk_until (basic_block bb, basic_block until, bool until_inclusive)
}
free (worklist);
}
-
-/* Recursively walk the dominator tree.
- BB is the basic block we are currently visiting. */
-
-void
-dom_walker::walk (basic_block bb)
-{
- walk_until (bb, NULL, true);
-}
diff --git a/gcc/domwalk.h b/gcc/domwalk.h
index 71e6075..71a7c47 100644
--- a/gcc/domwalk.h
+++ b/gcc/domwalk.h
@@ -34,8 +34,6 @@ public:
/* Walk the dominator tree. */
void walk (basic_block);
- /* Walk a part of the dominator tree. */
- void walk_until (basic_block, basic_block, bool);
/* Function to call before the recursive walk of the dominator children. */
virtual void before_dom_children (basic_block) {}
--
1.9.1