PandA-2024.02
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
FrontendFlowStep Class Referenceabstract

#include <frontend_flow_step.hpp>

Inheritance diagram for FrontendFlowStep:
Inheritance graph
[legend]
Collaboration diagram for FrontendFlowStep:
Collaboration graph
[legend]

Public Types

using FunctionRelationship = enum { ALL_FUNCTIONS, CALLED_FUNCTIONS, CALLING_FUNCTIONS, SAME_FUNCTION, WHOLE_APPLICATION }
 The different relationship type between function analysis. More...
 
- Public Types inherited from DesignFlowStep
enum  RelationshipType { DEPENDENCE_RELATIONSHIP, INVALIDATION_RELATIONSHIP, PRECEDENCE_RELATIONSHIP }
 The relationship type. More...
 

Public Member Functions

 FrontendFlowStep (const application_managerRef AppM, const FrontendFlowStepType frontend_flow_step_type, const DesignFlowManagerConstRef design_flow_manager, const ParameterConstRef parameters)
 Constructor. More...
 
 ~FrontendFlowStep () override
 Destructor. More...
 
void ComputeRelationships (DesignFlowStepSet &relationship, const DesignFlowStep::RelationshipType relationship_type) override
 Compute the relationships of a step with other steps. More...
 
virtual std::string GetKindText () const
 Return the name of the type of this frontend flow step. More...
 
DesignFlowStepFactoryConstRef CGetDesignFlowStepFactory () const override
 Return the factory to create this type of steps. More...
 
void PrintTreeManager (const bool before) const
 Dump the tree manager. More...
 
void PrintInitialIR () const override
 Dump the initial intermediate representation. More...
 
void PrintFinalIR () const override
 Dump the final intermediate representation. More...
 
- Public Member Functions inherited from DesignFlowStep
 DesignFlowStep (const DesignFlowManagerConstRef design_flow_manager, const ParameterConstRef parameters)
 Constructor. More...
 
virtual ~DesignFlowStep ()
 Destructor. More...
 
virtual DesignFlowStep_Status Exec ()=0
 Execute the step. More...
 
virtual bool HasToBeExecuted () const =0
 Check if this step has actually to be executed. More...
 
virtual void Initialize ()
 Initialize the step (i.e., like a constructor, but executed just before exec. More...
 
virtual std::string GetSignature () const =0
 Return a unified identifier of this design step. More...
 
virtual std::string GetName () const =0
 Return the name of this design step. More...
 
DesignFlowStep_Status GetStatus () const
 Return the status of this design step. More...
 
virtual void WriteDot (std::ostream &out) const
 Write the label for a dot graph. More...
 
bool IsComposed () const
 Returns if this step is composed. More...
 
int CGetDebugLevel () const
 Return the debug level of the step. More...
 

Static Public Member Functions

static void CreateSteps (const DesignFlowManagerConstRef design_flow_manager, const CustomUnorderedSet< std::pair< FrontendFlowStepType, FunctionRelationship >> &frontend_relationships, const application_managerConstRef application_manager, DesignFlowStepSet &relationships)
 Create the relationship steps of a step with other steps starting from already specified dependencies between frontend flow steps. More...
 
static const std::string EnumToKindText (const FrontendFlowStepType frontend_flow_step_type)
 Given a frontend flow step type, return the name of the type. More...
 

Protected Member Functions

virtual const CustomUnorderedSet< std::pair< FrontendFlowStepType, FunctionRelationship > > ComputeFrontendRelationships (const DesignFlowStep::RelationshipType relationship_type) const =0
 Return the set of analyses in relationship with this design step. More...
 

Protected Attributes

const application_managerRef AppM
 The application manager. More...
 
const FrontendFlowStepType frontend_flow_step_type
 The type of this step. More...
 
unsigned int print_counter
 Print counter. More...
 
- Protected Attributes inherited from DesignFlowStep
bool composed
 True if this step represents a composition of design flow steps (e.g., a flow); must be set by specialized constructors. More...
 
const Wrefcount< const DesignFlowManagerdesign_flow_manager
 The design flow manager. More...
 
const ParameterConstRef parameters
 Set of input parameters. More...
 
int debug_level
 The debug level. More...
 
const int output_level
 The output level. More...
 

Detailed Description

Definition at line 204 of file frontend_flow_step.hpp.

Member Typedef Documentation

◆ FunctionRelationship

The different relationship type between function analysis.

Definition at line 214 of file frontend_flow_step.hpp.

Constructor & Destructor Documentation

◆ FrontendFlowStep()

FrontendFlowStep::FrontendFlowStep ( const application_managerRef  AppM,
const FrontendFlowStepType  frontend_flow_step_type,
const DesignFlowManagerConstRef  design_flow_manager,
const ParameterConstRef  parameters 
)

Constructor.

Parameters
AppMis the application manager
design_flow_manageris the design flow manager
frontend_flow_step_typeis the type of the analysis
_Paramis the set of the parameters

Definition at line 63 of file frontend_flow_step.cpp.

References DesignFlowStep::debug_level, GET_CLASS, and ~FrontendFlowStep().

Here is the call graph for this function:

◆ ~FrontendFlowStep()

FrontendFlowStep::~FrontendFlowStep ( )
overridedefault

Destructor.

Referenced by FrontendFlowStep().

Here is the caller graph for this function:

Member Function Documentation

◆ CGetDesignFlowStepFactory()

DesignFlowStepFactoryConstRef FrontendFlowStep::CGetDesignFlowStepFactory ( ) const
overridevirtual

Return the factory to create this type of steps.

Returns
the factory to create frontend flow step

Implements DesignFlowStep.

Definition at line 375 of file frontend_flow_step.cpp.

References DesignFlowStep::design_flow_manager, and Wrefcount< T >::lock().

Referenced by FunctionFrontendFlowStep::ComputeRelationships().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeFrontendRelationships()

virtual const CustomUnorderedSet<std::pair<FrontendFlowStepType, FunctionRelationship> > FrontendFlowStep::ComputeFrontendRelationships ( const DesignFlowStep::RelationshipType  relationship_type) const
protectedpure virtual

Return the set of analyses in relationship with this design step.

Parameters
relationship_typeis the type of relationship to be considered

Implemented in Bit_Value, soft_float_cg_ext, PhiOpt, Vectorize, operations_cfg_computation, CheckSystemType, IR_lowering, lut_transformation, multi_way_if, MultipleEntryIfReduction, rebuild_initialization2, short_circuit_taf, CSE, VarComputation, CreateAddressTranslation, virtual_phi_nodes_split, RemoveEndingIf, PragmaAnalysis, commutative_expr_restructuring, dead_code_elimination, CondExprRestructuring, VarDeclFix, RangeAnalysis, simple_code_motion, string_cst_fix, determine_memory_accesses, hls_div_cg_ext, HostProfiling, FunctionCallOpt, parm2ssa, SplitReturn, BlockFix, NI_SSA_liveness, CallGraphBuiltinCall, compute_implicit_calls, BitValueIPA, InterfaceInfer, rebuild_initialization, create_tree_manager, dom_post_dom_computation, Bit_Value_opt, dead_code_eliminationIPA, fanout_opt, AddOpLoopFlowEdges, AddBbEcfgEdges, AddOpExitFlowEdges, bb_feedback_edges_computation, loops_computation, op_feedback_edges_computation, ScalarSsaDataDependenceComputation, call_expr_fix, FunctionCallTypeCleanup, BuildVirtualPhi, eSSA, extract_patterns, LoopsAnalysisBambu, SymbolicApplicationFrontendFlowStep, call_graph_computation, UpdateSchedule, FindMaxTransformations, remove_clobber_ga, ExtractGimpleCondOp, AddOpPhiFlowEdges, BitValueRange, FixVdef, SwitchFix, PragmaSubstitution, AddArtificialCallFlowEdges, BBReachabilityComputation, OpReachabilityComputation, BasicBlocksCfgComputation, use_counting, ExtractOmpFor, FixStructsPassedByValue, parm_decl_taken_address_fix, SDCCodeMotion, BBOrderComputation, OpOrderComputation, CompleteBBGraph, CompleteCallGraph, BBCdgComputation, OpCdgComputation, ExtractOmpAtomic, HDLFunctionDeclFix, UnComparisonLowering, BambuFrontendFlow, VirtualAggregateDataFlowAnalysis, BasicBlocksProfiling, PredicateStatements, SerializeMutualExclusions, dataflow_cg_ext, and HWCallInjection.

Referenced by FunctionFrontendFlowStep::ComputeRelationships(), and ComputeRelationships().

Here is the caller graph for this function:

◆ ComputeRelationships()

void FrontendFlowStep::ComputeRelationships ( DesignFlowStepSet relationship,
const DesignFlowStep::RelationshipType  relationship_type 
)
overridevirtual

Compute the relationships of a step with other steps.

Parameters
dependenciesis where relationships will be stored
relationship_typeis the type of relationship to be computed

Implements DesignFlowStep.

Reimplemented in IR_lowering, lut_transformation, FunctionFrontendFlowStep, FixVdef, BuildVirtualPhi, RangeAnalysis, create_tree_manager, BitValueIPA, InterfaceInfer, and dead_code_eliminationIPA.

Definition at line 145 of file frontend_flow_step.cpp.

References AppM, ComputeFrontendRelationships(), CreateSteps(), DesignFlowStep::design_flow_manager, and Wrefcount< T >::lock().

Referenced by BasicBlocksProfiling::ComputeRelationships(), dead_code_eliminationIPA::ComputeRelationships(), InterfaceInfer::ComputeRelationships(), BitValueIPA::ComputeRelationships(), create_tree_manager::ComputeRelationships(), and FunctionFrontendFlowStep::ComputeRelationships().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateSteps()

void FrontendFlowStep::CreateSteps ( const DesignFlowManagerConstRef  design_flow_manager,
const CustomUnorderedSet< std::pair< FrontendFlowStepType, FunctionRelationship >> &  frontend_relationships,
const application_managerConstRef  application_manager,
DesignFlowStepSet relationships 
)
static

Create the relationship steps of a step with other steps starting from already specified dependencies between frontend flow steps.

Parameters
design_flow_manageris the design flow manager
frontend_relationshipsdescribes the set of relationships to be created
application_manageris the application manager
relationshipsis the output of the function

This is managed by FunctionFrontendFlowStep::ComputeRelationships

Definition at line 77 of file frontend_flow_step.cpp.

References ALL_FUNCTIONS, CALLED_FUNCTIONS, ApplicationFrontendFlowStep::ComputeSignature(), FunctionFrontendFlowStep::ComputeSignature(), SAME_FUNCTION, THROW_UNREACHABLE, and WHOLE_APPLICATION.

Referenced by CBackend::ComputeRelationships(), and ComputeRelationships().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnumToKindText()

const std::string FrontendFlowStep::EnumToKindText ( const FrontendFlowStepType  frontend_flow_step_type)
static

Given a frontend flow step type, return the name of the type.

Parameters
typeis the type to be considered
Returns
the name of the type

Definition at line 158 of file frontend_flow_step.cpp.

References THROW_UNREACHABLE.

Referenced by FrontendFlowStepFactory::CreateApplicationFrontendFlowStep(), FrontendFlowStepFactory::CreateFunctionFrontendFlowStep(), SymbolicApplicationFrontendFlowStep::GetKindText(), and GetKindText().

Here is the caller graph for this function:

◆ GetKindText()

std::string FrontendFlowStep::GetKindText ( ) const
virtual

Return the name of the type of this frontend flow step.

Reimplemented in SymbolicApplicationFrontendFlowStep.

Definition at line 153 of file frontend_flow_step.cpp.

References EnumToKindText(), and frontend_flow_step_type.

Referenced by ApplicationFrontendFlowStep::GetName(), and FunctionFrontendFlowStep::GetName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintFinalIR()

void FrontendFlowStep::PrintFinalIR ( ) const
overridevirtual

Dump the final intermediate representation.

Reimplemented from DesignFlowStep.

Reimplemented in FunctionFrontendFlowStep.

Definition at line 405 of file frontend_flow_step.cpp.

References DesignFlowStep::parameters, and PrintTreeManager().

Referenced by FunctionFrontendFlowStep::PrintFinalIR().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintInitialIR()

void FrontendFlowStep::PrintInitialIR ( ) const
overridevirtual

Dump the initial intermediate representation.

Reimplemented from DesignFlowStep.

Reimplemented in FunctionFrontendFlowStep.

Definition at line 397 of file frontend_flow_step.cpp.

References DesignFlowStep::parameters, and PrintTreeManager().

Referenced by FunctionFrontendFlowStep::PrintInitialIR().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintTreeManager()

void FrontendFlowStep::PrintTreeManager ( const bool  before) const

Dump the tree manager.

Parameters
beforespecifies if printing is performed before execution of this step"

Definition at line 380 of file frontend_flow_step.cpp.

References AppM, DesignFlowStep::GetName(), DesignFlowStep::parameters, tree_manager::print(), print_counter, tree_manager::PrintGimple(), and STR.

Referenced by ExtractOmpAtomic::InternalExec(), ExtractOmpFor::InternalExec(), SwitchFix::InternalExec(), PrintFinalIR(), PrintInitialIR(), and Vectorize::Transform().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ AppM

const application_managerRef FrontendFlowStep::AppM
protected

The application manager.

Definition at line 218 of file frontend_flow_step.hpp.

Referenced by dead_code_elimination::add_gimple_nop(), bloc::add_succ(), Vectorize::AddGuards(), determine_memory_accesses::analyze_node(), PhiOpt::ApplyIfMerge(), PhiOpt::ApplyIfRemove(), PhiOpt::ApplyMultiMerge(), PhiOpt::ApplyMultiRemove(), IR_lowering::array_ref_lowering(), Bit_Value::backward(), Bit_Value::backward_chain(), Bit_Value::backward_transfer(), HWCallInjection::buildBuiltinCall(), CallGraphBuiltinCall::buildTypeToDeclaration(), PhiOpt::ChainOptimization(), InterfaceInfer::ChasePointerInterfaceRecurse(), simple_code_motion::CheckMovable(), DataDependenceComputation::Computedependencies(), ExtractOmpAtomic::ComputeFrontendRelationships(), ExtractOmpFor::ComputeFrontendRelationships(), LoopsAnalysisBambu::ComputeFrontendRelationships(), CondExprRestructuring::ComputeFrontendRelationships(), commutative_expr_restructuring::ComputeFrontendRelationships(), short_circuit_taf::ComputeFrontendRelationships(), multi_way_if::ComputeFrontendRelationships(), create_tree_manager::ComputeRelationships(), BuildVirtualPhi::ComputeRelationships(), FunctionFrontendFlowStep::ComputeRelationships(), ComputeRelationships(), operations_cfg_computation::connect_start_nodes(), short_circuit_taf::create_gimple_cond(), PragmaAnalysis::create_map_pragma(), PragmaAnalysis::create_omp_pragma(), InterfaceInfer::create_resource_array(), InterfaceInfer::create_resource_m_axi(), InterfaceInfer::create_resource_Read_simple(), InterfaceInfer::create_resource_Write_simple(), create_tree_manager::createCostTable(), FunctionCallOpt::detect_loops(), IR_lowering::division_by_a_constant(), Vectorize::DuplicateIncrement(), BasicBlocksProfiling::Exec(), BambuFrontendFlow::Exec(), HDLFunctionDeclFix::Exec(), PragmaSubstitution::Exec(), call_graph_computation::Exec(), BitValueIPA::Exec(), dead_code_eliminationIPA::Exec(), string_cst_fix::Exec(), PragmaAnalysis::Exec(), create_tree_manager::Exec(), CreateAddressTranslation::Exec(), InterfaceInfer::Exec(), IR_lowering::expand_MC(), IR_lowering::expand_mult_const(), IR_lowering::expand_mult_highpart(), IR_lowering::expand_sdiv_pow2(), IR_lowering::expand_smod_pow2(), IR_lowering::expand_target_mem_ref(), CallGraphBuiltinCall::ExtendCallGraph(), Vectorize::FixPhis(), Bit_Value::forward(), Bit_Value::forward_transfer(), InterfaceInfer::forwardInterface(), soft_float_cg_ext::generate_interface(), PragmaAnalysis::get_call_parameter(), create_tree_manager::getCostTable(), SDCCodeMotion::HasToBeExecuted(), BitValueIPA::HasToBeExecuted(), UpdateSchedule::HasToBeExecuted(), SplitReturn::HasToBeExecuted(), CondExprRestructuring::HasToBeExecuted(), commutative_expr_restructuring::HasToBeExecuted(), RemoveEndingIf::HasToBeExecuted(), dead_code_elimination::HasToBeExecuted(), short_circuit_taf::HasToBeExecuted(), FunctionCallOpt::HasToBeExecuted(), multi_way_if::HasToBeExecuted(), FunctionFrontendFlowStep::HasToBeExecuted0(), BasicBlocksProfiling::Initialize(), UpdateSchedule::Initialize(), fanout_opt::Initialize(), CreateAddressTranslation::Initialize(), NI_SSA_liveness::Initialize(), CondExprRestructuring::Initialize(), commutative_expr_restructuring::Initialize(), RemoveEndingIf::Initialize(), simple_code_motion::Initialize(), FunctionCallOpt::Initialize(), CSE::Initialize(), multi_way_if::Initialize(), MultipleEntryIfReduction::Initialize(), lut_transformation::Initialize(), Bit_Value::initialize(), IR_lowering::Initialize(), PhiOpt::Initialize(), Bit_Value::Initialize(), parm_decl_taken_address_fix::InternalExec(), FixStructsPassedByValue::InternalExec(), dataflow_cg_ext::InternalExec(), HWCallInjection::InternalExec(), PredicateStatements::InternalExec(), SerializeMutualExclusions::InternalExec(), ExtractOmpAtomic::InternalExec(), UnComparisonLowering::InternalExec(), ExtractOmpFor::InternalExec(), SDCCodeMotion::InternalExec(), use_counting::InternalExec(), BasicBlocksCfgComputation::InternalExec(), SwitchFix::InternalExec(), ExtractGimpleCondOp::InternalExec(), FixVdef::InternalExec(), remove_clobber_ga::InternalExec(), UpdateSchedule::InternalExec(), HDLVarDeclFix::InternalExec(), extract_patterns::InternalExec(), LoopsAnalysisBambu::InternalExec(), BuildVirtualPhi::InternalExec(), call_expr_fix::InternalExec(), CallGraphBuiltinCall::InternalExec(), eSSA::InternalExec(), fanout_opt::InternalExec(), rebuild_initialization::InternalExec(), NI_SSA_liveness::InternalExec(), BlockFix::InternalExec(), compute_implicit_calls::InternalExec(), SplitReturn::InternalExec(), parm2ssa::InternalExec(), Bit_Value_opt::InternalExec(), FunctionCallTypeCleanup::InternalExec(), hls_div_cg_ext::InternalExec(), determine_memory_accesses::InternalExec(), CondExprRestructuring::InternalExec(), VarDeclFix::InternalExec(), commutative_expr_restructuring::InternalExec(), RemoveEndingIf::InternalExec(), virtual_phi_nodes_split::InternalExec(), simple_code_motion::InternalExec(), short_circuit_taf::InternalExec(), dead_code_elimination::InternalExec(), CSE::InternalExec(), FunctionCallOpt::InternalExec(), multi_way_if::InternalExec(), MultipleEntryIfReduction::InternalExec(), CheckSystemType::InternalExec(), operations_cfg_computation::InternalExec(), IR_lowering::InternalExec(), Vectorize::InternalExec(), PhiOpt::InternalExec(), soft_float_cg_ext::InternalExec(), dead_code_elimination::kill_uses(), rebuild_initialization2::look_for_ROMs(), CallGraphBuiltinCall::lookForBuiltinCall(), Bit_Value::lsb_to_zero(), multi_way_if::MergeCondCond(), multi_way_if::MergeCondMulti(), multi_way_if::MergeMultiCond(), multi_way_if::MergeMultiMulti(), Bit_Value_opt::optimize(), FunctionCallTypeCleanup::ParametersTypeCleanup(), Bit_Value::pointer_resizing(), PrintTreeManager(), lut_transformation::ProcessBasicBlock(), Bit_Value_opt::propagateValue(), IR_lowering::reached_max_transformation_limit(), parm2ssa::recursive_analysis(), string_cst_fix::recursive_analysis(), hls_div_cg_ext::recursive_examinate(), VarDeclFix::recursive_examinate(), soft_float_cg_ext::RecursiveExaminate(), VarComputation::RecursivelyAnalyze(), PhiOpt::RemoveCondExpr(), compute_implicit_calls::replace_with_memcpy(), compute_implicit_calls::replace_with_memset(), soft_float_cg_ext::replaceWithCall(), InterfaceInfer::setReadInterface(), InterfaceInfer::setWriteInterface(), soft_float_cg_ext::signature_lowering(), dead_code_eliminationIPA::signature_opt(), soft_float_cg_ext::soft_float_cg_ext(), soft_float_cg_ext::ssa_lowering(), Vectorize::Transform(), Bit_Value::update_IR(), virtual_phi_nodes_split::virtual_split_phi(), and FunctionFrontendFlowStep::WriteBBGraphDot().

◆ frontend_flow_step_type

const FrontendFlowStepType FrontendFlowStep::frontend_flow_step_type
protected

◆ print_counter

unsigned int FrontendFlowStep::print_counter
protected

Print counter.

Definition at line 224 of file frontend_flow_step.hpp.

Referenced by PrintTreeManager().


The documentation for this class was generated from the following files:

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