PandA-2024.02
virtual_aggregate_data_flow_analysis.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  */
45 
47 #include "Parameter.hpp"
48 
50 #include "function_behavior.hpp"
51 #include "op_graph.hpp"
53 
55 #include "behavioral_helper.hpp"
56 #include "hash_helper.hpp"
57 #include "string_manipulation.hpp" // for GET_CLASS
58 
60  const DesignFlowManagerConstRef _design_flow_manager,
61  const unsigned int _function_index,
62  const ParameterConstRef _parameters)
63  : DataDependenceComputation(_AppM, _function_index, VIRTUAL_AGGREGATE_DATA_FLOW_ANALYSIS, _design_flow_manager,
64  _parameters)
65 {
66  debug_level = parameters->get_class_debug_level(GET_CLASS(*this));
67 }
68 
70 
73  const DesignFlowStep::RelationshipType relationship_type) const
74 {
76  switch(relationship_type)
77  {
79  {
80  relationships.insert(std::make_pair(BUILD_VIRTUAL_PHI, SAME_FUNCTION));
81  relationships.insert(std::make_pair(OP_REACHABILITY_COMPUTATION, SAME_FUNCTION));
82  relationships.insert(std::make_pair(VAR_ANALYSIS, SAME_FUNCTION));
83  break;
84  }
87  {
88  break;
89  }
90  default:
91  {
93  }
94  }
95  return relationships;
96 }
97 
99 {
100  if(bb_version != 0 && bb_version != function_behavior->GetBBVersion())
101  {
102  const auto fsaodg = function_behavior->CGetOpGraph(FunctionBehavior::FSAODG);
103  if(boost::num_vertices(*fsaodg) != 0)
104  {
105  EdgeIterator edge, edge_end;
106  for(boost::tie(edge, edge_end) = boost::edges(*fsaodg); edge != edge_end; edge++)
107  {
111  }
112  }
113  }
114 }
VirtualAggregateDataFlowAnalysis(const application_managerRef AppM, const DesignFlowManagerConstRef design_flow_manager, const unsigned int _function_index, const ParameterConstRef parameters)
Constructor.
#define GET_CLASS(obj)
Macro returning the actual type of an object.
Analysis step performing aggregate variable computation on the basis of gcc virtual operands...
RelationshipType
The relationship type.
Source must be executed to satisfy target.
unsigned int bb_version
The version of the basic block intermediate representation on which this step has been applied...
Auxiliary methods for manipulating string.
boost::graph_traits< graph >::edge_iterator EdgeIterator
edge_iterator definition.
Definition: graph.hpp:1314
#define THROW_UNREACHABLE(str_expr)
helper function used to specify that some points should never be reached
Definition: exceptions.hpp:292
#define FB_DFG_AGG_SELECTOR
Data flow graph edge selector between computed on aggregates.
Definition: op_graph.hpp:455
unsigned edges[4545]
Definition: graph.h:25
System dependence + anti-dependence graph + output dependence graph with feedback.
#define FB_ODG_AGG_SELECTOR
Feedback Output-dependence graph edge selector computed on aggregates.
Definition: op_graph.hpp:485
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
const ParameterConstRef parameters
Set of input parameters.
~VirtualAggregateDataFlowAnalysis() override
Destructor.
#define FB_ADG_AGG_SELECTOR
Feedback Anti-dependence graph edge selector computed on aggregates.
Definition: op_graph.hpp:470
This file collects some hash functors.
Data structures used in operations graph.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Definition: refcount.hpp:94
this class is used to manage the command-line or XML options.
#define ODG_AGG_SELECTOR
Output-dependence graph edge selector computed on aggregates.
Definition: op_graph.hpp:479
const CustomUnorderedSet< std::pair< FrontendFlowStepType, FunctionRelationship > > ComputeFrontendRelationships(const DesignFlowStep::RelationshipType relationship_type) const override
Return the set of analyses in relationship with this design step.
#define DFG_AGG_SELECTOR
Data flow graph edge selector between computed on aggregates.
Definition: op_graph.hpp:449
int debug_level
The debug level.
This class provides methods to build an operations graph.
#define ADG_AGG_SELECTOR
Anti-dependence graph edge selector computed on aggregates.
Definition: op_graph.hpp:464
A brief description of the C++ Header File.
const FunctionBehaviorRef function_behavior
The function behavior of the function to be analyzed.

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