59 unsigned int _function_id,
const DesignFlowManagerConstRef _design_flow_manager)
71 switch(relationship_type)
75 relationships.insert(std::make_pair(REBUILD_INITIALIZATION2,
SAME_FUNCTION));
80 relationships.insert(std::make_pair(REMOVE_CLOBBER_GA,
SAME_FUNCTION));
81 relationships.insert(std::make_pair(HWCALL_INJECTION,
SAME_FUNCTION));
82 relationships.insert(std::make_pair(SWITCH_FIX,
SAME_FUNCTION));
83 relationships.insert(std::make_pair(REBUILD_INITIALIZATION,
SAME_FUNCTION));
84 relationships.insert(std::make_pair(IR_LOWERING,
SAME_FUNCTION));
101 const auto TM =
AppM->get_tree_manager();
102 const auto fd = GetPointerS<const function_decl>(TM->CGetTreeNode(
function_id));
103 const auto sl = GetPointerS<const statement_list>(
GET_CONST_NODE(fd->body));
106 for(
const auto& bbi_bb : sl->list_of_bloc)
108 const auto& bb = bbi_bb.second;
109 for(
const auto& statement_node : bb->CGetStmtList())
112 for(
const auto& ssa_use : ssa_uses)
114 const auto sn = GetPointerS<ssa_name>(
GET_NODE(ssa_use.first));
115 for(
auto uses = ssa_use.second; uses; --uses)
117 sn->AddUseStmt(statement_node);
121 for(
const auto& phi_node : bb->CGetPhiList())
124 for(
const auto& ssa_use : ssa_uses)
126 const auto sn = GetPointerS<ssa_name>(
GET_NODE(ssa_use.first));
127 for(
auto uses = ssa_use.second; uses; --uses)
129 sn->AddUseStmt(phi_node);
132 GetPointerS<gimple_phi>(
GET_NODE(phi_node))->SetSSAUsesComputed();
134 bb->SetSSAUsesComputed();
#define GET_NODE(t)
Macro used to hide implementation details when accessing a tree_node from another tree_node...
static int debug_level
debug level (set by Parameter)
File containing functions and utilities to support the printing of debug messagges.
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 GET_CLASS(obj)
Macro returning the actual type of an object.
Definition of the class representing a generic C application.
DesignFlowStep_Status InternalExec() override
Counts how many time a ssa_name is read.
RelationshipType
The relationship type.
Source must be executed to satisfy target.
Data structure describing a basic block at tree level.
Auxiliary methods for manipulating string.
#define THROW_UNREACHABLE(str_expr)
helper function used to specify that some points should never be reached
Analysis step counting how many time a ssa_name is used.
Classes to describe design flow graph.
Target must be reexecuted.
#define GET_CONST_NODE(t)
Classes specification of the tree_node data structures.
const ParameterConstRef parameters
Set of input parameters.
DesignFlowStep_Status
The status of a step.
#define DEBUG_LEVEL_NONE
no debugging print is performed.
This file collects some utility functions.
const unsigned int function_id
The index of the function to be analyzed.
~use_counting() override
Destructor.
const application_managerRef AppM
The application manager.
Class specification of the tree_reindex support class.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Classes specification of the tree_node data structures not present in the gcc.
this class is used to manage the command-line or XML options.
int debug_level
The debug level.
static void ComputeSsaUses(const tree_nodeRef &, TreeNodeMap< size_t > &uses)
recursively compute the references to the ssa_name variables used in a statement
Class specification of the manager of the tree structures extracted from the raw file.
use_counting(const ParameterConstRef _parameters, const application_managerRef AppM, unsigned int function_id, const DesignFlowManagerConstRef design_flow_manager)
Constructor.