aboutsummaryrefslogtreecommitdiff
path: root/source/validate.h
diff options
context:
space:
mode:
authorGreg Fischer <greg@lunarg.com>2017-04-28 13:38:10 -0600
committerDavid Neto <dneto@google.com>2017-05-08 15:02:59 -0400
commitb25b3300690be08a7df2a5af3da7214b96ebc639 (patch)
tree9c39493285aae876131bbc0125e37e3ac49ae88d /source/validate.h
parent3f90058d2ff26ba20c84dd10d917720027f391b9 (diff)
downloadspirv-tools-b25b3300690be08a7df2a5af3da7214b96ebc639.tar.gz
Inline: Create CFA class
Create class to encapsulate control flow analysis and share across validator and optimizer. A WIP. Start with DepthFirstTraversal. Next pull in CalculateDominators.
Diffstat (limited to 'source/validate.h')
-rw-r--r--source/validate.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/source/validate.h b/source/validate.h
index b6d05168..a3976fb8 100644
--- a/source/validate.h
+++ b/source/validate.h
@@ -34,31 +34,6 @@ class BasicBlock;
using get_blocks_func =
std::function<const std::vector<BasicBlock*>*(const BasicBlock*)>;
-/// @brief Depth first traversal starting from the \p entry BasicBlock
-///
-/// This function performs a depth first traversal from the \p entry
-/// BasicBlock and calls the pre/postorder functions when it needs to process
-/// the node in pre order, post order. It also calls the backedge function
-/// when a back edge is encountered.
-///
-/// @param[in] entry The root BasicBlock of a CFG
-/// @param[in] successor_func A function which will return a pointer to the
-/// successor nodes
-/// @param[in] preorder A function that will be called for every block in a
-/// CFG following preorder traversal semantics
-/// @param[in] postorder A function that will be called for every block in a
-/// CFG following postorder traversal semantics
-/// @param[in] backedge A function that will be called when a backedge is
-/// encountered during a traversal
-/// NOTE: The @p successor_func and predecessor_func each return a pointer to a
-/// collection such that iterators to that collection remain valid for the
-/// lifetime of the algorithm.
-void DepthFirstTraversal(
- const BasicBlock* entry, get_blocks_func successor_func,
- std::function<void(const BasicBlock*)> preorder,
- std::function<void(const BasicBlock*)> postorder,
- std::function<void(const BasicBlock*, const BasicBlock*)> backedge);
-
/// @brief Calculates dominator edges for a set of blocks
///
/// Computes dominators using the algorithm of Cooper, Harvey, and Kennedy