PandA-2024.02
type_casting.hpp
Go to the documentation of this file.
1 /*
2  *
3  * _/_/_/ _/_/ _/ _/ _/_/_/ _/_/
4  * _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/
5  * _/_/_/ _/_/_/_/ _/ _/_/ _/ _/ _/_/_/_/
6  * _/ _/ _/ _/ _/ _/ _/ _/ _/
7  * _/ _/ _/ _/ _/ _/_/_/ _/ _/
8  *
9  * ***********************************************
10  * PandA Project
11  * URL: http://panda.dei.polimi.it
12  * Politecnico di Milano - DEIB
13  * System Architectures Group
14  * ***********************************************
15  * Copyright (C) 2004-2024 Politecnico di Milano
16  *
17  * This file is part of the PandA framework.
18  *
19  * The PandA framework is free software; you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation; either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program. If not, see <http://www.gnu.org/licenses/>.
31  *
32  */
43 #ifndef TYPE_CASTING_HPP
44 #define TYPE_CASTING_HPP
45 
47 #include "tree_node.hpp"
48 
50 #include "refcount.hpp"
51 #include <boost/preprocessor/facilities/empty.hpp>
52 #include <boost/preprocessor/seq/for_each.hpp>
53 
59 class TreeNodeConstSet;
61 
62 #define LOCAL_OBJ_NOT_SPECIALIZED_SEQ \
63  (translation_unit_decl)(label_decl)(using_decl)(void_cst)(void_type)(template_type_parm)(set_type)( \
64  qual_union_type)(offset_type)(lang_type)(CharType)(nullptr_type)(boolean_type)(typename_type)(none)( \
65  vec_new_expr) \
66  TERNARY_EXPRESSION_TREE_NODES(ctor_initializer)(trait_expr)(template_id_expr)(placeholder_expr)(new_expr)( \
67  gimple_resx)(gimple_predict)(gimple_nop) \
68  QUATERNARY_EXPRESSION_TREE_NODES(modop_expr)(PointToSolution)(omp_atomic_pragma)(abs_expr)(addr_expr)( \
69  alignof_expr)(arrow_expr)(bit_not_expr)(buffer_ref)(card_expr)(cleanup_point_expr)(conj_expr)( \
70  convert_expr)(exit_expr)(fix_ceil_expr)(fix_floor_expr)(fix_round_expr)(fix_trunc_expr)(float_expr)( \
71  imagpart_expr)(misaligned_indirect_ref)(loop_expr)(negate_expr)(non_lvalue_expr)(nop_expr)( \
72  realpart_expr)(reference_expr)(reinterpret_cast_expr)(sizeof_expr)(static_cast_expr)(throw_expr)( \
73  truth_not_expr)(unsave_expr)(va_arg_expr)(view_convert_expr)(reduc_max_expr)(reduc_min_expr)( \
74  reduc_plus_expr)(vec_unpack_hi_expr)(vec_unpack_lo_expr)(vec_unpack_float_hi_expr)( \
75  vec_unpack_float_lo_expr)(assert_expr)(bit_and_expr)(bit_ior_expr)(bit_xor_expr)(catch_expr)( \
76  ceil_div_expr)(ceil_mod_expr)(complex_expr)(compound_expr)(eh_filter_expr)(eq_expr)(exact_div_expr)( \
77  fdesc_expr)(floor_div_expr)(floor_mod_expr)(ge_expr)(gt_expr)(goto_subroutine)(in_expr)(init_expr)( \
78  le_expr)(lrotate_expr)(lshift_expr)(lt_expr)(max_expr)(min_expr)(minus_expr)(modify_expr)(mult_expr)( \
79  mult_highpart_expr)(ne_expr)(ordered_expr)(plus_expr)(pointer_plus_expr)(postdecrement_expr)( \
80  postincrement_expr)(predecrement_expr)(preincrement_expr)(range_expr)(paren_expr)(rdiv_expr)( \
81  round_div_expr)(round_mod_expr)(rrotate_expr)(rshift_expr)(set_le_expr)(trunc_div_expr)( \
82  trunc_mod_expr)(truth_and_expr)(truth_andif_expr)(truth_or_expr)(truth_orif_expr)(truth_xor_expr)( \
83  try_catch_expr)(try_finally)(uneq_expr)(ltgt_expr)(unge_expr)(ungt_expr)(unle_expr)(unlt_expr)( \
84  unordered_expr)(widen_sum_expr)(widen_mult_expr)(with_size_expr)(vec_lshift_expr)(vec_rshift_expr)( \
85  widen_mult_hi_expr)(widen_mult_lo_expr)(vec_pack_trunc_expr)(vec_pack_sat_expr)( \
86  vec_pack_fix_trunc_expr)(vec_extracteven_expr)(vec_extractodd_expr)(vec_interleavehigh_expr)( \
87  vec_interleavelow_expr)(extract_bit_expr)(sat_plus_expr)(sat_minus_expr)(extractvalue_expr)( \
88  extractelement_expr)(frem_expr)
89 
91 {
93  explicit type_casting(TreeNodeConstSet& _types) : types(_types)
94  {
95  }
96 
97  void operator()(const mem_ref* obj, unsigned int& mask) override;
98 
99  void operator()(const indirect_ref* obj, unsigned int& mask) override;
103 
104  private:
107 
110 };
111 
112 #endif
TreeNodeConstSet & types
tree_node visitors
#define OBJ_SPECIALIZED_SEQ
sequence of obj that have to be specialized
Definition: tree_node.hpp:106
CustomUnorderedSet< unsigned int > visited
already visited
type_casting(TreeNodeConstSet &_types)
default constructor
A set of const tree node.
Definition: tree_node.hpp:267
#define LOCAL_OBJ_NOT_SPECIALIZED_SEQ
void operator()(const mem_ref *obj, unsigned int &mask) override
Header include.
Classes specification of the tree_node data structures.
BOOST_PP_SEQ_FOR_EACH(OPERATOR_MACRO, BOOST_PP_EMPTY, VISITED_OBJ_SEQ1)
virtual template object functor
Template definition of refcount.
#define OPERATOR_MACROO(r, data, elem)
Definition: visitor.hpp:92
#define OPERATOR_MACRO_DECLO(r, data, elem)
Definition: visitor.hpp:91
REF_FORWARD_DECL(type_casting)

Generated on Mon Feb 12 2024 13:02:56 for PandA-2024.02 by doxygen 1.8.13