43 #ifndef SHORT_CIRCUIT_TAF_HPP 44 #define SHORT_CIRCUIT_TAF_HPP 77 bool check_merging_candidate(
unsigned int& bb1,
unsigned int& bb2,
unsigned int merging_candidate,
bool& bb1_true,
78 bool& bb2_true,
const std::map<unsigned int, blocRef>& list_of_bloc);
84 const std::map<unsigned int, blocRef>& list_of_bloc,
bool or_type,
85 unsigned int merging_candidate);
90 void restructure_CFG(
unsigned int bb1,
unsigned int bb2,
unsigned int merging_candidate,
91 std::map<unsigned int, blocRef>& list_of_bloc);
99 bool check_phis(
unsigned int curr_bb,
const std::map<unsigned int, blocRef>& list_of_bloc);
This struct specifies the field bloc (basic block).
This struct specifies the statement_list node.
RelationshipType
The relationship type.
This class manages the tree structures extracted from the raw file.
This class contains the base representation for a generic frontend flow step which works on a single ...
bool HasToBeExecuted() const override
Check if this step has actually to be executed.
redefinition of map to manage ordered/unordered structures
Abstract pure class for the tree structure.
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.
redefinition of set to manage ordered/unordered structures
bool check_phis(unsigned int curr_bb, const std::map< unsigned int, blocRef > &list_of_bloc)
check if phi could create problem to the short circuit collapsing
const Wrefcount< const DesignFlowManager > design_flow_manager
The design flow manager.
~short_circuit_taf() override
Destructor.
DesignFlowStep_Status
The status of a step.
void restructure_CFG(unsigned int bb1, unsigned int bb2, unsigned int merging_candidate, std::map< unsigned int, blocRef > &list_of_bloc)
restructure the CFG eliminating all BBs not needed after short circuit collapsing ...
Template definition of refcount.
DesignFlowStep_Status InternalExec() override
Restructures the unstructured code.
const unsigned int function_id
The index of the function to be analyzed.
REF_FORWARD_DECL(tree_manager)
bool check_merging_candidate(unsigned int &bb1, unsigned int &bb2, unsigned int merging_candidate, bool &bb1_true, bool &bb2_true, const std::map< unsigned int, blocRef > &list_of_bloc)
Check if a basic block is a merging BB for a short circuit.
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
short_circuit_taf(const ParameterConstRef _Param, const application_managerRef _AppM, unsigned int function_id, const DesignFlowManagerConstRef design_flow_manager)
Constructor.
bool create_gimple_cond(unsigned int bb1, unsigned int bb2, bool bb1_true, const std::map< unsigned int, blocRef > &list_of_bloc, bool or_type, unsigned int merging_candidate)
create the or/and expression required by short circuit collapsing