PandA-2024.02
|
Visitor/walker design pattern. More...
#include "refcount.hpp"
#include <algorithm>
#include <boost/preprocessor/facilities/empty.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <deque>
Go to the source code of this file.
Data Structures | |
class | object_visitor |
object visitor template. More... | |
class | for_each_functor< T, visitor_obj > |
functor used to traverse sequences with std::for_each More... | |
Macros | |
#define | GETID(field) field##_ID |
return the id given a super class or a class member More... | |
#define | VISIT_SC(mask, superclass, method) |
macro used to visit the super class More... | |
#define | VISIT_MEMBER_NAMED(ref_obj_name, mask, ref_obj, method) |
macro used to visit a non null member More... | |
#define | VISIT_MEMBER(mask, ref_obj, method) VISIT_MEMBER_NAMED(ref_obj, mask, ref_obj, method) |
#define | SEQ_VISIT_MEMBER(mask, seq, seqbasetype, method, visitor_type, visitor_obj) |
macro used to traverse non empty sequences More... | |
#define | NO_VISIT ~0U |
constant used to avoid member visit More... | |
#define | ALL_VISIT 0U |
constant used to allow member visit More... | |
#define | SET_NO_VISIT_INDEX(mask, index) ((mask) |= (1U << GETID(index))) |
macro used to selectively avoid member visit More... | |
#define | SET_VISIT_INDEX(mask, index) ((mask) &= ~(1U << GETID(index))) |
macro used to selectively allow member visit More... | |
#define | OPERATOR_MACRO_HEADER(r, data, elem) virtual void operator()(const elem*, unsigned int&) |
#define | OPERATOR_MACRO_DECL(r, data, elem) OPERATOR_MACRO_HEADER(r, data, elem); |
#define | OPERATOR_MACRO(r, data, elem) |
#define | OPERATOR_MACRO_HEADERO(r, data, elem) void operator()(const elem*, unsigned int&) override |
#define | OPERATOR_MACRO_DECLO(r, data, elem) OPERATOR_MACRO_HEADERO(r, data, elem); |
#define | OPERATOR_MACROO(r, data, elem) |
#define | FORWARD_DECLARATION_MACRO(r, data, elem) class elem; |
forward declaration macro More... | |
Visitor/walker design pattern.
Definition in file visitor.hpp.
#define ALL_VISIT 0U |
constant used to allow member visit
Definition at line 71 of file visitor.hpp.
Referenced by typename_type(), null_node::visit(), tree_reindex::visit(), gimple_pragma::visit(), profiling_pragma::visit(), statistical_profiling::visit(), map_pragma::visit(), call_hw_pragma::visit(), bloc::visit(), call_point_hw_pragma::visit(), issue_pragma::visit(), blackbox_pragma::visit(), omp_pragma::visit(), omp_parallel_pragma::visit(), omp_sections_pragma::visit(), omp_parallel_sections_pragma::visit(), omp_section_pragma::visit(), omp_target_pragma::visit(), omp_task_pragma::visit(), omp_critical_pragma::visit(), omp_atomic_pragma::visit(), omp_for_pragma::visit(), omp_simd_pragma::visit(), omp_declare_simd_pragma::visit(), gimple_while::visit(), gimple_for::visit(), WeightedNode::visit(), gimple_multi_way_if::visit(), attr::visit(), srcp::visit(), decl_node::visit(), expr_node::visit(), PointToSolution::visit(), gimple_node::visit(), unary_expr::visit(), binary_expr::visit(), ternary_expr::visit(), quaternary_expr::visit(), type_node::visit(), memory_tag::visit(), cst_node::visit(), error_mark::visit(), array_type::visit(), gimple_asm::visit(), baselink::visit(), gimple_bind::visit(), binfo::visit(), block::visit(), call_expr::visit(), aggr_init_expr::visit(), gimple_call::visit(), case_label_expr::visit(), cast_expr::visit(), type_pack_expansion::visit(), expr_pack_expansion::visit(), complex_cst::visit(), complex_type::visit(), gimple_cond::visit(), const_decl::visit(), constructor::visit(), enumeral_type::visit(), expr_stmt::visit(), field_decl::visit(), function_decl::visit(), function_type::visit(), gimple_assign::visit(), gimple_nop::visit(), gimple_goto::visit(), handler::visit(), identifier_node::visit(), integer_cst::visit(), integer_type::visit(), gimple_label::visit(), method_type::visit(), namespace_decl::visit(), overload::visit(), parm_decl::visit(), gimple_phi::visit(), gimple_predict::visit(), pointer_type::visit(), real_cst::visit(), real_type::visit(), record_type::visit(), reference_type::visit(), result_decl::visit(), gimple_resx::visit(), gimple_return::visit(), return_stmt::visit(), scope_ref::visit(), ssa_name::visit(), statement_list::visit(), string_cst::visit(), gimple_switch::visit(), target_expr::visit(), target_mem_ref::visit(), target_mem_ref461::visit(), template_decl::visit(), template_parm_index::visit(), type_argument_pack::visit(), nontype_argument_pack::visit(), tree_list::visit(), tree_vec::visit(), try_block::visit(), type_decl::visit(), union_type::visit(), var_decl::visit(), vector_cst::visit(), vector_type::visit(), and lut_expr::visit().
#define FORWARD_DECLARATION_MACRO | ( | r, | |
data, | |||
elem | |||
) | class elem; |
forward declaration macro
Definition at line 98 of file visitor.hpp.
#define GETID | ( | field | ) | field##_ID |
return the id given a super class or a class member
Definition at line 53 of file visitor.hpp.
#define NO_VISIT ~0U |
constant used to avoid member visit
Definition at line 69 of file visitor.hpp.
Referenced by GimpleWriter::GimpleWriter(), type_casting::operator()(), and raw_writer::write_when_not_null_point_to().
#define OPERATOR_MACRO | ( | r, | |
data, | |||
elem | |||
) |
Definition at line 86 of file visitor.hpp.
Referenced by function_decl_refs::function_decl_refs(), tree_node_factory::tree_node_factory(), tree_node_finder::tree_node_finder(), tree_node_index_factory::tree_node_index_factory(), tree_node_reached::tree_node_reached(), and object_visitor::~object_visitor().
#define OPERATOR_MACRO_DECL | ( | r, | |
data, | |||
elem | |||
) | OPERATOR_MACRO_HEADER(r, data, elem); |
Definition at line 85 of file visitor.hpp.
Referenced by function_decl_refs::function_decl_refs(), tree_node_factory::tree_node_factory(), tree_node_finder::tree_node_finder(), tree_node_index_factory::tree_node_index_factory(), and tree_node_reached::tree_node_reached().
#define OPERATOR_MACRO_DECLO | ( | r, | |
data, | |||
elem | |||
) | OPERATOR_MACRO_HEADERO(r, data, elem); |
Definition at line 91 of file visitor.hpp.
Referenced by type_casting::type_casting().
#define OPERATOR_MACRO_HEADER | ( | r, | |
data, | |||
elem | |||
) | virtual void operator()(const elem*, unsigned int&) |
Definition at line 84 of file visitor.hpp.
#define OPERATOR_MACRO_HEADERO | ( | r, | |
data, | |||
elem | |||
) | void operator()(const elem*, unsigned int&) override |
Definition at line 90 of file visitor.hpp.
#define OPERATOR_MACROO | ( | r, | |
data, | |||
elem | |||
) |
Definition at line 92 of file visitor.hpp.
Referenced by type_casting::type_casting().
#define SEQ_VISIT_MEMBER | ( | mask, | |
seq, | |||
seqbasetype, | |||
method, | |||
visitor_type, | |||
visitor_obj | |||
) |
macro used to traverse non empty sequences
Definition at line 64 of file visitor.hpp.
Referenced by bloc::visit(), PointToSolution::visit(), gimple_node::visit(), memory_tag::visit(), gimple_bind::visit(), call_expr::visit(), gimple_call::visit(), function_decl::visit(), record_type::visit(), ssa_name::visit(), statement_list::visit(), tree_vec::visit(), union_type::visit(), and vector_cst::visit().
#define SET_NO_VISIT_INDEX | ( | mask, | |
index | |||
) | ((mask) |= (1U << GETID(index))) |
macro used to selectively avoid member visit
Definition at line 73 of file visitor.hpp.
#define SET_VISIT_INDEX | ( | mask, | |
index | |||
) | ((mask) &= ~(1U << GETID(index))) |
macro used to selectively allow member visit
Definition at line 75 of file visitor.hpp.
#define VISIT_MEMBER | ( | mask, | |
ref_obj, | |||
method | |||
) | VISIT_MEMBER_NAMED(ref_obj, mask, ref_obj, method) |
Definition at line 62 of file visitor.hpp.
Referenced by tree_reindex::visit(), gimple_pragma::visit(), omp_parallel_sections_pragma::visit(), gimple_while::visit(), gimple_for::visit(), decl_node::visit(), expr_node::visit(), gimple_node::visit(), unary_expr::visit(), binary_expr::visit(), ternary_expr::visit(), quaternary_expr::visit(), type_node::visit(), cst_node::visit(), array_type::visit(), gimple_asm::visit(), baselink::visit(), gimple_bind::visit(), binfo::visit(), call_expr::visit(), aggr_init_expr::visit(), gimple_call::visit(), case_label_expr::visit(), cast_expr::visit(), type_pack_expansion::visit(), expr_pack_expansion::visit(), complex_cst::visit(), gimple_cond::visit(), const_decl::visit(), constructor::visit(), enumeral_type::visit(), expr_stmt::visit(), field_decl::visit(), function_decl::visit(), function_type::visit(), gimple_assign::visit(), gimple_goto::visit(), handler::visit(), integer_type::visit(), gimple_label::visit(), method_type::visit(), namespace_decl::visit(), overload::visit(), parm_decl::visit(), gimple_phi::visit(), pointer_type::visit(), record_type::visit(), reference_type::visit(), result_decl::visit(), gimple_return::visit(), return_stmt::visit(), scope_ref::visit(), ssa_name::visit(), gimple_switch::visit(), target_expr::visit(), target_mem_ref::visit(), target_mem_ref461::visit(), template_decl::visit(), template_parm_index::visit(), type_argument_pack::visit(), nontype_argument_pack::visit(), tree_list::visit(), try_block::visit(), type_decl::visit(), union_type::visit(), var_decl::visit(), vector_type::visit(), and lut_expr::visit().
#define VISIT_MEMBER_NAMED | ( | ref_obj_name, | |
mask, | |||
ref_obj, | |||
method | |||
) |
macro used to visit a non null member
Definition at line 59 of file visitor.hpp.
Referenced by gimple_multi_way_if::visit(), binfo::visit(), constructor::visit(), gimple_phi::visit(), and statement_list::visit().
#define VISIT_SC | ( | mask, | |
superclass, | |||
method | |||
) |
macro used to visit the super class
Definition at line 55 of file visitor.hpp.
Referenced by null_node::visit(), gimple_pragma::visit(), profiling_pragma::visit(), statistical_profiling::visit(), map_pragma::visit(), call_hw_pragma::visit(), call_point_hw_pragma::visit(), issue_pragma::visit(), blackbox_pragma::visit(), omp_pragma::visit(), omp_parallel_pragma::visit(), omp_sections_pragma::visit(), omp_parallel_sections_pragma::visit(), omp_section_pragma::visit(), omp_target_pragma::visit(), omp_task_pragma::visit(), omp_critical_pragma::visit(), omp_atomic_pragma::visit(), omp_for_pragma::visit(), omp_simd_pragma::visit(), omp_declare_simd_pragma::visit(), gimple_while::visit(), gimple_for::visit(), gimple_multi_way_if::visit(), decl_node::visit(), expr_node::visit(), gimple_node::visit(), unary_expr::visit(), binary_expr::visit(), ternary_expr::visit(), quaternary_expr::visit(), type_node::visit(), memory_tag::visit(), cst_node::visit(), error_mark::visit(), array_type::visit(), gimple_asm::visit(), baselink::visit(), gimple_bind::visit(), binfo::visit(), block::visit(), call_expr::visit(), aggr_init_expr::visit(), gimple_call::visit(), case_label_expr::visit(), cast_expr::visit(), type_pack_expansion::visit(), expr_pack_expansion::visit(), complex_cst::visit(), complex_type::visit(), gimple_cond::visit(), const_decl::visit(), enumeral_type::visit(), expr_stmt::visit(), field_decl::visit(), function_decl::visit(), function_type::visit(), gimple_assign::visit(), gimple_nop::visit(), gimple_goto::visit(), handler::visit(), identifier_node::visit(), integer_cst::visit(), integer_type::visit(), gimple_label::visit(), method_type::visit(), namespace_decl::visit(), overload::visit(), parm_decl::visit(), gimple_phi::visit(), gimple_predict::visit(), pointer_type::visit(), real_cst::visit(), real_type::visit(), record_type::visit(), reference_type::visit(), result_decl::visit(), gimple_resx::visit(), gimple_return::visit(), return_stmt::visit(), scope_ref::visit(), ssa_name::visit(), statement_list::visit(), string_cst::visit(), gimple_switch::visit(), target_expr::visit(), target_mem_ref::visit(), target_mem_ref461::visit(), template_decl::visit(), template_parm_index::visit(), type_argument_pack::visit(), nontype_argument_pack::visit(), tree_vec::visit(), try_block::visit(), type_decl::visit(), union_type::visit(), var_decl::visit(), vector_cst::visit(), vector_type::visit(), and lut_expr::visit().