PandA-2024.02
scalar_ssa_data_dependence_computation.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  */
47 
49 #include "Parameter.hpp"
50 
52 #include "dbgPrintHelper.hpp" // for DEBUG_LEVEL_
53 #include "function_behavior.hpp"
54 #include "hash_helper.hpp"
55 #include "op_graph.hpp"
57 #include "string_manipulation.hpp" // for GET_CLASS
58 
60  const ParameterConstRef _parameters, const application_managerRef _AppM, unsigned int _function_id,
61  const DesignFlowManagerConstRef _design_flow_manager)
62  : DataDependenceComputation(_AppM, _function_id, SCALAR_SSA_DATA_FLOW_ANALYSIS, _design_flow_manager, _parameters)
63 {
64  debug_level = parameters->get_class_debug_level(GET_CLASS(*this), DEBUG_LEVEL_NONE);
65 }
66 
68 
71  const DesignFlowStep::RelationshipType relationship_type) const
72 {
74  switch(relationship_type)
75  {
77  {
78  relationships.insert(std::make_pair(OP_REACHABILITY_COMPUTATION, SAME_FUNCTION));
79  relationships.insert(std::make_pair(VAR_ANALYSIS, SAME_FUNCTION));
80  relationships.insert(std::make_pair(OP_ORDER_COMPUTATION, SAME_FUNCTION));
81  break;
82  }
85  {
86  break;
87  }
88  default:
89  {
91  }
92  }
93  return relationships;
94 }
95 
97 {
98  if(bb_version != 0 and bb_version != function_behavior->GetBBVersion())
99  {
100  const OpGraphConstRef fsaodg = function_behavior->CGetOpGraph(FunctionBehavior::FSAODG);
101  if(boost::num_vertices(*fsaodg) != 0)
102  {
103  EdgeIterator edge, edge_end;
104  for(boost::tie(edge, edge_end) = boost::edges(*fsaodg); edge != edge_end; edge++)
105  {
109  }
110  }
111  }
112 }
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
File containing functions and utilities to support the printing of debug messagges.
#define FB_DFG_SCA_SELECTOR
Data flow graph edge selector between computed on scalars.
Definition: op_graph.hpp:453
#define GET_CLASS(obj)
Macro returning the actual type of an object.
ScalarSsaDataDependenceComputation(const ParameterConstRef _Param, const application_managerRef _AppM, unsigned int function_id, const DesignFlowManagerConstRef design_flow_manager)
Constructor.
RelationshipType
The relationship type.
Source must be executed to satisfy target.
#define FB_ADG_SCA_SELECTOR
Feedback Anti-dependence graph edge selector computed on scalar.
Definition: op_graph.hpp:468
unsigned int bb_version
The version of the basic block intermediate representation on which this step has been applied...
~ScalarSsaDataDependenceComputation() override
Destructor.
Auxiliary methods for manipulating string.
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.
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
unsigned edges[4545]
Definition: graph.h:25
System dependence + anti-dependence graph + output dependence graph with feedback.
const ParameterConstRef parameters
Set of input parameters.
#define DEBUG_LEVEL_NONE
no debugging print is performed.
#define DFG_SCA_SELECTOR
Selectors used only in operation graphs; numbers continue from cdfg_edge_info.hpp.
Definition: op_graph.hpp:447
#define ODG_SCA_SELECTOR
Output-dependence graph edge selector computed on scalars.
Definition: op_graph.hpp:477
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.
Analysis step performing data flow analysis based on ssa variables.
int debug_level
The debug level.
This class provides methods to build an operations graph.
#define ADG_SCA_SELECTOR
Anti-dependence graph edge selector computed on scalar.
Definition: op_graph.hpp:462
#define FB_ODG_SCA_SELECTOR
Feedback Output-dependence graph edge selector computed on scalars.
Definition: op_graph.hpp:483
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