Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

Module Class Reference

Defines the interface of a module, the basis of IR nodes or passes. More...

#include <suifkernel/module.h>

Class diagram for Module:

j2s_Program XLoadModule VtblModule Vtbl VirtualTests ValidateSuifPass TypeBuilderModule TimeModule TestWalkerModule TestSuifModule TestCloneModule SuifPrinterModule SuifModule SuifClonerModule SuifCFGraphBuilderModule SimpleModule SaveModule SBrowserModule RequireModule PrintModule Pass OsuifextensionModule OsuifTypeBuilderModule OsuifModule NodeCount MCPrintStyleModule Lowering LocationModule ListModulesModule ListInterfacesModule J2sModule IputilsModule InstancefieldslayoutModule InstanceFieldsLayoutDriver ImportModule IdPrinter GCSymbolTablePass FrontendPass FoldTable EcrModule Driver CppOsuifTypeBuilderModule CppOsuifModule CountSuifObjectPass CiModule CfeModule CPrintStyleModule BasicModule

List of all members.


Public Members

Module (SuifEnv* suif_env, const LString& moduleName = emptyLString )
virtual ~Module ()
virtual LString get_module_name () const
Retrieves the name of a module. More...

virtual Module* clone () const = 0
generates a new copy of the current instance if necessary The implementor of a subclass is responsible for overriding this method if the implementation has a unique state the default implementation returns the current instance.

virtual bool delete_me () const
tells the system whether an instance of this Module should be deleted after it has been executed the default implementation returns false.

virtual bool is_initialized () const
returns true if the method initalize() was already executed on this instance.

virtual void initialize ()
initializes the modules. More...

virtual bool parse_command_line ( TokenStream* command_line_stream )
parses the input for this Module.

virtual void execute ()
executes the Module parse_command_line should be called before this method is invoked.

virtual SuifEnv* get_suif_env () const
virtual bool supports_interface ( const LString &interface_name ) const
Interface required for the SUIF interface support mechanism. More...

virtual Address get_interface ( const LString &interface_name ) const
virtual void get_supported_interface_list (list<LString> &llist) const
write the list of interfaces this module supports to the llist.

virtual void interface_registered (const LString &producer_module_name, const LString &interface_name)
These are callbacks that the module system will give when a new module registers its support for an interface.

virtual void interface_object_created (Module *producer_module, const LString &interface_name)
virtual void interface_object_destructed (Module *producer_module, const LString &interface_name)
void import_module (const char* module_name)
virtual String get_description () const
get the module description.

virtual String get_usage () const

Protected Members

virtual void set_interface ( const LString &interface_name, Address interface)
SuifEnv* _suif_env
LString _module_name
OptionLiteral* _command_name
OptionList* _command_line
OptionSelection* _flags
OptionLiteral* _help_flag
suif_hash_map<LString, Address>* _interfaces

Friends

class ModuleSubSystem

Detailed Description

Defines the interface of a module, the basis of IR nodes or passes.

From Loading A DLL to executing a module:
When a new DLL is loaded,

Member Function Documentation

Module::Module (SuifEnv * suif_env, const LString & moduleName = emptyLString)

virtual Module::~Module () [virtual]

virtual LString Module::get_module_name () const [virtual]

Retrieves the name of a module.

This name must be unique for every kind of Module. (it may be called before calling the initialize method)

Reimplemented in TestWalkerModule, and TestCloneModule.

virtual Module * Module::clone (void) const [pure virtual]

generates a new copy of the current instance if necessary The implementor of a subclass is responsible for overriding this method if the implementation has a unique state the default implementation returns the current instance.

Reimplemented in XLoadModule, walker_based_module, VtblModule, Vtbl, VirtualTests, ValidateSuifPass, UnownedPass, UnconvertFromFortranForm, TypeCheckerPass, TypeBuilderModule, TimeModule, TestWalkerModule, TestCloneModule, sup_Pass, SuifPrinterModule, SuifModule, SuifClonerModule, SuifCFGraphPass, SuifCFGraphBuilderModule, StructPaddingPass, StripAnnotesPass, SimpleModule, SetAddrTakenPass, SBrowserModule, SaveModule, S2CPass, RequireProcedureReturns, RequireModule, RepeatValueBlockBuilderPass, RemoveTrashPass, RemoveIfAndLoopPass, RemoveExplicitLoopLabels, PrintSuifCFGraphPass, PrintModule, PrintDotSuifCFGraphPass, PrintCallGraphPass, print_pass, PipelinerDispatchPass, Pipeliner, PipelinablePass, Pass, PaddingPass, OsuifTypeBuilderModule, OsuifModule, OsuifextensionModule, One2MultiArrayExpressionPass, NormalizeProcedureReturns, NonConstBoundDismantlerPass, NodeCount, NameAllSymbolsPass, MultiDimArrayDismantlerPass, md_Pass, MCPrintStyleModule, MarkGuardedFors, MarkEntryPointsPass, LoweringPass, Lowering, LocationModule, LoadExpressionDismantlerPass, ListModulesModule, ListInterfacesModule, J2sModule, J2sClosurePass, j2s_Program, j2s_Pass, IputilsModule, InstancefieldslayoutModule, InstanceFieldsLayoutDriver, InlinePass, ImportModule, IfConditionsToBinaryExprs, IdPrinter, GuardAllFors, globalize_class_variable_symbols_pass, globalize_class_method_symbols_pass, globalize_class_method_symbols_pass, GCSymbolTablePass, FoldTable, FoldStatementsPass, FlattenStatementListsPass, FixupExplicitLoopLabels, FieldBuilderPass, EcrModule, EcrAliasPass, Driver, DismantleStructuredReturns, DismantleStmtsWithJumpsInside, DismantleMultiEntryScopeStatements, DismantleEmptyScopeStatements, DismantleCppVTablesPass, DismantleCallArguments, dismantle_if_statements_pass, dismantle_if_statements_pass, DeadcodePass, CreateSuifComplexInputPass, CPrintStyleModule, CppOsuifTypeBuilderModule, CppOsuifModule, CountSuifObjectsPass, CountSuifObjectPass, CopyPropPass, ConvertToFortranForm, convertsuif2bto1_pass, convertsuif1to2b, ConstantFolderPass, CombinedPassForCpp, CombinedPass, CollectWalkerPass, CiModule, CiCheckElimPass, CIAnnoteStatsPass, CFor2ForPass, CfeModule, CallExpressionDismantlerPass, BuildCppVTablesPass, build_single_vtable_pass, BasicModule, AvoidLabelCollisions, AvoidFileScopeCollisions, AvoidExternCollisions, ArrayReferenceDismantlerPass, AddStatementListsToProcs, AddProcedureEndLabelsPass, and AddExplicitLoopLabels.

virtual bool Module::delete_me (void) const [virtual]

tells the system whether an instance of this Module should be deleted after it has been executed the default implementation returns false.

Reimplemented in ValidateSuifPass, TimeModule, SimpleModule, S2CPass, GCSymbolTablePass, Driver, and CountSuifObjectPass.

virtual bool Module::is_initialized () const [virtual]

returns true if the method initalize() was already executed on this instance.

virtual void Module::initialize (void) [virtual]

initializes the modules.

This method must/will be called before a call to parse_command_line or execute

Reimplemented in XLoadModule, walker_based_module, VtblSlotCountAnnotePass, VtblSlotAnnotePass, VtblPass, VtblModule, VtblAnnotePass, Vtbl, ValidateSuifPass, UnconvertFromFortranForm, TypeBuilderModule, sup_Pass, SuifPrinterModule, SuifModule, SuifClonerModule, SuifCFGraphPass, SuifCFGraphBuilderModule, StripAnnotesPass, StaticMethodCallStatementLoweringPass, StaticMethodCallExpressionLoweringPass, SetAddrTakenPass, SBrowserModule, SaveModule, S2CPass, RequireProcedureReturns, RequireModule, RepeatValueBlockBuilderPass, RemoveIfAndLoopPass, RemoveExplicitLoopLabels, PrintModule, Printmetaloader, Printloader, PrintDotSuifCFGraphPass, Printclosure, PrintCallGraphPass, PipelinablePass, Pass, PaddingPass, OsuifTypeBuilderModule, OsuifModule, OsuifextensionModule, One2MultiArrayExpressionPass, NormalizeProcedureReturns, NonConstBoundDismantlerPass, MultiDimArrayDismantlerPass, md_Pass, MCPrintStyleModule, MarkGuardedFors, LoweringPass, Lowering, LocationModule, LocalCopyPropPass, LocalConstPropPass, LoadExpressionDismantlerPass, ListModulesModule, ListInterfacesModule, JavaInstanceMethodCallExpressionLoweringPass, J2sModule, J2sClosurePass, j2s_Program, j2s_Pass, j2s_FrontEndPass, j2s_FrontEndPass, IputilsModule, InstanceMethodCallStatementLoweringPass, InstanceMethodCallExpressionLoweringPass, InstanceFieldsLayoutPass, InstanceFieldsLayoutOffsetAnnotePass, InstancefieldslayoutModule, InstanceFieldsLayoutDriver, ImportModule, IfConditionsToBinaryExprs, IdPrinter, HasClinitPass, GuardAllFors, GCSymbolTablePass, FrontendPass, FoldTable, FoldStatementsPass, FlattenStatementListsPass, FixupExplicitLoopLabels, FieldBuilderPass, EcrModule, EcrAliasPass, Driver, DismantleStructuredReturns, DismantleStmtsWithJumpsInside, DismantleMultiEntryScopeStatements, DismantleEmptyScopeStatements, DismantleCallArguments, DefinitionBlockPass, DeadcodePass, CPrintStyleModule, CppOsuifTypeBuilderModule, CppOsuifModule, CountSuifObjectPass, CopyPropPass, ConvertToFortranForm, convertsuif2bto1_pass, convertsuif1to2b, CollectWalkerPass, ClinitElimPass, CiModule, CiCheckElimPass, CIAnnoteStatsPass, CFor2ForPass, CfeModule, CallExpressionDismantlerPass, BasicModule, ArrayReferenceDismantlerPass, AddStatementListsToProcs, AddProcedureEndLabelsPass, and AddExplicitLoopLabels.

virtual bool Module::parse_command_line (TokenStream * command_line_stream) [virtual]

parses the input for this Module.

Reimplemented in VtblSlotCountAnnotePass, VtblSlotAnnotePass, VtblPass, VtblAnnotePass, Vtbl, sup_Pass, StaticMethodCallStatementLoweringPass, StaticMethodCallExpressionLoweringPass, SimpleModule, Printclosure, md_Pass, LoweringPass, Lowering, LocalCopyPropPass, LocalConstPropPass, JavaInstanceMethodCallExpressionLoweringPass, J2sClosurePass, j2s_Program, j2s_Pass, j2s_FrontEndPass, j2s_FrontEndPass, InstanceMethodCallStatementLoweringPass, InstanceMethodCallExpressionLoweringPass, InstanceFieldsLayoutPass, InstanceFieldsLayoutOffsetAnnotePass, InstanceFieldsLayoutDriver, HasClinitPass, Driver, DefinitionBlockPass, CollectWalkerPass, ClinitElimPass, CiCheckElimPass, and CIAnnoteStatsPass.

virtual void Module::execute (void) [virtual]

executes the Module parse_command_line should be called before this method is invoked.

Reimplemented in XLoadModule, Vtbl, VirtualTests, ValidateSuifPass, TimeModule, TestWalkerModule, TestCloneModule, SuifPrinterModule, SimpleModule, SBrowserModule, SaveModule, RequireModule, PrintModule, Printmetaloader, Printloader, Printclosure, PipelinerDispatchPass, Pipeliner, PipelinablePass, Pass, NodeCount, Lowering, LocationModule, ListModulesModule, ListInterfacesModule, j2s_Program, InstanceFieldsLayoutDriver, ImportModule, GCSymbolTablePass, FrontendPass, Driver, and CountSuifObjectPass.

virtual SuifEnv * Module::get_suif_env () const [virtual]

virtual bool Module::supports_interface (const LString & interface_name) const [virtual]

Interface required for the SUIF interface support mechanism.

This can return pointers to anything. Frequently it will be a pointer to a function to call

virtual Address Module::get_interface (const LString & interface_name) const [virtual]

virtual void Module::get_supported_interface_list (list<LString>& llist) const [virtual]

write the list of interfaces this module supports to the llist.

virtual void Module::interface_registered (const LString & producer_module_name, const LString & interface_name) [virtual]

These are callbacks that the module system will give when a new module registers its support for an interface.

virtual void Module::interface_object_created (Module * producer_module, const LString & interface_name) [virtual]

Reimplemented in SuifPrinterModule, and EcrAliasPass.

virtual void Module::interface_object_destructed (Module * producer_module, const LString & interface_name) [virtual]

void Module::import_module (const char * module_name)

virtual String Module::get_description (void) const [virtual]

get the module description.

Reimplemented in SimpleModule, and MarkLibPass.

virtual String Module::get_usage () const [virtual]

virtual void Module::set_interface (const LString & interface_name, Address interface) [protected, virtual]


Friends And Related Function Documentation

friend class ModuleSubSystem [friend]


Member Data Documentation

SuifEnv* Module::_suif_env [protected]

LString Module::_module_name [protected]

OptionLiteral* Module::_command_name [protected]

OptionList* Module::_command_line [protected]

OptionSelection* Module::_flags [protected]

OptionLiteral* Module::_help_flag [protected]

suif_hash_map<LString, Address>* Module::_interfaces [protected]


The documentation for this class was generated from the following files:
Generated at Wed Apr 25 17:35:00 2001 for NCI SUIF by doxygen  written by Dimitri van Heesch, © 1997-1999