PandA-2024.02
tree_nodes_merger.cpp
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  */
44 #include "tree_nodes_merger.hpp"
45 #include "exceptions.hpp" // for THROW_ASSERT, THROW...
46 #include "ext_tree_node.hpp" // for gimple_pragma, gimp...
47 #include "token_interface.hpp" // for TOK, TreeVocabulary...
48 #include "tree_basic_block.hpp" // for tree_nodeRef, bloc
49 #include "tree_common.hpp" // for CharType_K, abs_expr_K
50 #include "tree_manager.hpp" // for tree_nodeRef, tree_...
51 #include "tree_node.hpp" // for tree_nodeRef, tree_...
52 #include "tree_reindex.hpp" // for tree_reindex, tree_...
53 #include <string> // for string, operator+
54 #include <utility> // for pair
55 #include <vector> // for vector, vector<>::c...
56 
57 #define CHECK_AND_ADD(Tree_Node, visit_index) \
58  { \
59  if((Tree_Node) && remap.find(GET_INDEX_NODE(Tree_Node)) == remap.end()) \
60  { \
61  SET_VISIT_INDEX(mask, visit_index); \
62  unsigned int node_id = GET_INDEX_NODE(Tree_Node); \
63  remap[node_id] = TM->new_tree_node_id(node_id); \
64  not_yet_remapped.insert(node_id); \
65  } \
66  }
67 
68 void tree_node_reached::operator()(const tree_node* obj, unsigned int&)
69 {
70  THROW_ERROR("tree_node not supported: " + std::string(obj->get_kind_text()));
71 }
72 
73 void tree_node_reached::operator()(const tree_reindex*, unsigned int& mask)
74 {
75  mask = NO_VISIT;
77 }
78 
79 void tree_node_reached::operator()(const WeightedNode* obj, unsigned int& mask)
80 {
81  tree_node_mask::operator()(obj, mask);
82 }
83 
84 void tree_node_reached::operator()(const attr* obj, unsigned int& mask)
85 {
86  tree_node_mask::operator()(obj, mask);
87 }
88 
89 void tree_node_reached::operator()(const srcp* obj, unsigned int& mask)
90 {
91  tree_node_mask::operator()(obj, mask);
92 }
93 
94 void tree_node_reached::operator()(const decl_node* obj, unsigned int& mask)
95 {
96  tree_node_mask::operator()(obj, mask);
104 }
105 
106 void tree_node_reached::operator()(const expr_node* obj, unsigned int& mask)
107 {
108  tree_node_mask::operator()(obj, mask);
110 }
111 
112 void tree_node_reached::operator()(const gimple_node* obj, unsigned int& mask)
113 {
114  tree_node_mask::operator()(obj, mask);
117  for(const auto& vuse : obj->vuses)
118  {
120  }
122  for(const auto& vover : obj->vovers)
123  {
125  }
126  for(const auto& i : obj->pragmas)
127  {
129  }
130  for(const auto& use : obj->use_set->variables)
131  {
133  }
134  for(const auto& clobbered : obj->clobbered_set->variables)
135  {
137  }
138 }
139 
140 void tree_node_reached::operator()(const unary_expr* obj, unsigned int& mask)
141 {
142  tree_node_mask::operator()(obj, mask);
144 }
145 
146 void tree_node_reached::operator()(const binary_expr* obj, unsigned int& mask)
147 {
148  tree_node_mask::operator()(obj, mask);
151 }
152 
153 void tree_node_reached::operator()(const ternary_expr* obj, unsigned int& mask)
154 {
155  tree_node_mask::operator()(obj, mask);
159 }
160 
161 void tree_node_reached::operator()(const quaternary_expr* obj, unsigned int& mask)
162 {
163  tree_node_mask::operator()(obj, mask);
168 }
169 
170 void tree_node_reached::operator()(const type_node* obj, unsigned int& mask)
171 {
172  tree_node_mask::operator()(obj, mask);
177 }
178 
179 void tree_node_reached::operator()(const memory_tag* obj, unsigned int& mask)
180 {
181  tree_node_mask::operator()(obj, mask);
182  auto vend = obj->list_of_aliases.end();
183  for(auto i = obj->list_of_aliases.begin(); i != vend; ++i)
185 }
186 
187 void tree_node_reached::operator()(const cst_node* obj, unsigned int& mask)
188 {
189  tree_node_mask::operator()(obj, mask);
191 }
192 
193 void tree_node_reached::operator()(const error_mark* obj, unsigned int& mask)
194 {
195  tree_node_mask::operator()(obj, mask);
196 }
197 
198 void tree_node_reached::operator()(const array_type* obj, unsigned int& mask)
199 {
200  tree_node_mask::operator()(obj, mask);
203 }
204 
205 void tree_node_reached::operator()(const gimple_asm* obj, unsigned int& mask)
206 {
207  tree_node_mask::operator()(obj, mask);
211 }
212 
213 void tree_node_reached::operator()(const baselink* obj, unsigned int& mask)
214 {
215  tree_node_mask::operator()(obj, mask);
217 }
218 
219 void tree_node_reached::operator()(const gimple_bind* obj, unsigned int& mask)
220 {
221  tree_node_mask::operator()(obj, mask);
222  auto vend = obj->list_of_vars.end();
223  for(auto i = obj->list_of_vars.begin(); i != vend; ++i)
226 }
227 
228 void tree_node_reached::operator()(const binfo* obj, unsigned int& mask)
229 {
230  tree_node_mask::operator()(obj, mask);
232  auto vend = obj->list_of_access_binf.end();
233  for(auto i = obj->list_of_access_binf.begin(); i != vend; ++i)
235 }
236 
237 void tree_node_reached::operator()(const block* obj, unsigned int& mask)
238 {
239  tree_node_mask::operator()(obj, mask);
240 }
241 
242 void tree_node_reached::operator()(const call_expr* obj, unsigned int& mask)
243 {
244  tree_node_mask::operator()(obj, mask);
246  std::vector<tree_nodeRef>::const_iterator arg, arg_end = obj->args.end();
247  for(arg = obj->args.begin(); arg != arg_end; ++arg)
249 }
250 
251 void tree_node_reached::operator()(const aggr_init_expr* obj, unsigned int& mask)
252 {
253  tree_node_mask::operator()(obj, mask);
255 }
256 
257 void tree_node_reached::operator()(const gimple_call* obj, unsigned int& mask)
258 {
259  tree_node_mask::operator()(obj, mask);
261  std::vector<tree_nodeRef>::const_iterator arg, arg_end = obj->args.end();
262  for(arg = obj->args.begin(); arg != arg_end; ++arg)
264 }
265 
266 void tree_node_reached::operator()(const case_label_expr* obj, unsigned int& mask)
267 {
268  tree_node_mask::operator()(obj, mask);
272 }
273 
274 void tree_node_reached::operator()(const cast_expr* obj, unsigned int& mask)
275 {
276  tree_node_mask::operator()(obj, mask);
278 }
279 
280 void tree_node_reached::operator()(const complex_cst* obj, unsigned int& mask)
281 {
282  tree_node_mask::operator()(obj, mask);
285 }
286 
287 void tree_node_reached::operator()(const complex_type* obj, unsigned int& mask)
288 {
289  tree_node_mask::operator()(obj, mask);
290 }
291 
292 void tree_node_reached::operator()(const gimple_cond* obj, unsigned int& mask)
293 {
294  tree_node_mask::operator()(obj, mask);
296 }
297 
298 void tree_node_reached::operator()(const const_decl* obj, unsigned int& mask)
299 {
300  tree_node_mask::operator()(obj, mask);
302 }
303 
304 void tree_node_reached::operator()(const constructor* obj, unsigned int& mask)
305 {
306  tree_node_mask::operator()(obj, mask);
308  auto vend = obj->list_of_idx_valu.end();
309  for(auto i = obj->list_of_idx_valu.begin(); i != vend; ++i)
310  {
313  }
314 }
315 
316 void tree_node_reached::operator()(const enumeral_type* obj, unsigned int& mask)
317 {
318  tree_node_mask::operator()(obj, mask);
322 }
323 
324 void tree_node_reached::operator()(const expr_stmt* obj, unsigned int& mask)
325 {
326  tree_node_mask::operator()(obj, mask);
327 
330 }
331 
332 void tree_node_reached::operator()(const field_decl* obj, unsigned int& mask)
333 {
334  tree_node_mask::operator()(obj, mask);
339 }
340 
341 void tree_node_reached::operator()(const function_decl* obj, unsigned int& mask)
342 {
343  tree_node_mask::operator()(obj, mask);
344  // std::vector<std::string>::const_iterator vend = obj->list_of_op_names.end();
345  // for (std::vector<std::string>::const_iterator i = obj->list_of_op_names.begin(); i != vend; ++i)
346  // WRITE_UFIELD_STRING(os, *i);
349 
351  auto vend2 = obj->list_of_args.end();
352  for(auto i = obj->list_of_args.begin(); i != vend2; ++i)
354 
357 }
358 
359 void tree_node_reached::operator()(const function_type* obj, unsigned int& mask)
360 {
361  tree_node_mask::operator()(obj, mask);
364 }
365 
366 void tree_node_reached::operator()(const gimple_assign* obj, unsigned int& mask)
367 {
368  tree_node_mask::operator()(obj, mask);
372 }
373 
374 void tree_node_reached::operator()(const gimple_goto* obj, unsigned int& mask)
375 {
376  tree_node_mask::operator()(obj, mask);
378 }
379 
380 void tree_node_reached::operator()(const handler* obj, unsigned int& mask)
381 {
382  tree_node_mask::operator()(obj, mask);
383 
385 }
386 
387 void tree_node_reached::operator()(const identifier_node*, unsigned int& mask)
388 {
389  mask = NO_VISIT;
390 }
391 
392 void tree_node_reached::operator()(const integer_cst* obj, unsigned int& mask)
393 {
394  tree_node_mask::operator()(obj, mask);
395 }
396 
397 void tree_node_reached::operator()(const integer_type* obj, unsigned int& mask)
398 {
399  tree_node_mask::operator()(obj, mask);
402 }
403 
404 void tree_node_reached::operator()(const gimple_label* obj, unsigned int& mask)
405 {
406  tree_node_mask::operator()(obj, mask);
408 }
409 
410 void tree_node_reached::operator()(const method_type* obj, unsigned int& mask)
411 {
412  tree_node_mask::operator()(obj, mask);
414 }
415 
416 void tree_node_reached::operator()(const namespace_decl* obj, unsigned int& mask)
417 {
418  tree_node_mask::operator()(obj, mask);
420 }
421 
422 void tree_node_reached::operator()(const overload* obj, unsigned int& mask)
423 {
424  tree_node_mask::operator()(obj, mask);
425 
428 }
429 
430 void tree_node_reached::operator()(const parm_decl* obj, unsigned int& mask)
431 {
432  tree_node_mask::operator()(obj, mask);
436 }
437 
438 void tree_node_reached::operator()(const gimple_phi* obj, unsigned int& mask)
439 {
440  tree_node_mask::operator()(obj, mask);
441 
443  for(const auto& def_edge : obj->CGetDefEdgesList())
445 }
446 
447 void tree_node_reached::operator()(const pointer_type* obj, unsigned int& mask)
448 {
449  tree_node_mask::operator()(obj, mask);
451 }
452 
453 void tree_node_reached::operator()(const real_cst* obj, unsigned int& mask)
454 {
455  tree_node_mask::operator()(obj, mask);
456 }
457 
458 void tree_node_reached::operator()(const real_type* obj, unsigned int& mask)
459 {
460  tree_node_mask::operator()(obj, mask);
461 }
462 
463 void tree_node_reached::operator()(const record_type* obj, unsigned int& mask)
464 {
465  tree_node_mask::operator()(obj, mask);
468 
473  auto vend1 = obj->list_of_flds.end();
474  for(auto i = obj->list_of_flds.begin(); i != vend1; ++i)
476  auto vend2 = obj->list_of_fncs.end();
477  for(auto i = obj->list_of_fncs.begin(); i != vend2; ++i)
480 }
481 
482 void tree_node_reached::operator()(const reference_type* obj, unsigned int& mask)
483 {
484  tree_node_mask::operator()(obj, mask);
486 }
487 
488 void tree_node_reached::operator()(const result_decl* obj, unsigned int& mask)
489 {
490  tree_node_mask::operator()(obj, mask);
494 }
495 
496 void tree_node_reached::operator()(const gimple_return* obj, unsigned int& mask)
497 {
498  tree_node_mask::operator()(obj, mask);
500 }
501 
502 void tree_node_reached::operator()(const return_stmt* obj, unsigned int& mask)
503 {
504  tree_node_mask::operator()(obj, mask);
505 
507 }
508 
509 void tree_node_reached::operator()(const scope_ref* obj, unsigned int& mask)
510 {
511  tree_node_mask::operator()(obj, mask);
514 }
515 
516 void tree_node_reached::operator()(const ssa_name* obj, unsigned int& mask)
517 {
518  tree_node_mask::operator()(obj, mask);
519 
522  for(const auto& use : obj->use_set->variables)
523  {
525  }
526 
527  for(auto const& def_stmt : obj->CGetDefStmts())
528  {
530  }
531 
534 }
535 
536 void tree_node_reached::operator()(const statement_list* obj, unsigned int& mask)
537 {
538  tree_node_mask::operator()(obj, mask);
540  auto vend = obj->list_of_stmt.end();
541  for(auto i = obj->list_of_stmt.begin(); i != vend; ++i)
543 }
544 
545 void tree_node_reached::operator()(const string_cst* obj, unsigned int& mask)
546 {
547  tree_node_mask::operator()(obj, mask);
548 }
549 
550 void tree_node_reached::operator()(const gimple_switch* obj, unsigned int& mask)
551 {
552  tree_node_mask::operator()(obj, mask);
555 }
556 
557 void tree_node_reached::operator()(const target_expr* obj, unsigned int& mask)
558 {
559  tree_node_mask::operator()(obj, mask);
563 }
564 
565 void tree_node_reached::operator()(const lut_expr* obj, unsigned int& mask)
566 {
567  tree_node_mask::operator()(obj, mask);
577 }
578 
579 void tree_node_reached::operator()(const template_decl* obj, unsigned int& mask)
580 {
581  tree_node_mask::operator()(obj, mask);
586 }
587 
588 void tree_node_reached::operator()(const template_parm_index* obj, unsigned int& mask)
589 {
590  tree_node_mask::operator()(obj, mask);
593 }
594 
595 void tree_node_reached::operator()(const tree_list* obj, unsigned int& mask)
596 {
597  tree_node_mask::operator()(obj, mask);
598 
602 }
603 
604 void tree_node_reached::operator()(const tree_vec* obj, unsigned int& mask)
605 {
606  tree_node_mask::operator()(obj, mask);
607 
608  auto vend = obj->list_of_op.end();
609  for(auto i = obj->list_of_op.begin(); i != vend; ++i)
611 }
612 
613 void tree_node_reached::operator()(const try_block* obj, unsigned int& mask)
614 {
615  tree_node_mask::operator()(obj, mask);
616 
620 }
621 
622 void tree_node_reached::operator()(const type_decl* obj, unsigned int& mask)
623 {
624  tree_node_mask::operator()(obj, mask);
627 }
628 
629 void tree_node_reached::operator()(const union_type* obj, unsigned int& mask)
630 {
631  tree_node_mask::operator()(obj, mask);
632  auto vend1 = obj->list_of_flds.end();
633  for(auto i = obj->list_of_flds.begin(); i != vend1; ++i)
635  auto vend2 = obj->list_of_fncs.end();
636  for(auto i = obj->list_of_fncs.begin(); i != vend2; ++i)
639 }
640 
641 void tree_node_reached::operator()(const var_decl* obj, unsigned int& mask)
642 {
643  tree_node_mask::operator()(obj, mask);
644 
648 }
649 
650 void tree_node_reached::operator()(const vector_cst* obj, unsigned int& mask)
651 {
652  tree_node_mask::operator()(obj, mask);
653  auto vend = obj->list_of_valu.end();
654  for(auto i = obj->list_of_valu.begin(); i != vend; ++i)
656 }
657 
658 void tree_node_reached::operator()(const type_argument_pack* obj, unsigned int& mask)
659 {
660  tree_node_mask::operator()(obj, mask);
662 }
663 
664 void tree_node_reached::operator()(const nontype_argument_pack* obj, unsigned int& mask)
665 {
666  tree_node_mask::operator()(obj, mask);
668 }
669 
670 void tree_node_reached::operator()(const type_pack_expansion* obj, unsigned int& mask)
671 {
672  tree_node_mask::operator()(obj, mask);
676 }
677 
678 void tree_node_reached::operator()(const expr_pack_expansion* obj, unsigned int& mask)
679 {
680  tree_node_mask::operator()(obj, mask);
684 }
685 
686 void tree_node_reached::operator()(const vector_type* obj, unsigned int& mask)
687 {
688  tree_node_mask::operator()(obj, mask);
690 }
691 
692 void tree_node_reached::operator()(const target_mem_ref* obj, unsigned int& mask)
693 {
694  tree_node_mask::operator()(obj, mask);
695 
704 }
705 
706 void tree_node_reached::operator()(const target_mem_ref461* obj, unsigned int& mask)
707 {
708  tree_node_mask::operator()(obj, mask);
709 
716 }
717 
718 void tree_node_reached::operator()(const bloc* obj, unsigned int& mask)
719 {
720  tree_node_mask::operator()(obj, mask);
721  for(const auto& phi : obj->CGetPhiList())
723  for(const auto& stmt : obj->CGetStmtList())
725 }
726 
727 void tree_node_reached::operator()(const gimple_while* obj, unsigned int& mask)
728 {
729  tree_node_mask::operator()(obj, mask);
731 }
732 
733 void tree_node_reached::operator()(const gimple_for* obj, unsigned int& mask)
734 {
735  tree_node_mask::operator()(obj, mask);
738 }
739 
740 void tree_node_reached::operator()(const gimple_multi_way_if* obj, unsigned int& mask)
741 {
742  tree_node_mask::operator()(obj, mask);
743  for(const auto& cond : obj->list_of_cond)
745 }
746 
747 void tree_node_reached::operator()(const gimple_pragma* obj, unsigned int& mask)
748 {
749  tree_node_mask::operator()(obj, mask);
752 }
753 
754 void tree_node_reached::operator()(const null_node* obj, unsigned int& mask)
755 {
756  tree_node_mask::operator()(obj, mask);
757 }
758 
759 void tree_node_reached::operator()(const omp_pragma* obj, unsigned int& mask)
760 {
761  tree_node_mask::operator()(obj, mask);
762 }
763 
764 void tree_node_reached::operator()(const omp_declare_simd_pragma* obj, unsigned int& mask)
765 {
766  tree_node_mask::operator()(obj, mask);
767 }
768 
769 void tree_node_reached::operator()(const omp_for_pragma* obj, unsigned int& mask)
770 {
771  tree_node_mask::operator()(obj, mask);
772 }
773 
774 void tree_node_reached::operator()(const omp_simd_pragma* obj, unsigned int& mask)
775 {
776  tree_node_mask::operator()(obj, mask);
777 }
778 
779 void tree_node_reached::operator()(const omp_target_pragma* obj, unsigned int& mask)
780 {
781  tree_node_mask::operator()(obj, mask);
782 }
783 
784 void tree_node_reached::operator()(const omp_critical_pragma* obj, unsigned int& mask)
785 {
786  tree_node_mask::operator()(obj, mask);
787 }
788 
789 void tree_node_reached::operator()(const omp_task_pragma* obj, unsigned int& mask)
790 {
791  tree_node_mask::operator()(obj, mask);
792 }
793 
794 void tree_node_reached::operator()(const omp_parallel_pragma* obj, unsigned int& mask)
795 {
796  tree_node_mask::operator()(obj, mask);
797 }
798 
799 void tree_node_reached::operator()(const omp_sections_pragma* obj, unsigned int& mask)
800 {
801  tree_node_mask::operator()(obj, mask);
802 }
803 
804 void tree_node_reached::operator()(const omp_parallel_sections_pragma* obj, unsigned int& mask)
805 {
806  tree_node_mask::operator()(obj, mask);
809 }
810 
811 void tree_node_reached::operator()(const omp_section_pragma* obj, unsigned int& mask)
812 {
813  tree_node_mask::operator()(obj, mask);
814 }
815 
816 void tree_node_reached::operator()(const map_pragma* obj, unsigned int& mask)
817 {
818  tree_node_mask::operator()(obj, mask);
819 }
820 
821 void tree_node_reached::operator()(const call_hw_pragma* obj, unsigned int& mask)
822 {
823  tree_node_mask::operator()(obj, mask);
824 }
825 
826 void tree_node_reached::operator()(const call_point_hw_pragma* obj, unsigned int& mask)
827 {
828  tree_node_mask::operator()(obj, mask);
829 }
830 
831 void tree_node_reached::operator()(const issue_pragma* obj, unsigned int& mask)
832 {
833  tree_node_mask::operator()(obj, mask);
834 }
835 
836 void tree_node_reached::operator()(const profiling_pragma* obj, unsigned int& mask)
837 {
838  tree_node_mask::operator()(obj, mask);
839 }
840 
841 void tree_node_reached::operator()(const blackbox_pragma* obj, unsigned int& mask)
842 {
843  tree_node_mask::operator()(obj, mask);
844 }
845 
846 void tree_node_reached::operator()(const statistical_profiling* obj, unsigned int& mask)
847 {
848  tree_node_mask::operator()(obj, mask);
849 }
850 
851 #define CREATE_TREE_NODE_CASE_BODY(tree_node_name, node_id) \
852  { \
853  auto tnn = new tree_node_name(node_id); \
854  tree_nodeRef cur = tree_nodeRef(tnn); \
855  if(dynamic_cast<function_decl*>(tnn)) \
856  { \
857  TM->add_function(node_id, cur); \
858  } \
859  TM->AddTreeNode(node_id, cur); \
860  curr_tree_node_ptr = tnn; \
861  source_tn = tn; \
862  tnn->visit(this); \
863  curr_tree_node_ptr = nullptr; \
864  source_tn = tree_nodeRef(); \
865  break; \
866  }
867 
868 void tree_node_index_factory::create_tree_node(const unsigned int node_id, const tree_nodeRef& tn)
869 {
870  switch(tn->get_kind())
871  {
872  case abs_expr_K:
873  CREATE_TREE_NODE_CASE_BODY(abs_expr, node_id)
874  case addr_expr_K:
875  CREATE_TREE_NODE_CASE_BODY(addr_expr, node_id)
876  case array_range_ref_K:
877  CREATE_TREE_NODE_CASE_BODY(array_range_ref, node_id)
878  case array_ref_K:
879  CREATE_TREE_NODE_CASE_BODY(array_ref, node_id)
880  case array_type_K:
882  case alignof_expr_K:
883  CREATE_TREE_NODE_CASE_BODY(alignof_expr, node_id)
884  case arrow_expr_K:
885  CREATE_TREE_NODE_CASE_BODY(arrow_expr, node_id)
886  case gimple_asm_K:
888  case assert_expr_K:
889  CREATE_TREE_NODE_CASE_BODY(assert_expr, node_id)
890  case baselink_K:
892  case gimple_bind_K:
894  case binfo_K:
896  case bit_and_expr_K:
897  CREATE_TREE_NODE_CASE_BODY(bit_and_expr, node_id)
898  case bit_field_ref_K:
899  CREATE_TREE_NODE_CASE_BODY(bit_field_ref, node_id)
900  case bit_ior_expr_K:
901  CREATE_TREE_NODE_CASE_BODY(bit_ior_expr, node_id)
902  case bit_ior_concat_expr_K:
903  CREATE_TREE_NODE_CASE_BODY(bit_ior_concat_expr, node_id)
904  case bit_not_expr_K:
905  CREATE_TREE_NODE_CASE_BODY(bit_not_expr, node_id)
906  case bit_xor_expr_K:
907  CREATE_TREE_NODE_CASE_BODY(bit_xor_expr, node_id)
908  case block_K:
910  case boolean_type_K:
911  CREATE_TREE_NODE_CASE_BODY(boolean_type, node_id)
912  case buffer_ref_K:
913  CREATE_TREE_NODE_CASE_BODY(buffer_ref, node_id)
914  case call_expr_K:
916  case aggr_init_expr_K:
918  case gimple_call_K:
920  case card_expr_K:
921  CREATE_TREE_NODE_CASE_BODY(card_expr, node_id)
922  case case_label_expr_K:
924  case cast_expr_K:
926  case catch_expr_K:
927  CREATE_TREE_NODE_CASE_BODY(catch_expr, node_id)
928  case ceil_div_expr_K:
929  CREATE_TREE_NODE_CASE_BODY(ceil_div_expr, node_id)
930  case ceil_mod_expr_K:
931  CREATE_TREE_NODE_CASE_BODY(ceil_mod_expr, node_id)
932  case CharType_K:
933  CREATE_TREE_NODE_CASE_BODY(CharType, node_id)
934  case nullptr_type_K:
935  CREATE_TREE_NODE_CASE_BODY(nullptr_type, node_id)
936  case type_pack_expansion_K:
938  case cleanup_point_expr_K:
939  CREATE_TREE_NODE_CASE_BODY(cleanup_point_expr, node_id)
940  case complex_cst_K:
942  case complex_expr_K:
943  CREATE_TREE_NODE_CASE_BODY(complex_expr, node_id)
944  case complex_type_K:
946  case component_ref_K:
947  CREATE_TREE_NODE_CASE_BODY(component_ref, node_id)
948  case compound_expr_K:
949  CREATE_TREE_NODE_CASE_BODY(compound_expr, node_id)
950  case cond_expr_K:
951  CREATE_TREE_NODE_CASE_BODY(cond_expr, node_id)
952  case conj_expr_K:
953  CREATE_TREE_NODE_CASE_BODY(conj_expr, node_id)
954  case const_decl_K:
956  case constructor_K:
958  case convert_expr_K:
959  CREATE_TREE_NODE_CASE_BODY(convert_expr, node_id)
960  case ctor_initializer_K:
961  CREATE_TREE_NODE_CASE_BODY(ctor_initializer, node_id)
962  case eh_filter_expr_K:
963  CREATE_TREE_NODE_CASE_BODY(eh_filter_expr, node_id)
964  case enumeral_type_K:
966  case eq_expr_K:
967  CREATE_TREE_NODE_CASE_BODY(eq_expr, node_id)
968  case error_mark_K:
970  case exact_div_expr_K:
971  CREATE_TREE_NODE_CASE_BODY(exact_div_expr, node_id)
972  case exit_expr_K:
973  CREATE_TREE_NODE_CASE_BODY(exit_expr, node_id)
974  case expr_stmt_K:
976  case fdesc_expr_K:
977  CREATE_TREE_NODE_CASE_BODY(fdesc_expr, node_id)
978  case field_decl_K:
980  case fix_ceil_expr_K:
981  CREATE_TREE_NODE_CASE_BODY(fix_ceil_expr, node_id)
982  case fix_floor_expr_K:
983  CREATE_TREE_NODE_CASE_BODY(fix_floor_expr, node_id)
984  case fix_round_expr_K:
985  CREATE_TREE_NODE_CASE_BODY(fix_round_expr, node_id)
986  case fix_trunc_expr_K:
987  CREATE_TREE_NODE_CASE_BODY(fix_trunc_expr, node_id)
988  case float_expr_K:
989  CREATE_TREE_NODE_CASE_BODY(float_expr, node_id)
990  case floor_div_expr_K:
991  CREATE_TREE_NODE_CASE_BODY(floor_div_expr, node_id)
992  case floor_mod_expr_K:
993  CREATE_TREE_NODE_CASE_BODY(floor_mod_expr, node_id)
994  case function_decl_K:
996  case function_type_K:
998  case ge_expr_K:
999  CREATE_TREE_NODE_CASE_BODY(ge_expr, node_id)
1000  case gimple_assign_K:
1002  case gimple_cond_K:
1004  case gimple_goto_K:
1006  case gimple_label_K:
1008  case goto_subroutine_K:
1009  CREATE_TREE_NODE_CASE_BODY(goto_subroutine, node_id)
1010  case gt_expr_K:
1011  CREATE_TREE_NODE_CASE_BODY(gt_expr, node_id)
1012  case handler_K:
1014  case imagpart_expr_K:
1015  CREATE_TREE_NODE_CASE_BODY(imagpart_expr, node_id)
1016  case indirect_ref_K:
1017  CREATE_TREE_NODE_CASE_BODY(indirect_ref, node_id)
1018  case misaligned_indirect_ref_K:
1019  CREATE_TREE_NODE_CASE_BODY(misaligned_indirect_ref, node_id)
1020  case in_expr_K:
1021  CREATE_TREE_NODE_CASE_BODY(in_expr, node_id)
1022  case init_expr_K:
1023  CREATE_TREE_NODE_CASE_BODY(init_expr, node_id)
1024  case integer_cst_K:
1026  case integer_type_K:
1028  case label_decl_K:
1029  CREATE_TREE_NODE_CASE_BODY(label_decl, node_id)
1030  case lang_type_K:
1031  CREATE_TREE_NODE_CASE_BODY(lang_type, node_id)
1032  case le_expr_K:
1033  CREATE_TREE_NODE_CASE_BODY(le_expr, node_id)
1034  case loop_expr_K:
1035  CREATE_TREE_NODE_CASE_BODY(loop_expr, node_id)
1036  case lut_expr_K:
1038  case lrotate_expr_K:
1039  CREATE_TREE_NODE_CASE_BODY(lrotate_expr, node_id)
1040  case lshift_expr_K:
1041  CREATE_TREE_NODE_CASE_BODY(lshift_expr, node_id)
1042  case lt_expr_K:
1043  CREATE_TREE_NODE_CASE_BODY(lt_expr, node_id)
1044  case ltgt_expr_K:
1045  CREATE_TREE_NODE_CASE_BODY(ltgt_expr, node_id)
1046  case max_expr_K:
1047  CREATE_TREE_NODE_CASE_BODY(max_expr, node_id)
1048  case method_type_K:
1050  case min_expr_K:
1051  CREATE_TREE_NODE_CASE_BODY(min_expr, node_id)
1052  case minus_expr_K:
1053  CREATE_TREE_NODE_CASE_BODY(minus_expr, node_id)
1054  case modify_expr_K:
1055  CREATE_TREE_NODE_CASE_BODY(modify_expr, node_id)
1056  case modop_expr_K:
1057  CREATE_TREE_NODE_CASE_BODY(modop_expr, node_id)
1058  case mult_expr_K:
1059  CREATE_TREE_NODE_CASE_BODY(mult_expr, node_id)
1060  case mult_highpart_expr_K:
1061  CREATE_TREE_NODE_CASE_BODY(mult_highpart_expr, node_id)
1062  case namespace_decl_K:
1064  case ne_expr_K:
1065  CREATE_TREE_NODE_CASE_BODY(ne_expr, node_id)
1066  case negate_expr_K:
1067  CREATE_TREE_NODE_CASE_BODY(negate_expr, node_id)
1068  case new_expr_K:
1069  CREATE_TREE_NODE_CASE_BODY(new_expr, node_id)
1070  case non_lvalue_expr_K:
1071  CREATE_TREE_NODE_CASE_BODY(non_lvalue_expr, node_id)
1072  case nop_expr_K:
1073  CREATE_TREE_NODE_CASE_BODY(nop_expr, node_id)
1074  case obj_type_ref_K:
1075  CREATE_TREE_NODE_CASE_BODY(obj_type_ref, node_id)
1076  case offset_type_K:
1077  CREATE_TREE_NODE_CASE_BODY(offset_type, node_id)
1078  case ordered_expr_K:
1079  CREATE_TREE_NODE_CASE_BODY(ordered_expr, node_id)
1080  case overload_K:
1082  case parm_decl_K:
1084  case gimple_phi_K:
1086  case placeholder_expr_K:
1087  CREATE_TREE_NODE_CASE_BODY(placeholder_expr, node_id)
1088  case plus_expr_K:
1089  CREATE_TREE_NODE_CASE_BODY(plus_expr, node_id)
1090  case pointer_plus_expr_K:
1091  CREATE_TREE_NODE_CASE_BODY(pointer_plus_expr, node_id)
1092  case pointer_type_K:
1094  case postdecrement_expr_K:
1095  CREATE_TREE_NODE_CASE_BODY(postdecrement_expr, node_id)
1096  case postincrement_expr_K:
1097  CREATE_TREE_NODE_CASE_BODY(postincrement_expr, node_id)
1098  case predecrement_expr_K:
1099  CREATE_TREE_NODE_CASE_BODY(predecrement_expr, node_id)
1100  case preincrement_expr_K:
1101  CREATE_TREE_NODE_CASE_BODY(preincrement_expr, node_id)
1102  case qual_union_type_K:
1103  CREATE_TREE_NODE_CASE_BODY(qual_union_type, node_id)
1104  case range_expr_K:
1105  CREATE_TREE_NODE_CASE_BODY(range_expr, node_id)
1106  case paren_expr_K:
1107  CREATE_TREE_NODE_CASE_BODY(paren_expr, node_id)
1108  case rdiv_expr_K:
1109  CREATE_TREE_NODE_CASE_BODY(rdiv_expr, node_id)
1110  case real_cst_K:
1112  case realpart_expr_K:
1113  CREATE_TREE_NODE_CASE_BODY(realpart_expr, node_id)
1114  case real_type_K:
1116  case record_type_K:
1118  case reduc_max_expr_K:
1119  CREATE_TREE_NODE_CASE_BODY(reduc_max_expr, node_id)
1120  case reduc_min_expr_K:
1121  CREATE_TREE_NODE_CASE_BODY(reduc_min_expr, node_id)
1122  case reduc_plus_expr_K:
1123  CREATE_TREE_NODE_CASE_BODY(reduc_plus_expr, node_id)
1124  case reference_expr_K:
1125  CREATE_TREE_NODE_CASE_BODY(reference_expr, node_id)
1126  case reference_type_K:
1128  case reinterpret_cast_expr_K:
1129  CREATE_TREE_NODE_CASE_BODY(reinterpret_cast_expr, node_id)
1130  case result_decl_K:
1132  case gimple_resx_K:
1134  case gimple_return_K:
1136  case return_stmt_K:
1138  case round_div_expr_K:
1139  CREATE_TREE_NODE_CASE_BODY(round_div_expr, node_id)
1140  case round_mod_expr_K:
1141  CREATE_TREE_NODE_CASE_BODY(round_mod_expr, node_id)
1142  case rrotate_expr_K:
1143  CREATE_TREE_NODE_CASE_BODY(rrotate_expr, node_id)
1144  case rshift_expr_K:
1145  CREATE_TREE_NODE_CASE_BODY(rshift_expr, node_id)
1146  case save_expr_K:
1147  CREATE_TREE_NODE_CASE_BODY(save_expr, node_id)
1148  case scope_ref_K:
1150  case set_le_expr_K:
1151  CREATE_TREE_NODE_CASE_BODY(set_le_expr, node_id)
1152  case set_type_K:
1153  CREATE_TREE_NODE_CASE_BODY(set_type, node_id)
1154  case sizeof_expr_K:
1155  CREATE_TREE_NODE_CASE_BODY(sizeof_expr, node_id)
1156  case ssa_name_K:
1158  case statement_list_K:
1160  case static_cast_expr_K:
1161  CREATE_TREE_NODE_CASE_BODY(static_cast_expr, node_id)
1162  case string_cst_K:
1164  case gimple_switch_K:
1166  case target_expr_K:
1168  case target_mem_ref_K:
1170  case target_mem_ref461_K:
1172  case mem_ref_K:
1173  CREATE_TREE_NODE_CASE_BODY(mem_ref, node_id)
1174  case template_decl_K:
1176  case template_id_expr_K:
1178  case template_parm_index_K:
1180  case template_type_parm_K:
1181  CREATE_TREE_NODE_CASE_BODY(template_type_parm, node_id)
1182  case ternary_plus_expr_K:
1183  CREATE_TREE_NODE_CASE_BODY(ternary_plus_expr, node_id)
1184  case ternary_pm_expr_K:
1185  CREATE_TREE_NODE_CASE_BODY(ternary_pm_expr, node_id)
1186  case ternary_mp_expr_K:
1187  CREATE_TREE_NODE_CASE_BODY(ternary_mp_expr, node_id)
1188  case ternary_mm_expr_K:
1189  CREATE_TREE_NODE_CASE_BODY(ternary_mm_expr, node_id)
1190  case throw_expr_K:
1191  CREATE_TREE_NODE_CASE_BODY(throw_expr, node_id)
1192  case translation_unit_decl_K:
1193  CREATE_TREE_NODE_CASE_BODY(translation_unit_decl, node_id)
1194  case tree_list_K:
1196  case tree_vec_K:
1198  case trunc_div_expr_K:
1199  CREATE_TREE_NODE_CASE_BODY(trunc_div_expr, node_id)
1200  case trunc_mod_expr_K:
1201  CREATE_TREE_NODE_CASE_BODY(trunc_mod_expr, node_id)
1202  case truth_and_expr_K:
1203  CREATE_TREE_NODE_CASE_BODY(truth_and_expr, node_id)
1204  case truth_andif_expr_K:
1205  CREATE_TREE_NODE_CASE_BODY(truth_andif_expr, node_id)
1206  case truth_not_expr_K:
1207  CREATE_TREE_NODE_CASE_BODY(truth_not_expr, node_id)
1208  case truth_or_expr_K:
1209  CREATE_TREE_NODE_CASE_BODY(truth_or_expr, node_id)
1210  case truth_orif_expr_K:
1211  CREATE_TREE_NODE_CASE_BODY(truth_orif_expr, node_id)
1212  case truth_xor_expr_K:
1213  CREATE_TREE_NODE_CASE_BODY(truth_xor_expr, node_id)
1214  case try_block_K:
1216  case try_catch_expr_K:
1217  CREATE_TREE_NODE_CASE_BODY(try_catch_expr, node_id)
1218  case try_finally_K:
1219  CREATE_TREE_NODE_CASE_BODY(try_finally, node_id)
1220  case type_decl_K:
1222  case typename_type_K:
1224  case type_argument_pack_K:
1226  case nontype_argument_pack_K:
1228  case expr_pack_expansion_K:
1230  case uneq_expr_K:
1231  CREATE_TREE_NODE_CASE_BODY(uneq_expr, node_id)
1232  case unge_expr_K:
1233  CREATE_TREE_NODE_CASE_BODY(unge_expr, node_id)
1234  case ungt_expr_K:
1235  CREATE_TREE_NODE_CASE_BODY(ungt_expr, node_id)
1236  case union_type_K:
1238  case unle_expr_K:
1239  CREATE_TREE_NODE_CASE_BODY(unle_expr, node_id)
1240  case unlt_expr_K:
1241  CREATE_TREE_NODE_CASE_BODY(unlt_expr, node_id)
1242  case unordered_expr_K:
1243  CREATE_TREE_NODE_CASE_BODY(unordered_expr, node_id)
1244  case unsave_expr_K:
1245  CREATE_TREE_NODE_CASE_BODY(unsave_expr, node_id)
1246  case using_decl_K:
1248  case va_arg_expr_K:
1249  CREATE_TREE_NODE_CASE_BODY(va_arg_expr, node_id)
1250  case var_decl_K:
1252  case vec_new_expr_K:
1253  CREATE_TREE_NODE_CASE_BODY(vec_new_expr, node_id)
1254  case vec_cond_expr_K:
1255  CREATE_TREE_NODE_CASE_BODY(vec_cond_expr, node_id)
1256  case vec_perm_expr_K:
1257  CREATE_TREE_NODE_CASE_BODY(vec_perm_expr, node_id)
1258  case dot_prod_expr_K:
1259  CREATE_TREE_NODE_CASE_BODY(dot_prod_expr, node_id)
1260  case vec_lshift_expr_K:
1261  CREATE_TREE_NODE_CASE_BODY(vec_lshift_expr, node_id)
1262  case vec_rshift_expr_K:
1263  CREATE_TREE_NODE_CASE_BODY(vec_rshift_expr, node_id)
1264  case widen_mult_hi_expr_K:
1265  CREATE_TREE_NODE_CASE_BODY(widen_mult_hi_expr, node_id)
1266  case widen_mult_lo_expr_K:
1267  CREATE_TREE_NODE_CASE_BODY(widen_mult_lo_expr, node_id)
1268  case vec_unpack_hi_expr_K:
1269  CREATE_TREE_NODE_CASE_BODY(vec_unpack_hi_expr, node_id)
1270  case vec_unpack_lo_expr_K:
1271  CREATE_TREE_NODE_CASE_BODY(vec_unpack_lo_expr, node_id)
1272  case vec_unpack_float_hi_expr_K:
1273  CREATE_TREE_NODE_CASE_BODY(vec_unpack_float_hi_expr, node_id)
1274  case vec_unpack_float_lo_expr_K:
1275  CREATE_TREE_NODE_CASE_BODY(vec_unpack_float_lo_expr, node_id)
1276  case vec_pack_trunc_expr_K:
1277  CREATE_TREE_NODE_CASE_BODY(vec_pack_trunc_expr, node_id)
1278  case vec_pack_sat_expr_K:
1279  CREATE_TREE_NODE_CASE_BODY(vec_pack_sat_expr, node_id)
1280  case vec_pack_fix_trunc_expr_K:
1281  CREATE_TREE_NODE_CASE_BODY(vec_pack_fix_trunc_expr, node_id)
1282  case vec_extracteven_expr_K:
1283  CREATE_TREE_NODE_CASE_BODY(vec_extracteven_expr, node_id)
1284  case vec_extractodd_expr_K:
1285  CREATE_TREE_NODE_CASE_BODY(vec_extractodd_expr, node_id)
1286  case vec_interleavehigh_expr_K:
1287  CREATE_TREE_NODE_CASE_BODY(vec_interleavehigh_expr, node_id)
1288  case vec_interleavelow_expr_K:
1289  CREATE_TREE_NODE_CASE_BODY(vec_interleavelow_expr, node_id)
1290  case vector_cst_K:
1292  case void_cst_K:
1293  CREATE_TREE_NODE_CASE_BODY(void_cst, node_id)
1294  case vector_type_K:
1296  case view_convert_expr_K:
1297  CREATE_TREE_NODE_CASE_BODY(view_convert_expr, node_id)
1298  case gimple_predict_K:
1300  case void_type_K:
1301  CREATE_TREE_NODE_CASE_BODY(void_type, node_id)
1302  case vtable_ref_K:
1303  CREATE_TREE_NODE_CASE_BODY(vtable_ref, node_id)
1304  case with_cleanup_expr_K:
1305  CREATE_TREE_NODE_CASE_BODY(with_cleanup_expr, node_id)
1306  case with_size_expr_K:
1307  CREATE_TREE_NODE_CASE_BODY(with_size_expr, node_id)
1308  case gimple_while_K:
1310  case gimple_for_K:
1312  case gimple_pragma_K:
1314  case omp_pragma_K:
1316  case omp_declare_simd_pragma_K:
1318  case omp_atomic_pragma_K:
1320  case omp_for_pragma_K:
1322  case omp_parallel_pragma_K:
1324  case omp_sections_pragma_K:
1326  case omp_parallel_sections_pragma_K:
1328  case omp_section_pragma_K:
1330  case omp_simd_pragma_K:
1332  case omp_target_pragma_K:
1334  case omp_critical_pragma_K:
1336  case omp_task_pragma_K:
1338  case map_pragma_K:
1340  case call_hw_pragma_K:
1342  case call_point_hw_pragma_K:
1344  case issue_pragma_K:
1346  case profiling_pragma_K:
1348  case blackbox_pragma_K:
1350  case statistical_profiling_K:
1352  case null_node_K:
1354  case gimple_nop_K:
1356  case identifier_node_K:
1357  {
1358  tree_nodeRef cur;
1359  if(GetPointer<identifier_node>(tn)->operator_flag)
1360  {
1361  cur = tree_nodeRef(new identifier_node(node_id, true, TM.get()));
1362  }
1363  else
1364  {
1365  cur = tree_nodeRef(new identifier_node(node_id, GetPointer<identifier_node>(tn)->strg, TM.get()));
1366  }
1367  TM->AddTreeNode(node_id, cur);
1368  break;
1369  }
1370  case widen_sum_expr_K:
1371  CREATE_TREE_NODE_CASE_BODY(widen_sum_expr, node_id)
1372  case widen_mult_expr_K:
1373  CREATE_TREE_NODE_CASE_BODY(widen_mult_expr, node_id)
1374  case gimple_multi_way_if_K:
1376  case extract_bit_expr_K:
1377  CREATE_TREE_NODE_CASE_BODY(extract_bit_expr, node_id)
1378  case sat_plus_expr_K:
1379  CREATE_TREE_NODE_CASE_BODY(sat_plus_expr, node_id)
1380  case sat_minus_expr_K:
1381  CREATE_TREE_NODE_CASE_BODY(sat_minus_expr, node_id)
1382  case fshl_expr_K:
1383  CREATE_TREE_NODE_CASE_BODY(fshl_expr, node_id)
1384  case fshr_expr_K:
1385  CREATE_TREE_NODE_CASE_BODY(fshr_expr, node_id)
1386  case extractvalue_expr_K:
1387  CREATE_TREE_NODE_CASE_BODY(extractvalue_expr, node_id)
1388  case insertvalue_expr_K:
1389  CREATE_TREE_NODE_CASE_BODY(insertvalue_expr, node_id)
1390  case extractelement_expr_K:
1391  CREATE_TREE_NODE_CASE_BODY(extractelement_expr, node_id)
1392  case insertelement_expr_K:
1393  CREATE_TREE_NODE_CASE_BODY(insertelement_expr, node_id)
1394  case frem_expr_K:
1395  CREATE_TREE_NODE_CASE_BODY(frem_expr, node_id)
1396  case do_stmt_K:
1397  case for_stmt_K:
1398  case if_stmt_K:
1399  case last_tree_K:
1400  case none_K:
1401  case trait_expr_K:
1402  case tree_reindex_K:
1403  case while_stmt_K:
1404  default:
1405  THROW_ERROR("tree_node_type node not yet supported. node type is " + std::string(tn->get_kind_text()));
1406  }
1407 }
1408 
1409 void tree_node_index_factory::operator()(const tree_node* obj, unsigned int&)
1410 {
1411  THROW_ERROR("tree_node not supported: " + std::string(obj->get_kind_text()));
1412 }
1413 
1414 void tree_node_index_factory::operator()(const tree_reindex* obj, unsigned int&)
1415 {
1416  THROW_ERROR("tree_node not supported: " + std::string(obj->get_kind_text()));
1417 }
1418 
1419 void tree_node_index_factory::operator()(const attr* obj, unsigned int& mask)
1420 {
1421  THROW_ASSERT(obj == dynamic_cast<attr*>(curr_tree_node_ptr), "wrong factory setup");
1422  tree_node_mask::operator()(obj, mask);
1423  // cppcheck-suppress unusedVariable
1424  bool attr_p;
1425 
1426 #define ATTR_SEQ \
1427  (TOK_NEW)(TOK_DELETE)(TOK_ASSIGN)(TOK_MEMBER)(TOK_PUBLIC)(TOK_PROTECTED)(TOK_PRIVATE)(TOK_NORETURN)(TOK_VOLATILE)( \
1428  TOK_NOINLINE)(TOK_ALWAYS_INLINE)(TOK_USED)(TOK_UNUSED)(TOK_CONST)(TOK_TRANSPARENT_UNION)(TOK_CONSTRUCTOR)( \
1429  TOK_DESTRUCTOR)(TOK_MODE)(TOK_SECTION)(TOK_ALIGNED)(TOK_WEAK)(TOK_ALIAS)(TOK_NO_INSTRUMENT_FUNCTION)( \
1430  TOK_MALLOC)(TOK_NO_STACK_LIMIT)(TOK_PURE)(TOK_DEPRECATED)(TOK_VECTOR_SIZE)(TOK_VISIBILITY)(TOK_TLS_MODEL)( \
1431  TOK_NONNULL)(TOK_NOTHROW)(TOK_MAY_ALIAS)(TOK_WARN_UNUSED_RESULT)(TOK_FORMAT)(TOK_FORMAT_ARG)(TOK_NULL)( \
1432  TOK_GLOBAL_INIT)(TOK_GLOBAL_FINI)(TOK_CONVERSION)(TOK_VIRTUAL)(TOK_LSHIFT)(TOK_MUTABLE)(TOK_PSEUDO_TMPL)( \
1433  TOK_VECNEW)(TOK_VECDELETE)(TOK_POS)(TOK_NEG)(TOK_ADDR)(TOK_DEREF)(TOK_LNOT)(TOK_NOT)(TOK_PREINC)(TOK_PREDEC)( \
1434  TOK_PLUSASSIGN)(TOK_PLUS)(TOK_MINUSASSIGN)(TOK_MINUS)(TOK_MULTASSIGN)(TOK_MULT)(TOK_DIVASSIGN)(TOK_DIV)( \
1435  TOK_MODASSIGN)(TOK_MOD)(TOK_ANDASSIGN)(TOK_AND)(TOK_ORASSIGN)(TOK_OR)(TOK_XORASSIGN)(TOK_XOR)( \
1436  TOK_LSHIFTASSIGN)(TOK_RSHIFTASSIGN)(TOK_RSHIFT)(TOK_EQ)(TOK_NE)(TOK_LT)(TOK_GT)(TOK_LE)(TOK_GE)(TOK_LAND)( \
1437  TOK_LOR)(TOK_COMPOUND)(TOK_MEMREF)(TOK_REF)(TOK_SUBS)(TOK_POSTINC)(TOK_POSTDEC)(TOK_CALL)(TOK_THUNK)( \
1438  TOK_THIS_ADJUSTING)(TOK_RESULT_ADJUSTING)(TOK_BITFIELD)
1439 #define ATTR_MACRO(r, data, elem) \
1440  attr_p = GetPointer<attr>(source_tn)->list_attr.find(TOK(elem)) != GetPointer<attr>(source_tn)->list_attr.end(); \
1441  if(attr_p) \
1442  dynamic_cast<attr*>(curr_tree_node_ptr)->list_attr.insert(TOK(elem));
1443 
1444  BOOST_PP_SEQ_FOR_EACH(ATTR_MACRO, BOOST_PP_EMPTY, ATTR_SEQ);
1445 #undef ATTR_MACRO
1446 #undef ATTR_SEQ
1447 }
1448 
1449 #define SET_NODE_ID(field, type) \
1450  if(GetPointer<type>(source_tn)->field) \
1451  { \
1452  unsigned int node_id = GET_INDEX_NODE(GetPointer<type>(source_tn)->field); \
1453  THROW_ASSERT(remap.find(node_id) != remap.end(), "missing an index: " + std::to_string(node_id)); \
1454  node_id = remap.find(node_id)->second; \
1455  dynamic_cast<type*>(curr_tree_node_ptr)->field = TM->GetTreeReindex(node_id); \
1456  }
1457 
1458 #define SEQ_SET_NODE_ID(list_field, type) \
1459  if(!GetPointer<type>(source_tn)->list_field.empty()) \
1460  { \
1461  for(const auto& i : GetPointer<type>(source_tn)->list_field) \
1462  { \
1463  unsigned int node_id = GET_INDEX_NODE(i); \
1464  THROW_ASSERT(remap.find(node_id) != remap.end(), "missing an index: " + std::to_string(node_id)); \
1465  node_id = remap.find(node_id)->second; \
1466  dynamic_cast<type*>(curr_tree_node_ptr)->list_field.push_back(TM->GetTreeReindex(node_id)); \
1467  } \
1468  }
1469 
1470 #define SET_SET_NODE_ID(list_field, type) \
1471  if(!GetPointer<type>(source_tn)->list_field.empty()) \
1472  { \
1473  for(const auto& i : GetPointer<type>(source_tn)->list_field) \
1474  { \
1475  unsigned int node_id = GET_INDEX_NODE(i); \
1476  THROW_ASSERT(remap.find(node_id) != remap.end(), "missing an index: " + std::to_string(node_id)); \
1477  node_id = remap.find(node_id)->second; \
1478  dynamic_cast<type*>(curr_tree_node_ptr)->list_field.insert(TM->GetTreeReindex(node_id)); \
1479  } \
1480  }
1481 
1482 #define LSEQ_SET_NODE_ID(list_field, type) \
1483  if(!GetPointer<type>(source_tn)->list_field.empty()) \
1484  { \
1485  std::list<tree_nodeRef>::const_iterator vend = GetPointer<type>(source_tn)->list_field.end(); \
1486  for(std::list<tree_nodeRef>::const_iterator i = GetPointer<type>(source_tn)->list_field.begin(); i != vend; ++i) \
1487  { \
1488  unsigned int node_id = GET_INDEX_NODE(*i); \
1489  THROW_ASSERT(remap.find(node_id) != remap.end(), "missing an index: " + std::to_string(node_id)); \
1490  node_id = remap.find(node_id)->second; \
1491  dynamic_cast<type*>(curr_tree_node_ptr)->list_field.push_back(TM->GetTreeReindex(node_id)); \
1492  } \
1493  }
1494 
1495 #define SET_VALUE(field, type) (dynamic_cast<type*>(curr_tree_node_ptr)->field = GetPointer<type>(source_tn)->field)
1496 
1497 void tree_node_index_factory::operator()(const srcp* obj, unsigned int& mask)
1498 {
1499  THROW_ASSERT(obj == dynamic_cast<srcp*>(curr_tree_node_ptr), "wrong factory setup");
1500  tree_node_mask::operator()(obj, mask);
1501  SET_VALUE(include_name, srcp);
1502  SET_VALUE(line_number, srcp);
1503  SET_VALUE(column_number, srcp);
1504 }
1505 
1506 void tree_node_index_factory::operator()(const WeightedNode* obj, unsigned int& mask)
1507 {
1508  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1509  tree_node_mask::operator()(obj, mask);
1510 }
1511 
1512 void tree_node_index_factory::operator()(const decl_node* obj, unsigned int& mask)
1513 {
1514  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1515  tree_node_mask::operator()(obj, mask);
1516 
1517  SET_NODE_ID(name, decl_node);
1518  SET_NODE_ID(mngl, decl_node);
1519  SET_NODE_ID(orig, decl_node);
1521  SET_NODE_ID(scpe, decl_node);
1522  SET_NODE_ID(attributes, decl_node);
1523  SET_NODE_ID(chan, decl_node);
1524  SET_VALUE(artificial_flag, decl_node);
1525  SET_VALUE(packed_flag, decl_node);
1526  SET_VALUE(operating_system_flag, decl_node);
1527  SET_VALUE(library_system_flag, decl_node);
1528  SET_VALUE(C_flag, decl_node);
1529  SET_VALUE(uid, decl_node);
1530 }
1531 
1532 void tree_node_index_factory::operator()(const expr_node* obj, unsigned int& mask)
1533 {
1534  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1535  tree_node_mask::operator()(obj, mask);
1537 }
1538 
1539 void tree_node_index_factory::operator()(const gimple_node* obj, unsigned int& mask)
1540 {
1541  tree_node_mask::operator()(obj, mask);
1542  SET_NODE_ID(memuse, gimple_node);
1543  SET_NODE_ID(memdef, gimple_node);
1544  SET_SET_NODE_ID(vuses, gimple_node);
1545  SET_NODE_ID(vdef, gimple_node);
1546  SET_SET_NODE_ID(vovers, gimple_node);
1547  SEQ_SET_NODE_ID(pragmas, gimple_node);
1548  SET_NODE_ID(scpe, gimple_node);
1549  SET_VALUE(bb_index, gimple_node);
1550  SET_VALUE(use_set->anything, gimple_node);
1551  SET_VALUE(use_set->escaped, gimple_node);
1552  SET_VALUE(use_set->ipa_escaped, gimple_node);
1553  SET_VALUE(use_set->nonlocal, gimple_node);
1554  SET_VALUE(use_set->null, gimple_node);
1555  SET_VALUE(clobbered_set->anything, gimple_node);
1556  SET_VALUE(clobbered_set->escaped, gimple_node);
1557  SET_VALUE(clobbered_set->ipa_escaped, gimple_node);
1558  SET_VALUE(clobbered_set->nonlocal, gimple_node);
1559  SET_VALUE(clobbered_set->null, gimple_node);
1560  SEQ_SET_NODE_ID(use_set->variables, gimple_node);
1561  SEQ_SET_NODE_ID(clobbered_set->variables, gimple_node);
1562 }
1563 
1564 void tree_node_index_factory::operator()(const unary_expr* obj, unsigned int& mask)
1565 {
1566  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1567  tree_node_mask::operator()(obj, mask);
1568  SET_NODE_ID(op, unary_expr);
1569 }
1570 
1571 void tree_node_index_factory::operator()(const binary_expr* obj, unsigned int& mask)
1572 {
1573  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1574  tree_node_mask::operator()(obj, mask);
1575  SET_NODE_ID(op0, binary_expr);
1576  SET_NODE_ID(op1, binary_expr);
1577 }
1578 
1579 void tree_node_index_factory::operator()(const ternary_expr* obj, unsigned int& mask)
1580 {
1581  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1582  tree_node_mask::operator()(obj, mask);
1583  SET_NODE_ID(op0, ternary_expr);
1584  SET_NODE_ID(op1, ternary_expr);
1585  SET_NODE_ID(op2, ternary_expr);
1586 }
1587 
1588 void tree_node_index_factory::operator()(const quaternary_expr* obj, unsigned int& mask)
1589 {
1590  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1591  tree_node_mask::operator()(obj, mask);
1596 }
1597 
1598 void tree_node_index_factory::operator()(const type_node* obj, unsigned int& mask)
1599 {
1600  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1601  tree_node_mask::operator()(obj, mask);
1602  SET_VALUE(qual, type_node);
1603  SET_NODE_ID(name, type_node);
1604  SET_NODE_ID(unql, type_node);
1605  SET_NODE_ID(size, type_node);
1606  SET_NODE_ID(scpe, type_node);
1607  SET_VALUE(system_flag, type_node);
1608  SET_VALUE(packed_flag, type_node);
1609  SET_VALUE(algn, type_node);
1610 }
1611 
1612 void tree_node_index_factory::operator()(const memory_tag* obj, unsigned int& mask)
1613 {
1614  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1615  tree_node_mask::operator()(obj, mask);
1616  SEQ_SET_NODE_ID(list_of_aliases, memory_tag);
1617 }
1618 
1619 void tree_node_index_factory::operator()(const cst_node* obj, unsigned int& mask)
1620 {
1621  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1622  tree_node_mask::operator()(obj, mask);
1624 }
1625 
1626 void tree_node_index_factory::operator()(const error_mark* obj, unsigned int& mask)
1627 {
1628  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1629  tree_node_mask::operator()(obj, mask);
1630 }
1631 
1632 void tree_node_index_factory::operator()(const array_type* obj, unsigned int& mask)
1633 {
1634  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1635  tree_node_mask::operator()(obj, mask);
1636  SET_NODE_ID(elts, array_type);
1637  SET_NODE_ID(domn, array_type);
1638 }
1639 
1640 void tree_node_index_factory::operator()(const gimple_asm* obj, unsigned int& mask)
1641 {
1642  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1643  tree_node_mask::operator()(obj, mask);
1644  SET_VALUE(volatile_flag, gimple_asm);
1646  SET_NODE_ID(out, gimple_asm);
1647  SET_NODE_ID(in, gimple_asm);
1648  SET_NODE_ID(clob, gimple_asm);
1649 }
1650 
1651 void tree_node_index_factory::operator()(const baselink* obj, unsigned int& mask)
1652 {
1653  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1654  tree_node_mask::operator()(obj, mask);
1656 }
1657 
1658 void tree_node_index_factory::operator()(const gimple_bind* obj, unsigned int& mask)
1659 {
1660  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1661  tree_node_mask::operator()(obj, mask);
1662  SEQ_SET_NODE_ID(list_of_vars, gimple_bind);
1663  SET_NODE_ID(body, gimple_bind);
1664 }
1665 
1666 void tree_node_index_factory::operator()(const binfo* obj, unsigned int& mask)
1667 {
1668  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1669  tree_node_mask::operator()(obj, mask);
1671  SET_VALUE(virt_flag, binfo);
1672  SET_VALUE(bases, binfo);
1673  if(!GetPointer<binfo>(source_tn)->list_of_access_binf.empty())
1674  {
1675  auto vend = GetPointer<binfo>(source_tn)->list_of_access_binf.end();
1676  for(auto i = GetPointer<binfo>(source_tn)->list_of_access_binf.begin(); i != vend; ++i)
1677  {
1678  unsigned int node_id = GET_INDEX_NODE(i->second);
1679  THROW_ASSERT(remap.find(node_id) != remap.end(), "missing an index");
1680  node_id = remap.find(node_id)->second;
1681  dynamic_cast<binfo*>(curr_tree_node_ptr)->add_access_binf(TM->GetTreeReindex(node_id), i->first);
1682  }
1683  }
1684 }
1685 
1686 void tree_node_index_factory::operator()(const block* obj, unsigned int& mask)
1687 {
1688  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1689  tree_node_mask::operator()(obj, mask);
1690  SET_VALUE(bl_flag, block);
1691  SET_VALUE(bl, block);
1692 }
1693 
1694 void tree_node_index_factory::operator()(const call_expr* obj, unsigned int& mask)
1695 {
1696  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1697  tree_node_mask::operator()(obj, mask);
1698  SET_NODE_ID(fn, call_expr);
1700 }
1701 
1702 void tree_node_index_factory::operator()(const aggr_init_expr* obj, unsigned int& mask)
1703 {
1704  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1705  tree_node_mask::operator()(obj, mask);
1706  SET_VALUE(ctor, aggr_init_expr);
1707  SET_NODE_ID(slot, aggr_init_expr);
1708 }
1709 
1710 void tree_node_index_factory::operator()(const gimple_call* obj, unsigned int& mask)
1711 {
1712  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1713  tree_node_mask::operator()(obj, mask);
1714  SET_NODE_ID(fn, gimple_call);
1716 }
1717 
1718 void tree_node_index_factory::operator()(const case_label_expr* obj, unsigned int& mask)
1719 {
1720  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1721  tree_node_mask::operator()(obj, mask);
1724  SET_VALUE(default_flag, case_label_expr);
1726 }
1727 
1728 void tree_node_index_factory::operator()(const cast_expr* obj, unsigned int& mask)
1729 {
1730  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1731  tree_node_mask::operator()(obj, mask);
1732  SET_NODE_ID(op, cast_expr);
1733 }
1734 
1735 void tree_node_index_factory::operator()(const complex_cst* obj, unsigned int& mask)
1736 {
1737  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1738  tree_node_mask::operator()(obj, mask);
1739  SET_NODE_ID(real, complex_cst);
1740  SET_NODE_ID(imag, complex_cst);
1741 }
1742 
1743 void tree_node_index_factory::operator()(const complex_type* obj, unsigned int& mask)
1744 {
1745  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1746  tree_node_mask::operator()(obj, mask);
1747  SET_VALUE(unsigned_flag, complex_type);
1748  SET_VALUE(real_flag, complex_type);
1749 }
1750 
1751 void tree_node_index_factory::operator()(const gimple_cond* obj, unsigned int& mask)
1752 {
1753  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1754  tree_node_mask::operator()(obj, mask);
1755  SET_NODE_ID(op0, gimple_cond);
1756 }
1757 
1758 void tree_node_index_factory::operator()(const const_decl* obj, unsigned int& mask)
1759 {
1760  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1761  tree_node_mask::operator()(obj, mask);
1762  SET_NODE_ID(cnst, const_decl);
1763 }
1764 
1765 void tree_node_index_factory::operator()(const constructor* obj, unsigned int& mask)
1766 {
1767  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1768  tree_node_mask::operator()(obj, mask);
1770  if(!GetPointer<constructor>(source_tn)->list_of_idx_valu.empty())
1771  {
1772  auto vend = GetPointer<constructor>(source_tn)->list_of_idx_valu.end();
1773  for(auto i = GetPointer<constructor>(source_tn)->list_of_idx_valu.begin(); i != vend; ++i)
1774  {
1775  unsigned int node_id1 = i->first ? GET_INDEX_NODE(i->first) : 0;
1776  unsigned int node_id2 = GET_INDEX_NODE(i->second);
1777  THROW_ASSERT(!node_id1 || remap.find(node_id1) != remap.end(), "missing an index");
1778  node_id1 = node_id1 ? remap.find(node_id1)->second : 0;
1779  THROW_ASSERT(remap.find(node_id2) != remap.end(), "missing an index");
1780  node_id2 = remap.find(node_id2)->second;
1781  if(node_id1)
1782  {
1783  dynamic_cast<constructor*>(curr_tree_node_ptr)
1784  ->add_idx_valu(TM->GetTreeReindex(node_id1), TM->GetTreeReindex(node_id2));
1785  }
1786  else
1787  {
1788  dynamic_cast<constructor*>(curr_tree_node_ptr)->add_valu(TM->GetTreeReindex(node_id2));
1789  }
1790  }
1791  }
1792 }
1793 
1794 void tree_node_index_factory::operator()(const enumeral_type* obj, unsigned int& mask)
1795 {
1796  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1797  tree_node_mask::operator()(obj, mask);
1798  SET_VALUE(prec, enumeral_type);
1799  SET_VALUE(unsigned_flag, enumeral_type);
1802  SET_NODE_ID(csts, enumeral_type);
1803 }
1804 
1805 void tree_node_index_factory::operator()(const expr_stmt* obj, unsigned int& mask)
1806 {
1807  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1808  tree_node_mask::operator()(obj, mask);
1809 
1811  SET_NODE_ID(expr, expr_stmt);
1812  SET_NODE_ID(next, expr_stmt);
1813 }
1814 
1815 void tree_node_index_factory::operator()(const field_decl* obj, unsigned int& mask)
1816 {
1817  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1818  tree_node_mask::operator()(obj, mask);
1819  SET_VALUE(algn, field_decl);
1821  SET_NODE_ID(size, field_decl);
1822  SET_NODE_ID(bpos, field_decl);
1823  SET_NODE_ID(smt_ann, field_decl);
1824 }
1825 
1826 void tree_node_index_factory::operator()(const function_decl* obj, unsigned int& mask)
1827 {
1828  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1829  tree_node_mask::operator()(obj, mask);
1830  SET_VALUE(operator_flag, function_decl);
1831  if(!GetPointer<function_decl>(source_tn)->list_of_op_names.empty())
1832  {
1833  auto vend = GetPointer<function_decl>(source_tn)->list_of_op_names.end();
1834  for(auto i = GetPointer<function_decl>(source_tn)->list_of_op_names.begin(); i != vend; ++i)
1835  {
1836  dynamic_cast<function_decl*>(curr_tree_node_ptr)->add(*i);
1837  }
1838  }
1839 
1840  SET_NODE_ID(tmpl_parms, function_decl);
1841  SET_NODE_ID(tmpl_args, function_decl);
1842 
1843  SET_VALUE(fixd, function_decl);
1844  SET_VALUE(fixd_flag, function_decl);
1845  SET_VALUE(virt_flag, function_decl);
1846  SET_VALUE(virt, function_decl);
1848  SEQ_SET_NODE_ID(list_of_args, function_decl);
1849  SET_VALUE(undefined_flag, function_decl);
1850  SET_VALUE(builtin_flag, function_decl);
1851  SET_VALUE(static_flag, function_decl);
1852  SET_VALUE(hwcall_flag, function_decl);
1853  SET_VALUE(reverse_restrict_flag, function_decl);
1854  SET_VALUE(writing_memory, function_decl);
1855  SET_VALUE(reading_memory, function_decl);
1856  SET_VALUE(pipeline_enabled, function_decl);
1857  SET_VALUE(simple_pipeline, function_decl);
1858  SET_VALUE(initiation_time, function_decl);
1859 #if HAVE_FROM_PRAGMA_BUILT
1860  SET_VALUE(omp_atomic, function_decl);
1861  SET_VALUE(omp_body_loop, function_decl);
1862  SET_VALUE(omp_critical, function_decl);
1863  SET_VALUE(omp_for_wrapper, function_decl);
1864 #endif
1865  SET_NODE_ID(body, function_decl);
1866  SET_NODE_ID(inline_body, function_decl);
1867 }
1868 
1869 void tree_node_index_factory::operator()(const function_type* obj, unsigned int& mask)
1870 {
1871  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1872  tree_node_mask::operator()(obj, mask);
1873  SET_NODE_ID(retn, function_type);
1874  SET_NODE_ID(prms, function_type);
1875  SET_VALUE(varargs_flag, function_type);
1876 }
1877 
1878 void tree_node_index_factory::operator()(const gimple_assign* obj, unsigned int& mask)
1879 {
1880  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1881  tree_node_mask::operator()(obj, mask);
1882  SET_NODE_ID(op0, gimple_assign);
1883  SET_NODE_ID(op1, gimple_assign);
1884  SET_NODE_ID(predicate, gimple_assign);
1885  SET_VALUE(init_assignment, gimple_assign);
1886  SET_VALUE(clobber, gimple_assign);
1887  SET_VALUE(temporary_address, gimple_assign);
1888 }
1889 
1890 void tree_node_index_factory::operator()(const gimple_goto* obj, unsigned int& mask)
1891 {
1892  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1893  tree_node_mask::operator()(obj, mask);
1894  SET_NODE_ID(op, gimple_goto);
1895 }
1896 
1897 void tree_node_index_factory::operator()(const handler* obj, unsigned int& mask)
1898 {
1899  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1900  tree_node_mask::operator()(obj, mask);
1901 
1903  SET_NODE_ID(body, handler);
1904 }
1905 
1906 void tree_node_index_factory::operator()(const identifier_node* obj, unsigned int& mask)
1907 {
1908  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1909  tree_node_mask::operator()(obj, mask);
1910  THROW_ERROR("Use find_identifier_nodeID to find identifier_node objects");
1911 }
1912 
1913 void tree_node_index_factory::operator()(const integer_cst* obj, unsigned int& mask)
1914 {
1915  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1916  tree_node_mask::operator()(obj, mask);
1918 }
1919 
1920 void tree_node_index_factory::operator()(const integer_type* obj, unsigned int& mask)
1921 {
1922  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1923  tree_node_mask::operator()(obj, mask);
1924  SET_VALUE(prec, integer_type);
1926  SET_VALUE(unsigned_flag, integer_type);
1929 }
1930 
1931 void tree_node_index_factory::operator()(const gimple_label* obj, unsigned int& mask)
1932 {
1933  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1934  tree_node_mask::operator()(obj, mask);
1936 }
1937 
1938 void tree_node_index_factory::operator()(const method_type* obj, unsigned int& mask)
1939 {
1940  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1941  tree_node_mask::operator()(obj, mask);
1942  SET_NODE_ID(clas, method_type);
1943 }
1944 
1945 void tree_node_index_factory::operator()(const namespace_decl* obj, unsigned int& mask)
1946 {
1947  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1948  tree_node_mask::operator()(obj, mask);
1949  SET_NODE_ID(dcls, namespace_decl);
1950 }
1951 
1952 void tree_node_index_factory::operator()(const overload* obj, unsigned int& mask)
1953 {
1954  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1955  tree_node_mask::operator()(obj, mask);
1956 
1957  SET_NODE_ID(crnt, overload);
1958  SET_NODE_ID(chan, overload);
1959 }
1960 
1961 void tree_node_index_factory::operator()(const parm_decl* obj, unsigned int& mask)
1962 {
1963  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1964  tree_node_mask::operator()(obj, mask);
1965  SET_NODE_ID(argt, parm_decl);
1966  SET_NODE_ID(size, parm_decl);
1967  SET_VALUE(algn, parm_decl);
1968  SET_VALUE(used, parm_decl);
1969  SET_VALUE(register_flag, parm_decl);
1970  SET_VALUE(readonly_flag, parm_decl);
1971  SET_NODE_ID(smt_ann, parm_decl);
1972 }
1973 
1974 void tree_node_index_factory::operator()(const gimple_phi* obj, unsigned int& mask)
1975 {
1976  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1977  tree_node_mask::operator()(obj, mask);
1978 
1979  SET_NODE_ID(res, gimple_phi);
1980  for(const auto& def_edge : GetPointer<gimple_phi>(source_tn)->CGetDefEdgesList())
1981  {
1982  unsigned int node_id = GET_INDEX_NODE(def_edge.first);
1983  THROW_ASSERT(remap.find(node_id) != remap.end(), "missing an index");
1984  node_id = remap.find(node_id)->second;
1985  dynamic_cast<gimple_phi*>(curr_tree_node_ptr)
1986  ->AddDefEdge(TM, gimple_phi::DefEdge(TM->GetTreeReindex(node_id), def_edge.second));
1987  }
1988  SET_VALUE(virtual_flag, gimple_phi);
1989 }
1990 
1991 void tree_node_index_factory::operator()(const pointer_type* obj, unsigned int& mask)
1992 {
1993  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
1994  tree_node_mask::operator()(obj, mask);
1995  SET_NODE_ID(ptd, pointer_type);
1996 }
1997 
1998 void tree_node_index_factory::operator()(const real_cst* obj, unsigned int& mask)
1999 {
2000  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2001  tree_node_mask::operator()(obj, mask);
2002  SET_VALUE(overflow_flag, real_cst);
2003  SET_VALUE(valr, real_cst);
2004  SET_VALUE(valx, real_cst);
2005 }
2006 
2007 void tree_node_index_factory::operator()(const real_type* obj, unsigned int& mask)
2008 {
2009  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2010  tree_node_mask::operator()(obj, mask);
2011  SET_VALUE(prec, real_type);
2012 }
2013 
2014 void tree_node_index_factory::operator()(const record_type* obj, unsigned int& mask)
2015 {
2016  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2017  tree_node_mask::operator()(obj, mask);
2018  SET_NODE_ID(tmpl_parms, record_type);
2019  SET_NODE_ID(tmpl_args, record_type);
2020 
2021  SET_VALUE(ptrmem_flag, record_type);
2022  SET_NODE_ID(ptd, record_type);
2023  SET_NODE_ID(cls, record_type);
2024  SET_NODE_ID(bfld, record_type);
2025  SET_NODE_ID(vfld, record_type);
2026  SET_VALUE(spec_flag, record_type);
2027  SET_VALUE(struct_flag, record_type);
2028  SEQ_SET_NODE_ID(list_of_flds, record_type);
2029  SEQ_SET_NODE_ID(list_of_fncs, record_type);
2030  SET_NODE_ID(binf, record_type);
2031 }
2032 
2033 void tree_node_index_factory::operator()(const reference_type* obj, unsigned int& mask)
2034 {
2035  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2036  tree_node_mask::operator()(obj, mask);
2037  SET_NODE_ID(refd, reference_type);
2038 }
2039 
2040 void tree_node_index_factory::operator()(const result_decl* obj, unsigned int& mask)
2041 {
2042  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2043  tree_node_mask::operator()(obj, mask);
2045  SET_NODE_ID(size, result_decl);
2046  SET_VALUE(algn, result_decl);
2047  SET_NODE_ID(smt_ann, result_decl);
2048 }
2049 
2050 void tree_node_index_factory::operator()(const gimple_return* obj, unsigned int& mask)
2051 {
2052  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2053  tree_node_mask::operator()(obj, mask);
2055 }
2056 
2057 void tree_node_index_factory::operator()(const return_stmt* obj, unsigned int& mask)
2058 {
2059  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2060  tree_node_mask::operator()(obj, mask);
2061 
2063  SET_NODE_ID(expr, return_stmt);
2064 }
2065 
2066 void tree_node_index_factory::operator()(const scope_ref* obj, unsigned int& mask)
2067 {
2068  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2069  tree_node_mask::operator()(obj, mask);
2070  SET_NODE_ID(op0, scope_ref);
2071  SET_NODE_ID(op1, scope_ref);
2072 }
2073 
2074 void tree_node_index_factory::operator()(const ssa_name* obj, unsigned int& mask)
2075 {
2076  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2077  tree_node_mask::operator()(obj, mask);
2078 
2080  SET_NODE_ID(var, ssa_name);
2081  SET_VALUE(vers, ssa_name);
2082  SET_VALUE(orig_vers, ssa_name);
2083  SET_VALUE(use_set->anything, ssa_name);
2084  SET_VALUE(use_set->escaped, ssa_name);
2085  SET_VALUE(use_set->ipa_escaped, ssa_name);
2086  SET_VALUE(use_set->nonlocal, ssa_name);
2087  SET_VALUE(use_set->null, ssa_name);
2088  SEQ_SET_NODE_ID(use_set->variables, ssa_name);
2089 
2090  SET_VALUE(volatile_flag, ssa_name);
2091  SET_VALUE(virtual_flag, ssa_name);
2092  SET_VALUE(default_flag, ssa_name);
2093  for(const auto& def_stmt : GetPointer<const ssa_name>(source_tn)->CGetDefStmts())
2094  {
2095  unsigned int node_id = def_stmt->index;
2096  THROW_ASSERT(remap.find(node_id) != remap.end(), "missing an index: " + std::to_string(node_id));
2097  node_id = remap.find(node_id)->second;
2098  dynamic_cast<ssa_name*>(curr_tree_node_ptr)->AddDefStmt(TM->GetTreeReindex(node_id));
2099  }
2102  SET_VALUE(bit_values, ssa_name);
2103 }
2104 
2105 void tree_node_index_factory::operator()(const statement_list* obj, unsigned int& mask)
2106 {
2107  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2108  tree_node_mask::operator()(obj, mask);
2109  LSEQ_SET_NODE_ID(list_of_stmt, statement_list);
2110  auto mend = GetPointer<statement_list>(source_tn)->list_of_bloc.end();
2111  for(auto i = GetPointer<statement_list>(source_tn)->list_of_bloc.begin(); i != mend; ++i)
2112  {
2113  curr_bloc = new bloc(i->first);
2114  source_bloc = i->second;
2115  curr_bloc->visit(this);
2116  dynamic_cast<statement_list*>(curr_tree_node_ptr)->add_bloc(blocRef(curr_bloc));
2117  curr_bloc = nullptr;
2118  source_bloc = blocRef();
2119  }
2120 }
2121 
2122 void tree_node_index_factory::operator()(const string_cst* obj, unsigned int& mask)
2123 {
2124  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2125  tree_node_mask::operator()(obj, mask);
2126  SET_VALUE(strg, string_cst);
2127 }
2128 
2129 void tree_node_index_factory::operator()(const gimple_switch* obj, unsigned int& mask)
2130 {
2131  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2132  tree_node_mask::operator()(obj, mask);
2133  SET_NODE_ID(op0, gimple_switch);
2134  SET_NODE_ID(op1, gimple_switch);
2135 }
2136 
2137 void tree_node_index_factory::operator()(const target_expr* obj, unsigned int& mask)
2138 {
2139  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2140  tree_node_mask::operator()(obj, mask);
2141  SET_NODE_ID(decl, target_expr);
2143  SET_NODE_ID(clnp, target_expr);
2144 }
2145 
2146 void tree_node_index_factory::operator()(const lut_expr* obj, unsigned int& mask)
2147 {
2148  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2149  tree_node_mask::operator()(obj, mask);
2150  SET_NODE_ID(op0, lut_expr);
2151  SET_NODE_ID(op1, lut_expr);
2152  SET_NODE_ID(op2, lut_expr);
2153  SET_NODE_ID(op3, lut_expr);
2154  SET_NODE_ID(op4, lut_expr);
2155  SET_NODE_ID(op5, lut_expr);
2156  SET_NODE_ID(op6, lut_expr);
2157  SET_NODE_ID(op7, lut_expr);
2158  SET_NODE_ID(op8, lut_expr);
2159 }
2160 
2161 void tree_node_index_factory::operator()(const template_decl* obj, unsigned int& mask)
2162 {
2163  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2164  tree_node_mask::operator()(obj, mask);
2165  SET_NODE_ID(rslt, template_decl);
2166  SET_NODE_ID(inst, template_decl);
2167  SET_NODE_ID(spcs, template_decl);
2168  SET_NODE_ID(prms, template_decl);
2169 }
2170 
2171 void tree_node_index_factory::operator()(const template_parm_index* obj, unsigned int& mask)
2172 {
2173  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2174  tree_node_mask::operator()(obj, mask);
2177  SET_VALUE(constant_flag, template_parm_index);
2178  SET_VALUE(readonly_flag, template_parm_index);
2181  SET_VALUE(orig_level, template_parm_index);
2182 }
2183 
2184 void tree_node_index_factory::operator()(const tree_list* obj, unsigned int& mask)
2185 {
2186  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2187  tree_node_mask::operator()(obj, mask);
2188 
2189  SET_NODE_ID(purp, tree_list);
2190  SET_NODE_ID(valu, tree_list);
2191  SET_NODE_ID(chan, tree_list);
2192 }
2193 
2194 void tree_node_index_factory::operator()(const tree_vec* obj, unsigned int& mask)
2195 {
2196  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2197  tree_node_mask::operator()(obj, mask);
2198 
2199  SET_VALUE(lngt, tree_vec);
2200  SEQ_SET_NODE_ID(list_of_op, tree_vec);
2201 }
2202 
2203 void tree_node_index_factory::operator()(const try_block* obj, unsigned int& mask)
2204 {
2205  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2206  tree_node_mask::operator()(obj, mask);
2207 
2209  SET_NODE_ID(body, try_block);
2210  SET_NODE_ID(hdlr, try_block);
2211  SET_NODE_ID(next, try_block);
2212 }
2213 
2214 void tree_node_index_factory::operator()(const type_decl* obj, unsigned int& mask)
2215 {
2216  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2217  tree_node_mask::operator()(obj, mask);
2218  SET_NODE_ID(tmpl_parms, type_decl);
2219  SET_NODE_ID(tmpl_args, type_decl);
2220 }
2221 
2222 void tree_node_index_factory::operator()(const union_type* obj, unsigned int& mask)
2223 {
2224  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2225  tree_node_mask::operator()(obj, mask);
2226  SEQ_SET_NODE_ID(list_of_flds, union_type);
2227  SEQ_SET_NODE_ID(list_of_fncs, union_type);
2228  SET_NODE_ID(binf, union_type);
2229 }
2230 
2231 void tree_node_index_factory::operator()(const var_decl* obj, unsigned int& mask)
2232 {
2233  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2234  tree_node_mask::operator()(obj, mask);
2235 
2236  SET_VALUE(use_tmpl, var_decl);
2237  SET_VALUE(static_static_flag, var_decl);
2238  SET_VALUE(extern_flag, var_decl);
2239  SET_VALUE(addr_taken, var_decl);
2240  SET_VALUE(addr_not_taken, var_decl);
2241  SET_VALUE(static_flag, var_decl);
2243  SET_NODE_ID(size, var_decl);
2244  SET_VALUE(algn, var_decl);
2245  SET_VALUE(used, var_decl);
2246  SET_VALUE(register_flag, var_decl);
2247  SET_VALUE(readonly_flag, var_decl);
2248  SET_VALUE(bit_values, var_decl);
2249  SET_NODE_ID(smt_ann, var_decl);
2251 }
2252 
2253 void tree_node_index_factory::operator()(const vector_cst* obj, unsigned int& mask)
2254 {
2255  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2256  tree_node_mask::operator()(obj, mask);
2257  SEQ_SET_NODE_ID(list_of_valu, vector_cst);
2258 }
2259 
2260 void tree_node_index_factory::operator()(const type_argument_pack* obj, unsigned int& mask)
2261 {
2262  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2263  tree_node_mask::operator()(obj, mask);
2265 }
2266 
2267 void tree_node_index_factory::operator()(const nontype_argument_pack* obj, unsigned int& mask)
2268 {
2269  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2270  tree_node_mask::operator()(obj, mask);
2272 }
2273 
2274 void tree_node_index_factory::operator()(const type_pack_expansion* obj, unsigned int& mask)
2275 {
2276  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2277  tree_node_mask::operator()(obj, mask);
2279  SET_NODE_ID(param_packs, type_pack_expansion);
2281 }
2282 
2283 void tree_node_index_factory::operator()(const expr_pack_expansion* obj, unsigned int& mask)
2284 {
2285  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2286  tree_node_mask::operator()(obj, mask);
2288  SET_NODE_ID(param_packs, expr_pack_expansion);
2290 }
2291 
2292 void tree_node_index_factory::operator()(const vector_type* obj, unsigned int& mask)
2293 {
2294  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2295  tree_node_mask::operator()(obj, mask);
2296  SET_NODE_ID(elts, vector_type);
2297 }
2298 
2299 void tree_node_index_factory::operator()(const target_mem_ref* obj, unsigned int& mask)
2300 {
2301  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2302  tree_node_mask::operator()(obj, mask);
2303 
2305  SET_NODE_ID(symbol, target_mem_ref);
2308  SET_NODE_ID(step, target_mem_ref);
2310  SET_NODE_ID(orig, target_mem_ref);
2312 }
2313 
2314 void tree_node_index_factory::operator()(const target_mem_ref461* obj, unsigned int& mask)
2315 {
2316  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2317  tree_node_mask::operator()(obj, mask);
2318 
2325 }
2326 
2327 void tree_node_index_factory::operator()(const bloc* obj, unsigned int& mask)
2328 {
2329  tree_node_mask::operator()(obj, mask);
2330  curr_bloc->hpl = source_bloc->hpl;
2331  curr_bloc->loop_id = source_bloc->loop_id;
2332  curr_bloc->list_of_pred = source_bloc->list_of_pred;
2333  curr_bloc->list_of_succ = source_bloc->list_of_succ;
2334  curr_bloc->true_edge = source_bloc->true_edge;
2335  curr_bloc->false_edge = source_bloc->false_edge;
2336  for(const auto& phi : source_bloc->CGetPhiList())
2337  {
2338  unsigned int node_id = GET_INDEX_NODE(phi);
2339  THROW_ASSERT(remap.find(node_id) != remap.end(), "missing an index");
2340  node_id = remap.find(node_id)->second;
2341  curr_bloc->AddPhi(TM->GetTreeReindex(node_id));
2342  }
2343  for(const auto& stmt : source_bloc->CGetStmtList())
2344  {
2345  unsigned int node_id = GET_INDEX_NODE(stmt);
2346  THROW_ASSERT(remap.find(node_id) != remap.end(), "missing an index");
2347  node_id = remap.find(node_id)->second;
2348  curr_bloc->PushBack(TM->GetTreeReindex(node_id), application_managerRef());
2349  }
2350 }
2351 
2352 void tree_node_index_factory::operator()(const gimple_while* obj, unsigned int& mask)
2353 {
2354  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2355  tree_node_mask::operator()(obj, mask);
2356  SET_NODE_ID(op0, gimple_while);
2357 }
2358 
2359 void tree_node_index_factory::operator()(const gimple_for* obj, unsigned int& mask)
2360 {
2361  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2362  tree_node_mask::operator()(obj, mask);
2363  SET_NODE_ID(op1, gimple_for);
2364  SET_NODE_ID(op2, gimple_for);
2365 }
2366 
2367 void tree_node_index_factory::operator()(const gimple_multi_way_if* obj, unsigned int& mask)
2368 {
2369  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2370  tree_node_mask::operator()(obj, mask);
2371  if(!GetPointer<gimple_multi_way_if>(source_tn)->list_of_cond.empty())
2372  {
2373  for(const auto& cond : GetPointer<gimple_multi_way_if>(source_tn)->list_of_cond)
2374  {
2375  unsigned int node_id = cond.first->index;
2376  THROW_ASSERT(remap.find(node_id) != remap.end(), "missing an index");
2377  node_id = remap.find(node_id)->second;
2378  dynamic_cast<gimple_multi_way_if*>(curr_tree_node_ptr)->add_cond(TM->GetTreeReindex(node_id), cond.second);
2379  }
2380  }
2381 }
2382 
2383 void tree_node_index_factory::operator()(const null_node* obj, unsigned int& mask)
2384 {
2385  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2386  tree_node_mask::operator()(obj, mask);
2387 }
2388 
2389 void tree_node_index_factory::operator()(const gimple_pragma* obj, unsigned int& mask)
2390 {
2391  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2392  tree_node_mask::operator()(obj, mask);
2393  SET_VALUE(is_block, gimple_pragma);
2394  SET_VALUE(is_opening, gimple_pragma);
2396  SET_NODE_ID(scope, gimple_pragma);
2397  SET_NODE_ID(directive, gimple_pragma);
2398 }
2399 
2400 void tree_node_index_factory::operator()(const omp_pragma* obj, unsigned int& mask)
2401 {
2402  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2403  tree_node_mask::operator()(obj, mask);
2404 }
2405 
2406 void tree_node_index_factory::operator()(const omp_parallel_pragma* obj, unsigned int& mask)
2407 {
2408  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2409  tree_node_mask::operator()(obj, mask);
2410  SET_VALUE(is_shortcut, omp_parallel_pragma);
2411  if(!GetPointer<omp_parallel_pragma>(source_tn)->clauses.empty())
2412  {
2413  auto vend = GetPointer<omp_parallel_pragma>(source_tn)->clauses.end();
2414  for(auto i = GetPointer<omp_parallel_pragma>(source_tn)->clauses.begin(); i != vend; ++i)
2415  {
2416  dynamic_cast<omp_parallel_pragma*>(curr_tree_node_ptr)->clauses[i->first] = i->second;
2417  }
2418  }
2419 }
2420 
2421 void tree_node_index_factory::operator()(const omp_for_pragma* obj, unsigned int& mask)
2422 {
2423  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2424  tree_node_mask::operator()(obj, mask);
2425  if(!GetPointer<omp_for_pragma>(source_tn)->clauses.empty())
2426  {
2427  auto vend = GetPointer<omp_for_pragma>(source_tn)->clauses.end();
2428  for(auto i = GetPointer<omp_for_pragma>(source_tn)->clauses.begin(); i != vend; ++i)
2429  {
2430  dynamic_cast<omp_for_pragma*>(curr_tree_node_ptr)->clauses[i->first] = i->second;
2431  }
2432  }
2433 }
2434 
2435 void tree_node_index_factory::operator()(const omp_declare_simd_pragma* obj, unsigned int& mask)
2436 {
2437  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2438  tree_node_mask::operator()(obj, mask);
2439  if(!GetPointer<omp_declare_simd_pragma>(source_tn)->clauses.empty())
2440  {
2441  auto vend = GetPointer<omp_declare_simd_pragma>(source_tn)->clauses.end();
2442  for(auto i = GetPointer<omp_declare_simd_pragma>(source_tn)->clauses.begin(); i != vend; ++i)
2443  {
2444  dynamic_cast<omp_declare_simd_pragma*>(curr_tree_node_ptr)->clauses[i->first] = i->second;
2445  }
2446  }
2447 }
2448 
2449 void tree_node_index_factory::operator()(const omp_simd_pragma* obj, unsigned int& mask)
2450 {
2451  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2452  tree_node_mask::operator()(obj, mask);
2453  if(!GetPointer<omp_simd_pragma>(source_tn)->clauses.empty())
2454  {
2455  auto vend = GetPointer<omp_simd_pragma>(source_tn)->clauses.end();
2456  for(auto i = GetPointer<omp_simd_pragma>(source_tn)->clauses.begin(); i != vend; ++i)
2457  {
2458  dynamic_cast<omp_simd_pragma*>(curr_tree_node_ptr)->clauses[i->first] = i->second;
2459  }
2460  }
2461 }
2462 
2463 void tree_node_index_factory::operator()(const omp_target_pragma* obj, unsigned int& mask)
2464 {
2465  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2466  tree_node_mask::operator()(obj, mask);
2467  if(!GetPointer<omp_target_pragma>(source_tn)->clauses.empty())
2468  {
2469  auto vend = GetPointer<omp_target_pragma>(source_tn)->clauses.end();
2470  for(auto i = GetPointer<omp_target_pragma>(source_tn)->clauses.begin(); i != vend; ++i)
2471  {
2472  dynamic_cast<omp_target_pragma*>(curr_tree_node_ptr)->clauses[i->first] = i->second;
2473  }
2474  }
2475 }
2476 
2477 void tree_node_index_factory::operator()(const omp_critical_pragma* obj, unsigned int& mask)
2478 {
2479  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2480  tree_node_mask::operator()(obj, mask);
2481  if(!GetPointer<omp_critical_pragma>(source_tn)->clauses.empty())
2482  {
2483  auto vend = GetPointer<omp_critical_pragma>(source_tn)->clauses.end();
2484  for(auto i = GetPointer<omp_critical_pragma>(source_tn)->clauses.begin(); i != vend; ++i)
2485  {
2486  dynamic_cast<omp_critical_pragma*>(curr_tree_node_ptr)->clauses[i->first] = i->second;
2487  }
2488  }
2489 }
2490 
2491 void tree_node_index_factory::operator()(const omp_task_pragma* obj, unsigned int& mask)
2492 {
2493  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2494  tree_node_mask::operator()(obj, mask);
2495  if(!GetPointer<omp_task_pragma>(source_tn)->clauses.empty())
2496  {
2497  auto vend = GetPointer<omp_task_pragma>(source_tn)->clauses.end();
2498  for(auto i = GetPointer<omp_task_pragma>(source_tn)->clauses.begin(); i != vend; ++i)
2499  {
2500  dynamic_cast<omp_task_pragma*>(curr_tree_node_ptr)->clauses[i->first] = i->second;
2501  }
2502  }
2503 }
2504 
2505 void tree_node_index_factory::operator()(const omp_sections_pragma* obj, unsigned int& mask)
2506 {
2507  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2508  tree_node_mask::operator()(obj, mask);
2509  SET_VALUE(is_shortcut, omp_sections_pragma);
2510 }
2511 
2512 void tree_node_index_factory::operator()(const omp_parallel_sections_pragma* obj, unsigned int& mask)
2513 {
2514  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2515  tree_node_mask::operator()(obj, mask);
2518 }
2519 
2520 void tree_node_index_factory::operator()(const omp_section_pragma* obj, unsigned int& mask)
2521 {
2522  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2523  tree_node_mask::operator()(obj, mask);
2524 }
2525 
2526 void tree_node_index_factory::operator()(const map_pragma* obj, unsigned int& mask)
2527 {
2528  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2529  tree_node_mask::operator()(obj, mask);
2530 }
2531 
2532 void tree_node_index_factory::operator()(const call_hw_pragma* obj, unsigned int& mask)
2533 {
2534  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2535  tree_node_mask::operator()(obj, mask);
2536  SET_VALUE(HW_component, call_hw_pragma);
2537 }
2538 
2539 void tree_node_index_factory::operator()(const call_point_hw_pragma* obj, unsigned int& mask)
2540 {
2541  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2542  tree_node_mask::operator()(obj, mask);
2543  SET_VALUE(HW_component, call_point_hw_pragma);
2544  SET_VALUE(ID_implementation, call_point_hw_pragma);
2545  SET_VALUE(recursive, call_point_hw_pragma);
2546 }
2547 
2548 void tree_node_index_factory::operator()(const issue_pragma* obj, unsigned int& mask)
2549 {
2550  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2551  tree_node_mask::operator()(obj, mask);
2552 }
2553 
2554 void tree_node_index_factory::operator()(const profiling_pragma* obj, unsigned int& mask)
2555 {
2556  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2557  tree_node_mask::operator()(obj, mask);
2558 }
2559 
2560 void tree_node_index_factory::operator()(const blackbox_pragma* obj, unsigned int& mask)
2561 {
2562  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2563  tree_node_mask::operator()(obj, mask);
2564 }
2565 
2566 void tree_node_index_factory::operator()(const statistical_profiling* obj, unsigned int& mask)
2567 {
2568  THROW_ASSERT(obj == curr_tree_node_ptr, "wrong factory setup");
2569  tree_node_mask::operator()(obj, mask);
2570 }
struct definition of the type_decl tree node.
Definition: tree_node.hpp:5470
tree_nodeRef ptd
ptd field points to the node for the type pointed to.
Definition: tree_node.hpp:3909
This struct specifies the integer_cst node.
Definition: tree_node.hpp:3242
const TreeNodeSet CGetDefStmts() const
Return the set of definition statements.
Definition: tree_node.cpp:1274
tree_nodeRef in
in is the operand 2: ASM_INPUTS, this represents the inputs for the statement.
Definition: tree_node.hpp:1591
tree_nodeRef op
the label
Definition: tree_node.hpp:3351
struct definition of the const_decl tree node.
Definition: tree_node.hpp:2386
This struct implements the target_expr node.
Definition: tree_node.hpp:4815
tree_nodeRef attributes
Definition: tree_node.hpp:912
tree_nodeRef min
min: tree-dump.c use the macro TYPE_MIN_VALUE
Definition: tree_node.hpp:3304
tree_nodeRef init
init field holds the value to initialize a variable to.
Definition: tree_node.hpp:4279
tree_nodeRef op2
second operand
Definition: tree_node.hpp:6056
const DefEdgeList & CGetDefEdgesList() const
Return the list of def edges.
Definition: tree_node.cpp:1011
tree_nodeRef size
size field holds the size of datum, in bits.
Definition: tree_node.hpp:3678
() label_decl()() modop_expr() new_expr() placeholder_expr()() boolean_type() CharType() nullptr_type() lang_type() offset_type() qual_union_type() set_type() template_type_parm() typename_type(void_type)) void tree_node
Definition: tree_node.cpp:168
This struct specifies the field bloc (basic block).
() label_decl()() modop_expr() new_expr() placeholder_expr() template_id_expr(vec_new_expr)) BOOST_PP_SEQ_FOR_EACH(VISIT_TREE_NODE_MACRO
std::vector< tree_nodeRef > list_of_fncs
list_of_fncs is a chain of methods_decl for the fields of the struct.
Definition: tree_node.hpp:5560
struct definition of the vector_type tree node.
Definition: tree_node.hpp:5938
struct definition of the array_type tree node.
Definition: tree_node.hpp:1520
tree_nodeRef max
max: tree-dump.c use the macro TYPE_MAX_VALUE
Definition: tree_node.hpp:3307
tree_nodeRef unql
unql field, in any member of such a chain, points to the start of the chain.
Definition: tree_node.hpp:1343
tree_nodeRef tmpl_parms
tmpl_parms holds template parameters It is a TREE_LIST, his VALU field is a TREE_VEC whose LIST_OF_OP...
Definition: tree_node.hpp:2828
struct definition of the real_type tree node.
Definition: tree_node.hpp:4039
tree_nodeRef decl
Definition: tree_node.hpp:5079
tree_nodeRef name
name field contains info on the name used in the program for this type.It is either a TYPE_DECL node...
Definition: tree_node.hpp:1337
tree_nodeRef next
Is the next statement.
Definition: tree_node.hpp:2606
tree_nodeRef bfld
binf field are information about this type, as a base type for itself.
Definition: tree_node.hpp:4109
tree_nodeRef op1
The second operand of the binary expression.
Definition: tree_node.hpp:3024
Any erroneous construct is parsed into a node of this type.
Definition: tree_node.hpp:1462
char base
This version is stamped on May 10, 2016.
Definition: nussinov.c:24
This struct specifies the statement_list node.
Definition: tree_node.hpp:4662
tree_nodeRef name
name field contains an identifier_node used to represent a name.
Definition: tree_node.hpp:883
tree_nodeRef elts
field elts is the type of an vector element (tree-dump.c use the macro TREE_TYPE) ...
Definition: tree_node.hpp:5946
#define ATTR_SEQ
tree_nodeRef idx
INDEX register.
Definition: tree_node.hpp:4955
std::vector< std::pair< tree_nodeRef, tree_nodeRef > > list_of_idx_valu
store the list initializers: <index, value>
Definition: tree_node.hpp:2445
#define SET_VALUE(field, type)
A HANDLER wraps a catch handler for the HANDLER_TYPE.
Definition: tree_node.hpp:3141
tree_nodeRef param_packs
PACK_EXPANSION_PARAMETER_PACKS.
Definition: tree_node.hpp:2197
tree_nodeRef op
op is casted node
Definition: tree_node.hpp:2065
struct definition of the source position.
Definition: tree_node.hpp:832
tree_nodeRef type
type of the expression
Definition: tree_node.hpp:4873
tree_nodeRef orig
For any sort of a ..._DECL node, this points to the original (abstract) decl node which this decl is ...
Definition: tree_node.hpp:899
Represents an argument pack of types (or templates).
Definition: tree_node.hpp:5139
tree_nodeRef op1
first operand
Definition: tree_node.hpp:6053
DefEdgeList list_of_def_edge
store the list pairs: <def, edge>.
Definition: tree_node.hpp:3759
struct definition of the function_decl tree node.
Definition: tree_node.hpp:2759
tree_nodeRef size
size field contains a tree that is an expression for the size in bits.
Definition: tree_node.hpp:1349
struct definition of the method_type tree node.
Definition: tree_node.hpp:3452
tree_nodeRef decl
it is the target of an initialization
Definition: tree_node.hpp:4822
TreeNodeSet def_stmts
in case ssa_name is not volatile the statement which defines it; statements could be more than one be...
Definition: tree_node.hpp:4533
std::vector< tree_nodeRef > list_of_flds
list_of_flds is a chain of field_decl for the fields of the struct, and var_decl, type_decl and const...
Definition: tree_node.hpp:4090
tree_nodeRef var
var is the variable being referenced (macro SSA_NAME_VAR).
Definition: tree_node.hpp:4543
tree_nodeRef arg
PACK_EXPANSION_EXTRA_ARGS.
Definition: tree_node.hpp:2200
std::list< tree_nodeRef > list_of_stmt
list_of_stmt field is the list of statements. If this field is null then the list_of_bloc field is no...
Definition: tree_node.hpp:4670
tree_nodeRef refd
refd field references to the node for the type referenced to.
Definition: tree_node.hpp:4233
tree_nodeRef imag
imag is the TREE_IMAGPART which content is other constant node.
Definition: tree_node.hpp:2248
tree_nodeRef prms
prms field is a list of types of arguments expected, this list is made of tree_list nodes...
Definition: tree_node.hpp:2981
tree_nodeRef mngl
mngl field contains the name of the object as the assembler will see it.
Definition: tree_node.hpp:890
This struct specifies the gimple_label node.
Definition: tree_node.hpp:3343
tree_nodeRef size
size field holds the size of datum, in bits.
Definition: tree_node.hpp:5704
This struct specifies the string_cst node.
Definition: tree_node.hpp:4724
exceptions managed by PandA
tree_nodeRef op4
fourth operand
Definition: tree_node.hpp:6062
tree_nodeRef op2
The third operand of the ternary expression.
Definition: tree_node.hpp:1253
tree_nodeRef crnt
Is the current function declaration.
Definition: tree_node.hpp:3629
tree_nodeRef op1
The second operand of the Quaternary expression.
Definition: tree_node.hpp:1287
struct definition of the union_type tree node.
Definition: tree_node.hpp:5540
std::vector< tree_nodeRef > list_of_valu
list_of_valu is a list of value of the TREE_VECTOR_CST_ELTS vector elements.
Definition: tree_node.hpp:5896
A simple interface to token object of the raw files.
tree_nodeRef fn
fn field is the initial declaration for this function declaration
Definition: tree_node.hpp:2815
struct definition of the unary node structures.
Definition: tree_node.hpp:1177
tree_nodeRef type
type field is the type of the node
Definition: tree_node.hpp:2442
tree_nodeRef smt_ann
symbol_memory_tag annotation
Definition: tree_node.hpp:2679
const tree_managerRef TM
tree manager
struct definition of the record_type tree node.
Definition: tree_node.hpp:4078
tree_nodeRef op6
sixth operand
Definition: tree_node.hpp:6068
tree_nodeRef op0
The first operand of the binary expression.
Definition: tree_node.hpp:3021
tree_nodeRef size
size field holds the size of datum, in bits.
Definition: tree_node.hpp:4285
GIMPLE_BIND <VARS, BLOCK, BODY> represents a lexical scope.
Definition: tree_node.hpp:1664
std::map< unsigned int, blocRef > list_of_bloc
list_of_bloc field is the list of basic block. If this field is null then the list_of_stmt field is n...
Definition: tree_node.hpp:4673
tree_nodeRef base
BASE register.
Definition: tree_node.hpp:4949
tree_nodeRef op
PACK_EXPANSION_PATTERN.
Definition: tree_node.hpp:2194
#define GET_INDEX_NODE(t)
Macro used to hide implementation details when accessing a tree_node from another tree_node...
Definition: tree_node.hpp:361
tree_nodeRef op1
The second operand of the binary expression.
Definition: tree_node.hpp:1217
struct definition of the ternary node structures.
Definition: tree_node.hpp:1239
#define min(x, y)
tree_nodeRef tmpl_args
tmpl_args holds template instantiations It is a TREE_VEC whose LIST_OF_OP holds template instantiatio...
Definition: tree_node.hpp:2835
#define ATTR_MACRO(r, data, elem)
This struct specifies the gimple_cond node.
Definition: tree_node.hpp:2345
tree_nodeRef clas
clas field is the type of "self".
Definition: tree_node.hpp:3466
#define SET_SET_NODE_ID(list_field, type)
struct definition of the function_type tree node.
Definition: tree_node.hpp:2960
const std::list< tree_nodeRef > & CGetPhiList() const
Return the list of phi.
tree_nodeRef op7
seventh operand
Definition: tree_node.hpp:6071
tree_nodeRef op1
op1 is the operand 1 (macro CASE_HIGH) of the case label expression
Definition: tree_node.hpp:2022
std::vector< tree_nodeRef > args
The arguments of the gimple_call.
Definition: tree_node.hpp:1968
tree_nodeRef argt
argt field is the type in which the argument is actually passed, which may be different from its type...
Definition: tree_node.hpp:3672
struct definition of the parm_decl tree node.
Definition: tree_node.hpp:3660
Data structure describing a basic block at tree level.
This class is used to perform the re-index of all tree nodes.
tree_nodeRef chan
chan field: the decls in one binding context are chained through this field.
Definition: tree_node.hpp:936
AGGR_INIT_EXPRs have a variably-sized representation similar to that of CALL_EXPRs.
Definition: tree_node.hpp:1919
Constructor: return an aggregate value made from specified components.
Definition: tree_node.hpp:2434
tree_nodeRef bpos
bpos field is the field position, counting in bytes, of the byte containing the bit closest to the be...
Definition: tree_node.hpp:2674
This struct specifies the binfo node.
Definition: tree_node.hpp:1713
struct definition of the template_decl tree node.
Definition: tree_node.hpp:4993
void create_tree_node(const unsigned int node_id, const tree_nodeRef &tn)
tree_node visitors
#define SET_VISIT_INDEX(mask, index)
macro used to selectively allow member visit
Definition: visitor.hpp:75
This struct represents a try-block statement.
Definition: tree_node.hpp:5409
tree_nodeRef binf
type context
Definition: tree_node.hpp:4112
tree_nodeRef init
init field holds the value to initialize a variable to.
Definition: tree_node.hpp:2654
tree_nodeRef domn
field domn is the type to index by (tree-dump.c use the macro TYPE_DOMAIN).
Definition: tree_node.hpp:1534
tree_nodeRef spcs
prms field holds the specialization parameters vector.
Definition: tree_node.hpp:5009
Abstract pure class for the tree structure.
Definition: tree_node.hpp:139
tree_nodeRef arg
arguments stored in the argument pack
Definition: tree_node.hpp:5185
tree_nodeRef res
res is the new SSA_NAME node created by the PHI node.
Definition: tree_node.hpp:3772
virtual enum kind get_kind() const =0
Virtual function returning the type of the actual class.
struct definition of the label_decl tree node.
Definition: tree_node.hpp:3529
void line(int x1, int y1, int x2, int y2, unsigned int color)
Definition: main.c:110
struct definition of the label_decl tree node.
Definition: tree_node.hpp:5659
std::vector< tree_nodeRef > args
The arguments of the call_expr.
Definition: tree_node.hpp:1882
#define max
Definition: backprop.h:17
tree_nodeRef op3
The fourth operand of the Quaternary expression.
Definition: tree_node.hpp:1293
Directive represinting mapping of a software function on a component.
struct definition of the result_decl tree node.
Definition: tree_node.hpp:4266
This struct specifies the vector_cst node.
Definition: tree_node.hpp:5888
tree_nodeRef scpe
context/scope of the type object.
Definition: tree_node.hpp:1355
tree_nodeRef memuse
whole memory operand use
Definition: tree_node.hpp:1087
TreeNodeSet vovers
vovers of this statement
Definition: tree_node.hpp:1112
virtual std::string get_kind_text() const =0
Virtual function returning the name of the actual class.
This struct specifies the gimple_phi node.
Definition: tree_node.hpp:3742
() label_decl() using_decl(translation_unit_decl)) BOOST_PP_SEQ_FOR_EACH(VISIT_TREE_NODE_MACRO
This struct represents a list-like node for chaining overloading candidates.
Definition: tree_node.hpp:3621
struct definition of the Quaternary node structures.
Definition: tree_node.hpp:1276
const std::list< tree_nodeRef > & CGetStmtList() const
Return the list of stmt.
tree_nodeRef init
it is the initializer for the target
Definition: tree_node.hpp:4825
tree_nodeRef body
is the body of the handler
Definition: tree_node.hpp:3152
#define SEQ_SET_NODE_ID(list_field, type)
CustomUnorderedMapUnstable< unsigned int, unsigned int > & remap
tree_node visitors
This struct specifies the gimple_assign node (GCC 4.3 tree node).
Definition: tree_node.hpp:3015
tree_nodeRef type
type field is the actual data type node being inherited in this basetype.(BINFO_TYPE) ...
Definition: tree_node.hpp:1721
tree_nodeRef tmpl_parms
tmpl_parms holds template parameters It is a TREE_LIST, his VALU field is a TREE_VEC whose LIST_OF_OP...
Definition: tree_node.hpp:4130
std::vector< tree_nodeRef > list_of_aliases
list of aliases associated with the memory tag.
Definition: tree_node.hpp:1403
const tree_nodeRef & actual_tree_node
Represent the actual reference to the tree_node.
#define LSEQ_SET_NODE_ID(list_field, type)
This C++ header file contains common macros for the tree structure.
This struct specifies super class for constant nodes.
Definition: tree_node.hpp:1431
tree_nodeRef tmpl_parms
tmpl_parms holds template parameters It is a TREE_LIST, his VALU field is a TREE_VEC whose LIST_OF_OP...
Definition: tree_node.hpp:5481
Directive represinting mapping of a function call on a component.
std::vector< std::pair< TreeVocabularyTokenTypes_TokenEnum, tree_nodeRef > > list_of_access_binf
is the list of pair access binf: baseinfo vector.
Definition: tree_node.hpp:1730
tree_nodeRef tmpl_args
tmpl_args holds template instantiations It is a TREE_VEC whose LIST_OF_OP holds template instantiatio...
Definition: tree_node.hpp:4136
tree_nodeRef max
max: tree-dump.c use the macro TYPE_MAX_VALUE
Definition: tree_node.hpp:2538
Low-level memory addressing.
Definition: tree_node.hpp:4938
This struct specifies the gimple_return node.
Definition: tree_node.hpp:4354
tree_nodeRef body
body field is the saved representation of the body of the entire function.
Definition: tree_node.hpp:2870
tree_nodeRef idx
INDEX register.
Definition: tree_node.hpp:4882
tree_nodeRef expr
Is the expression of the statement.
Definition: tree_node.hpp:4398
std::pair< tree_nodeRef, unsigned int > DefEdge
The type of the def edge.
Definition: tree_node.hpp:3750
tree_nodeRef prms
prms field holds the template parameters vector.
Definition: tree_node.hpp:5012
refcount< application_manager > application_managerRef
refcount definition of the class
tree_nodeRef out
out is the operand 1: ASM_OUTPUTS, this represents the outputs for the statement. ...
Definition: tree_node.hpp:1588
Represents an expression that will be expanded into a list of expressions when instantiated with one ...
Definition: tree_node.hpp:2186
tree_nodeRef slot
slot is the slot which was allocated for this expression
Definition: tree_node.hpp:1928
std::list< std::pair< tree_nodeRef, unsigned int > > list_of_cond
The list of pair condition basic block.
struct definition of the function_decl tree node.
Definition: tree_node.hpp:3179
tree_nodeRef op3
third operand
Definition: tree_node.hpp:6059
tree_nodeRef chan
purp is the TREE_CHAIN field: tree_list nodes are made into lists by chaining through the TREE_CHAIN ...
Definition: tree_node.hpp:5269
tree_nodeRef param_packs
PACK_EXPANSION_PARAMETER_PACKS.
Definition: tree_node.hpp:2152
unsigned offset[NUM_VERTICES+1]
Definition: graph.h:3
tree_nodeRef base
BASE register.
Definition: tree_node.hpp:4879
tree_nodeRef fn
fn is the operand 0 of the call expression: this is the function
Definition: tree_node.hpp:1879
tree_nodeRef retn
retn field is the type of value returned.
Definition: tree_node.hpp:2974
struct definition of the field_decl tree node.
Definition: tree_node.hpp:2640
tree_nodeRef step
STEP integer constant.
Definition: tree_node.hpp:4958
tree_nodeRef op0
the branch var
Definition: tree_node.hpp:4781
struct definition of the complex_type tree node.
Definition: tree_node.hpp:2282
tree_nodeRef predicate
The predicate.
Definition: tree_node.hpp:3027
tree_nodeRef arg
PACK_EXPANSION_EXTRA_ARGS.
Definition: tree_node.hpp:2155
std::vector< tree_nodeRef > list_of_vars
vars is the operand 0 (GIMPLE_BIND_VARS), this is a chain of VAR_DECL nodes for the variables...
Definition: tree_node.hpp:1672
Classes specification of the tree_node data structures.
GIMPLE_SWITCH <INDEX, DEFAULT_LAB, LAB1, ..., LABN> represents the multiway branch: ...
Definition: tree_node.hpp:4773
tree_nodeRef cls
If pointer mem struct type.
Definition: tree_node.hpp:4102
tree_nodeRef op0
The first operand of the ternary expression.
Definition: tree_node.hpp:2353
struct definition of the field attr on function_decl, field_decl, var_decl tree node.
Definition: tree_node.hpp:774
tree node merger classess.
#define THROW_ERROR(str_expr)
helper function used to throw an error in a standard way
Definition: exceptions.hpp:263
tree_nodeRef smt_ann
symbol_memory_tag annotation
Definition: tree_node.hpp:4296
tree_nodeRef offset
OFFSET integer constant.
Definition: tree_node.hpp:4888
tree_nodeRef memdef
whole memory operand def
Definition: tree_node.hpp:1090
struct definition of the pointer_type tree node.
Definition: tree_node.hpp:3896
tree_nodeRef got
got field is the operand 2 (macro CASE_LABEL) of the case label expression
Definition: tree_node.hpp:2028
tree_nodeRef binf
binf field are information about this type, as a base type for itself.
Definition: tree_node.hpp:5567
std::vector< tree_nodeRef > list_of_fncs
list_of_fncs is a chain of methods_decl for the fields of the struct.
Definition: tree_node.hpp:4096
PointToSolutionRef use_set
point to solution
Definition: tree_node.hpp:4604
tree_nodeRef op0
true table constant
Definition: tree_node.hpp:6050
tree_nodeRef tag
result of the tree level alias analysis
Definition: tree_node.hpp:4894
tree_nodeRef orig
original memory access
Definition: tree_node.hpp:4891
tree_nodeRef op0
The parallel part (the tree_node is a omp_parallel_pragma one)
BOOST_PP_SEQ_FOR_EACH(OPERATOR_MACRO, BOOST_PP_EMPTY, VISITED_OBJ_SEQ1)
virtual template object functor
This struct specifies the block node.
Definition: tree_node.hpp:1820
tree_nodeRef op0
The first operand of the binary expression.
Definition: tree_node.hpp:1214
#define CREATE_TREE_NODE_CASE_BODY(tree_node_name, node_id)
tree_nodeRef dcls
declarations
Definition: tree_node.hpp:3539
std::vector< tree_nodeRef > list_of_args
args field holds a chain of parm_decl nodes for the arguments.
Definition: tree_node.hpp:2841
struct definition of common part of WeightedNode (gimple_assign, expr_node)
Definition: tree_node.hpp:738
tree_nodeRef min
min: tree-dump.c use the macro TYPE_MIN_VALUE
Definition: tree_node.hpp:2535
struct definition of the reference_type tree node.
Definition: tree_node.hpp:4220
This struct specifies the cast_expr node.
Definition: tree_node.hpp:2057
tree_nodeRef hdlr
Is the handler of the statement.
Definition: tree_node.hpp:5423
tree_nodeRef tmpl_args
tmpl_args holds template instantiations It is a TREE_VEC whose LIST_OF_OP holds template instantiatio...
Definition: tree_node.hpp:5487
void init(int bucket[BUCKETSIZE])
Definition: sort.c:42
struct definition of the common part of an expression
Definition: tree_node.hpp:973
tree_nodeRef type
type of the expression
Definition: tree_node.hpp:4946
std::vector< tree_nodeRef > list_of_flds
list_of_flds is a chain of field_decl for the fields of the struct, and var_decl, type_decl and const...
Definition: tree_node.hpp:5554
tree_nodeRef cnst
field cnst holds the value of a constant (tree-dump.c use the macro DECL_INITIAL) ...
Definition: tree_node.hpp:2396
#define CHECK_AND_ADD(Tree_Node, visit_index)
void add(int accelnum, int startidx, int endidx)
Definition: add.c:11
tree_nodeRef init
init field holds the value to initialize a variable to.
Definition: tree_node.hpp:5698
This struct specifies the lut_expr node.
Definition: tree_node.hpp:6042
tree_nodeRef directive
this node represents the directive of the pragma
PointToSolutionRef clobbered_set
The clobbered set of this gimple node.
Definition: tree_node.hpp:1128
This struct specifies the complex_cst node.
Definition: tree_node.hpp:2237
tree_nodeRef type
type of the expression
Definition: tree_node.hpp:981
tree_nodeRef csts
csts is a list in which each element&#39;s TREE_PURPOSE is a name and the TREE_VALUE is the value (an int...
Definition: tree_node.hpp:2545
struct definition of the type node structures.
Definition: tree_node.hpp:1318
This struct specifies the tree_list node.
Definition: tree_node.hpp:5255
tree_nodeRef rslt
rslt is null for struct templates and declaration for object to be created for non-struct templates ...
Definition: tree_node.hpp:5003
Class specification of the tree_reindex support class.
tree_nodeRef clnp
it is the cleanup for this node
Definition: tree_node.hpp:4828
This struct represent a statement expression.
Definition: tree_node.hpp:2592
This struct specifies the call_expr node.
Definition: tree_node.hpp:1873
tree_nodeRef op1
initialization
tree_nodeRef scope
this node defines the scope of the pragma
tree_nodeRef body
Is the body of the statement.
Definition: tree_node.hpp:5420
tree_nodeRef min
minimum values this SSA may reach
Definition: tree_node.hpp:4592
tree_nodeRef op0
The first operand of the binary expression.
Definition: tree_node.hpp:4471
tree_nodeRef op0
op0 is the operand 0 (macro CASE_LOW) of the case label expression
Definition: tree_node.hpp:2019
tree_nodeRef step
STEP integer constant.
Definition: tree_node.hpp:4885
This struct specifies reference to particular overloaded struct method The tree walker structure of t...
Definition: tree_node.hpp:4463
struct definition of the common part of a gimple with virtual operands
Definition: tree_node.hpp:1078
This struct represent a &#39;return&#39; statement.
Definition: tree_node.hpp:4387
This struct specifies a multi-way-if construct.
This struct specifies the real_cst node.
Definition: tree_node.hpp:3990
std::vector< tree_nodeRef > list_of_op
list_of_op is the array of tree node stored in tree_vec node.(macro TREE_VEC_ELT) ...
Definition: tree_node.hpp:5310
tree_nodeRef op0
The first operand of the Quaternary expression.
Definition: tree_node.hpp:1284
tree_nodeRef op0
The first operand of the ternary expression.
Definition: tree_node.hpp:1247
char str[25]
Definition: fixedptc.c:8
tree_nodeRef op1
The sections part (the tree_node is a omp_sections_pragma one)
T * get() const
Definition: refcount.hpp:169
PointToSolutionRef use_set
The point-to set used by this gimple node.
Definition: tree_node.hpp:1125
tree_nodeRef vfld
FIXME: check the meaning.
Definition: tree_node.hpp:4124
int level
Definition: main.c:98
tree_nodeRef idx2
INDEX register.
Definition: tree_node.hpp:4961
This struct specifies the case_label_expr node.
Definition: tree_node.hpp:2011
tree_nodeRef type
type field holds the data type of the object, when relevant.
Definition: tree_node.hpp:907
tree_nodeRef op1
The second operand of the binary expression.
Definition: tree_node.hpp:4474
Classes specification of the tree_node data structures not present in the gcc.
tree_nodeRef inst
inst field holds the template instantiation vector.
Definition: tree_node.hpp:5006
Low-level memory addressing.
Definition: tree_node.hpp:4865
tree_nodeRef clob
clob is the operand 3: ASM_CLOBBERS, this represents the clobbers for the statement.
Definition: tree_node.hpp:1594
refcount< tree_node > tree_nodeRef
RefCount type definition of the tree_node class structure.
Definition: tree_node.hpp:212
tree_nodeRef valu
purp is the TREE_VALUE field which stores the elements of the list.
Definition: tree_node.hpp:5266
tree_nodeRef purp
purp is the TREE_PURPOSE field occasionally used as well to get the effect of Lisp association lists...
Definition: tree_node.hpp:5263
std::list< tree_nodeRef > list_of_phi
list_of_phi is a list of eventual phi node presents in the basic block.
This struct specifies the ssa_name node.
Definition: tree_node.hpp:4523
TreeNodeSet vuses
vuses of this statement
Definition: tree_node.hpp:1102
tree_nodeRef next
Is the next statement.
Definition: tree_node.hpp:5426
tree_nodeRef vdef
vdef of this statement
Definition: tree_node.hpp:1093
tree_nodeRef elts
field elts is the type of an array element (tree-dump.c use the macro TREE_TYPE)
Definition: tree_node.hpp:1530
tree_nodeRef ptd
If pointer mem point to type.
Definition: tree_node.hpp:4099
tree_nodeRef op
op field is the operand of this node
Definition: tree_node.hpp:4362
This struct specifies the gimple_goto node.
Definition: tree_node.hpp:3089
tree_nodeRef expr
Is the statement given by the expression.
Definition: tree_node.hpp:2603
This struct specifies the for expression Used to represent a for construct.
struct definition of the integer_type tree node.
Definition: tree_node.hpp:2513
struct definition of the integer_type tree node.
Definition: tree_node.hpp:3279
tree_nodeRef op1
the vec of CASE_LABEL_EXPRs
Definition: tree_node.hpp:4784
#define NO_VISIT
constant used to avoid member visit
Definition: visitor.hpp:69
std::vector< tree_nodeRef > variables
Set of variables that this pointer may point to.
Definition: tree_node.hpp:1019
This struct specifies a hint for branch prediction.
Definition: tree_node.hpp:3846
tree_nodeRef op2
postincrement
tree_nodeRef type
starting from GCC 4.7.2 ssa_name has a type
Definition: tree_node.hpp:4540
tree_nodeRef op
PACK_EXPANSION_PATTERN.
Definition: tree_node.hpp:2149
struct definition of the binary node structures.
Definition: tree_node.hpp:1206
tree_nodeRef smt_ann
symbol_memory_tag annotation
Definition: tree_node.hpp:3707
tree_nodeRef type
type field is the type of the node
Definition: tree_node.hpp:1439
This struct specifies the tree_vec node.
Definition: tree_node.hpp:5299
tree_nodeRef arg
arguments stored in the argument pack
Definition: tree_node.hpp:5147
tree_nodeRef op8
eighth operand
Definition: tree_node.hpp:6074
tree_nodeRef op
op field is the operand of the unary expression
Definition: tree_node.hpp:1185
tree_nodeRef smt_ann
symbol_memory_tag annotation
Definition: tree_node.hpp:5737
tree_nodeRef body
body is the operand 1 (GIMPLE_BIND_BODY), this is the body, the expression to be computed using the v...
Definition: tree_node.hpp:1676
tree_nodeRef op0
The boolean condition.
tree_nodeRef symbol
static or global variable
Definition: tree_node.hpp:4876
tree_nodeRef scpe
scope declaration
Definition: tree_node.hpp:910
tree_nodeRef real
real is the TREE_REALPART which content is other constant node.
Definition: tree_node.hpp:2245
This struct specifies the gimple_asm node.
Definition: tree_node.hpp:1574
tree_nodeRef inline_body
java inline body
Definition: tree_node.hpp:2875
tree_nodeRef op1
The second operand of the ternary expression.
Definition: tree_node.hpp:1250
tree_nodeRef op
the label
Definition: tree_node.hpp:3097
tree_nodeRef max
maximum values this SSA may reach
Definition: tree_node.hpp:4595
tree_nodeRef size
size field holds the size of datum, in bits.
Definition: tree_node.hpp:2660
tree_nodeRef type
Definition: tree_node.hpp:5078
This struct specifies the gimple_call node.
Definition: tree_node.hpp:1959
std::list< tree_nodeRef > list_of_stmt
list_of_stmt is the list of statements stored in the basic block.
tree_nodeRef op5
fifth operand
Definition: tree_node.hpp:6065
tree_nodeRef offset
OFFSET integer constant.
Definition: tree_node.hpp:4952
struct definition of the declaration node structures.
Definition: tree_node.hpp:877
tree_nodeRef op2
The third operand of the Quaternary expression.
Definition: tree_node.hpp:1290
Class specification of the manager of the tree structures extracted from the raw file.
tree_nodeRef chan
Is the chain.
Definition: tree_node.hpp:3632
This struct specifies the while expression Used to represent a while construct.
std::vector< tree_nodeRef > pragmas
list of pragmas associated to the function
Definition: tree_node.hpp:1122
tree_nodeRef fn
fn is the operand 0 of the call expression: this is the function
Definition: tree_node.hpp:1965
Represents a type expression that will be expanded into a list of types when instantiated with one or...
Definition: tree_node.hpp:2141
Memory tags used in tree-ssa to represent memory locations in virtual SSA.
Definition: tree_node.hpp:1393
#define SET_NODE_ID(field, type)
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...
Definition: exceptions.hpp:289

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