GCC Middle and Back End API Reference
|
#include <domwalk.h>
Public Member Functions | |
dom_walker (cdi_direction direction) | |
void | walk (basic_block) |
virtual void | before_dom_children (basic_block) |
virtual void | after_dom_children (basic_block) |
Generic dominator tree walker Copyright (C) 2003-2013 Free Software Foundation, Inc. Contributed by Diego Novillo dnovi llo@ redha t.co m
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/. This is the main class for the dominator walker. It is expected that consumers will have a custom class inheriting from it, which will over ride at least one of before_dom_children and after_dom_children to implement the custom behavior.
|
inline |
|
inlinevirtual |
Function to call after the recursive walk of the dominator children.
Reimplemented in eliminate_dom_walker, rewrite_update_dom_walker, strlen_dom_walker, rewrite_dom_walker, nontrapping_dom_walker, dom_opt_dom_walker, uncprop_dom_walker, and single_def_use_dom_walker.
|
inlinevirtual |
Function to call before the recursive walk of the dominator children.
Reimplemented in eliminate_dom_walker, mark_def_dom_walker, rewrite_update_dom_walker, strlen_dom_walker, find_candidates_dom_walker, rewrite_dom_walker, nontrapping_dom_walker, move_computations_dom_walker, invariantness_dom_walker, dom_opt_dom_walker, uncprop_dom_walker, dse_dom_walker, find_comparison_dom_walker, and single_def_use_dom_walker.
void dom_walker::walk | ( | basic_block | bb | ) |
Walk the dominator tree.
Recursively walk the dominator tree. BB is the basic block we are currently visiting.
Don't worry about unreachable blocks.
Callback for subclasses to do custom things before we have walked the dominator children, but before we walk statements.
Mark the current BB to be popped out of the recursion stack once children are processed.
NULL is used to mark pop operations in the recursion stack.
Callback allowing subclasses to do custom things after we have walked dominator children, but before we walk statements.
References bb_postorder, inverted_post_order_compute(), last_basic_block, n_basic_blocks, and postorder_num.