PandA-2024.02
function_frontend_flow_step.hpp
Go to the documentation of this file.
1 /*
2  *
3  * _/_/_/ _/_/ _/ _/ _/_/_/ _/_/
4  * _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/
5  * _/_/_/ _/_/_/_/ _/ _/_/ _/ _/ _/_/_/_/
6  * _/ _/ _/ _/ _/ _/ _/ _/ _/
7  * _/ _/ _/ _/ _/ _/_/_/ _/ _/
8  *
9  * ***********************************************
10  * PandA Project
11  * URL: http://panda.dei.polimi.it
12  * Politecnico di Milano - DEIB
13  * System Architectures Group
14  * ***********************************************
15  * Copyright (C) 2004-2024 Politecnico di Milano
16  *
17  * This file is part of the PandA framework.
18  *
19  * The PandA framework is free software; you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation; either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program. If not, see <http://www.gnu.org/licenses/>.
31  *
32  */
45 #ifndef FUNCTION_FRONTEND_FLOW_STEP_HPP
46 #define FUNCTION_FRONTEND_FLOW_STEP_HPP
47 
48 #include "design_flow_step.hpp" // for DesignFlowStep_S...
49 #include "frontend_flow_step.hpp" // for FrontendFlowStep...
50 #include "refcount.hpp" // for REF_FORWARD_DECL
51 #include <string> // for string
52 
53 REF_FORWARD_DECL(ArchManager);
56 
61 {
62  UNMOVABLE,
63  TIMING,
64  MOVABLE
65 };
66 
68 {
69  protected:
74  virtual DesignFlowStep_Status InternalExec() = 0;
75 
78 
80  const unsigned int function_id;
81 
83  unsigned int bb_version;
84 
86  unsigned int bitvalue_version;
87 
92  void WriteBBGraphDot(const std::string& filename) const;
93 
94  private:
98  bool HasToBeExecuted0() const;
99 
100  public:
105  FunctionFrontendFlowStep(const application_managerRef AppM, const unsigned int function_id,
106  const FrontendFlowStepType frontend_flow_step_type,
107  const DesignFlowManagerConstRef design_flow_manager, const ParameterConstRef parameters);
108 
112  ~FunctionFrontendFlowStep() override;
113 
119  void ComputeRelationships(DesignFlowStepSet& relationship,
120  const DesignFlowStep::RelationshipType relationship_type) override;
121 
125  std::string GetSignature() const override;
126 
131  std::string GetName() const override;
132 
137  DesignFlowStep_Status Exec() final;
138 
145  static const std::string ComputeSignature(const FrontendFlowStepType frontend_flow_step_type,
146  const unsigned int function_id);
147 
152  bool HasToBeExecuted() const override;
153 
157  unsigned int CGetBBVersion() const;
158 
162  unsigned int GetBitValueVersion() const;
163 
167  void PrintInitialIR() const override;
168 
172  void PrintFinalIR() const override;
173 };
174 #endif
std::string filename
RelationshipType
The relationship type.
REF_FORWARD_DECL(ArchManager)
Definition of hash function for EdgeDescriptor.
Definition: graph.hpp:1321
unsigned int bb_version
The version of the basic block intermediate representation on which this step has been applied...
Base class for step of design flow.
This class contains the base representation for a generic frontend flow step.
DesignFlowStep_Status
The status of a step.
enum FrontendFlowStepType { CREATE_TREE_MANAGER, FIND_MAX_TRANSFORMATIONS, FUNCTION_ANALYSIS, SYMBOLIC_APPLICATION_FRONTEND_FLOW_STEP, ADD_BB_ECFG_EDGES, ADD_ARTIFICIAL_CALL_FLOW_EDGES, ADD_OP_EXIT_FLOW_EDGES, ADD_OP_LOOP_FLOW_EDGES, ADD_OP_PHI_FLOW_EDGES, BAMBU_FRONTEND_FLOW, BASIC_BLOCKS_CFG_COMPUTATION, BB_CONTROL_DEPENDENCE_COMPUTATION, BB_FEEDBACK_EDGES_IDENTIFICATION, BB_ORDER_COMPUTATION, BB_REACHABILITY_COMPUTATION, BIT_VALUE, BIT_VALUE_OPT, BITVALUE_RANGE, BIT_VALUE_IPA, BLOCK_FIX, BUILD_VIRTUAL_PHI, CALL_EXPR_FIX, CALL_GRAPH_BUILTIN_CALL, CHECK_SYSTEM_TYPE, COMPLETE_BB_GRAPH, COMPLETE_CALL_GRAPH, COMPUTE_IMPLICIT_CALLS, COMMUTATIVE_EXPR_RESTRUCTURING, COND_EXPR_RESTRUCTURING, CSE_STEP, DATAFLOW_CG_EXT, DEAD_CODE_ELIMINATION, DEAD_CODE_ELIMINATION_IPA, DETERMINE_MEMORY_ACCESSES, DOM_POST_DOM_COMPUTATION, EXTRACT_GIMPLE_COND_OP, EXTRACT_PATTERNS, FIX_STRUCTS_PASSED_BY_VALUE, FUNCTION_CALL_TYPE_CLEANUP, FUNCTION_CALL_OPT, FANOUT_OPT, FIX_VDEF, HDL_FUNCTION_DECL_FIX, HDL_VAR_DECL_FIX, HLS_DIV_CG_EXT, HWCALL_INJECTION, INTERFACE_INFER, IR_LOWERING, LOOP_COMPUTATION, LOOPS_ANALYSIS_BAMBU, LOOPS_COMPUTATION, LUT_TRANSFORMATION, MULTI_WAY_IF, MULTIPLE_ENTRY_IF_REDUCTION, NI_SSA_LIVENESS, OP_CONTROL_DEPENDENCE_COMPUTATION, OP_FEEDBACK_EDGES_IDENTIFICATION, OP_ORDER_COMPUTATION, OP_REACHABILITY_COMPUTATION, OPERATIONS_CFG_COMPUTATION, PARM2SSA, PARM_DECL_TAKEN_ADDRESS, PHI_OPT, PREDICATE_STATEMENTS, ESSA, RANGE_ANALYSIS, REBUILD_INITIALIZATION, REBUILD_INITIALIZATION2, REMOVE_CLOBBER_GA, REMOVE_ENDING_IF, SCALAR_SSA_DATA_FLOW_ANALYSIS, SERIALIZE_MUTUAL_EXCLUSIONS, SPLIT_RETURN, SHORT_CIRCUIT_TAF, SIMPLE_CODE_MOTION, SOFT_FLOAT_CG_EXT, STRING_CST_FIX, SWITCH_FIX, UN_COMPARISON_LOWERING, UNROLLING_DEGREE, USE_COUNTING, VAR_ANALYSIS, VAR_DECL_FIX, VECTORIZE, VERIFICATION_OPERATION, VIRTUAL_AGGREGATE_DATA_FLOW_ANALYSIS, VIRTUAL_PHI_NODES_SPLIT } FrontendFlowStepType
Template definition of refcount.
FunctionFrontendFlowStep_Movable
Enum class used to specify if a statement can be moved.
const unsigned int function_id
The index of the function to be analyzed.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Definition: refcount.hpp:94
unsigned int bitvalue_version
The version of the bitvalue information on which this step has been applied.
CONSTREF_FORWARD_DECL(DesignFlowManager)
Operation cannot be moved because of timing.
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