RetroArch
Public Member Functions | Private Member Functions | Private Attributes | List of all members
spirv_cross::CFG Class Reference

#include <spirv_cfg.hpp>

Collaboration diagram for spirv_cross::CFG:
[legend]

Public Member Functions

 CFG (Compiler &compiler, const SPIRFunction &function)
 
Compilerget_compiler ()
 
const Compilerget_compiler () const
 
const SPIRFunctionget_function () const
 
uint32_t get_immediate_dominator (uint32_t block) const
 
uint32_t get_visit_order (uint32_t block) const
 
uint32_t find_common_dominator (uint32_t a, uint32_t b) const
 
const std::vector< uint32_t > & get_preceding_edges (uint32_t block) const
 
const std::vector< uint32_t > & get_succeeding_edges (uint32_t block) const
 
template<typename Op >
void walk_from (std::unordered_set< uint32_t > &seen_blocks, uint32_t block, const Op &op) const
 

Private Member Functions

void add_branch (uint32_t from, uint32_t to)
 
void build_post_order_visit_order ()
 
void build_immediate_dominators ()
 
bool post_order_visit (uint32_t block)
 
bool is_back_edge (uint32_t to) const
 

Private Attributes

Compilercompiler
 
const SPIRFunctionfunc
 
std::vector< std::vector< uint32_t > > preceding_edges
 
std::vector< std::vector< uint32_t > > succeeding_edges
 
std::vector< uint32_timmediate_dominators
 
std::vector< int > visit_order
 
std::vector< uint32_tpost_order
 
uint32_t visit_count = 0
 

Constructor & Destructor Documentation

◆ CFG()

spirv_cross::CFG::CFG ( Compiler compiler,
const SPIRFunction function 
)
Here is the call graph for this function:

Member Function Documentation

◆ add_branch()

void spirv_cross::CFG::add_branch ( uint32_t  from,
uint32_t  to 
)
private
Here is the caller graph for this function:

◆ build_immediate_dominators()

void spirv_cross::CFG::build_immediate_dominators ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_post_order_visit_order()

void spirv_cross::CFG::build_post_order_visit_order ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_common_dominator()

uint32_t spirv_cross::CFG::find_common_dominator ( uint32_t  a,
uint32_t  b 
) const
Here is the caller graph for this function:

◆ get_compiler() [1/2]

Compiler& spirv_cross::CFG::get_compiler ( )
inline
Here is the caller graph for this function:

◆ get_compiler() [2/2]

const Compiler& spirv_cross::CFG::get_compiler ( ) const
inline

◆ get_function()

const SPIRFunction& spirv_cross::CFG::get_function ( ) const
inline
Here is the caller graph for this function:

◆ get_immediate_dominator()

uint32_t spirv_cross::CFG::get_immediate_dominator ( uint32_t  block) const
inline
Here is the caller graph for this function:

◆ get_preceding_edges()

const std::vector<uint32_t>& spirv_cross::CFG::get_preceding_edges ( uint32_t  block) const
inline
Here is the caller graph for this function:

◆ get_succeeding_edges()

const std::vector<uint32_t>& spirv_cross::CFG::get_succeeding_edges ( uint32_t  block) const
inline
Here is the caller graph for this function:

◆ get_visit_order()

uint32_t spirv_cross::CFG::get_visit_order ( uint32_t  block) const
inline
Here is the caller graph for this function:

◆ is_back_edge()

bool spirv_cross::CFG::is_back_edge ( uint32_t  to) const
private
Here is the caller graph for this function:

◆ post_order_visit()

bool spirv_cross::CFG::post_order_visit ( uint32_t  block)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ walk_from()

template<typename Op >
void spirv_cross::CFG::walk_from ( std::unordered_set< uint32_t > &  seen_blocks,
uint32_t  block,
const Op &  op 
) const
inline
Here is the caller graph for this function:

Member Data Documentation

◆ compiler

Compiler& spirv_cross::CFG::compiler
private

◆ func

const SPIRFunction& spirv_cross::CFG::func
private

◆ immediate_dominators

std::vector<uint32_t> spirv_cross::CFG::immediate_dominators
private

◆ post_order

std::vector<uint32_t> spirv_cross::CFG::post_order
private

◆ preceding_edges

std::vector<std::vector<uint32_t> > spirv_cross::CFG::preceding_edges
private

◆ succeeding_edges

std::vector<std::vector<uint32_t> > spirv_cross::CFG::succeeding_edges
private

◆ visit_count

uint32_t spirv_cross::CFG::visit_count = 0
private

◆ visit_order

std::vector<int> spirv_cross::CFG::visit_order
private

The documentation for this class was generated from the following files: