Main Page   Class Hierarchy   Compound List   File List   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>

Inheritance diagram for Module:

CountSuifObjectPass CppOsuifTypeBuilderModule CPrintStyleModule Driver FoldTable FrontendPass GCSymbolTablePass IdPrinter ImportModule InstanceFieldsLayoutDriver j2s_Program ListInterfacesModule ListModulesModule LocationModule Lowering MCPrintStyleModule NodeCount OsuifTypeBuilderModule Pass PrintModule RequireModule SaveModule SBrowserModule SimpleModule SuifCFGraphBuilderModule SuifClonerModule SuifPrinterModule TestCloneModule TestSuifModule TestWalkerModule TimeModule TypeBuilderModule ValidateSuifPass VirtualTests Vtbl XLoadModule List of all members.

Public Methods

 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 SuifEnvget_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 Methods

virtual void set_interface ( const LString &interface_name, Address interface)

Protected Attributes

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,


Constructor & Destructor Documentation

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

Module::~Module () [virtual]


Member Function Documentation

Module * Module::clone ( void) const [inline, 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 AddExplicitLoopLabels, AddProcedureEndLabelsPass, AddStatementListsToProcs, ArrayReferenceDismantlerPass, AvoidExternCollisions, AvoidFileScopeCollisions, AvoidLabelCollisions, BuildCppVTablesPass, CFor2ForPass, CIAnnoteStatsPass, CPrintStyleModule, CallExpressionDismantlerPass, CiCheckElimPass, CollectWalkerPass, CombinedPass, CombinedPassForCpp, ConstantFolderPass, ConvertToFortranForm, CopyPropPass, CountCallsWithIteratorPass, CountCallsWithWalkerPass, CountSuifObjectPass, CppOsuifTypeBuilderModule, CreateSuifComplexInputPass, DeadcodePass, DismantleCallArguments, DismantleCppVTablesPass, DismantleEmptyScopeStatements, DismantleMultiEntryScopeStatements, DismantleStmtsWithJumpsInside, DismantleStructuredReturns, Driver, FieldBuilderPass, FixupExplicitLoopLabels, FlattenStatementListsPass, FoldStatementsPass, FoldTable, GCSymbolTablePass, GuardAllFors, IdPrinter, IfConditionsToBinaryExprs, ImportModule, InlinePass, InstanceFieldsLayoutDriver, J2sClosurePass, ListInterfacesModule, ListModulesModule, LoadExpressionDismantlerPass, LocationModule, Lowering, LoweringPass, MCPrintStyleModule, MarkGuardedFors, MultiDimArrayDismantlerPass, NameAllSymbolsPass, NodeCount, NonConstBoundDismantlerPass, NormalizeProcedureReturns, One2MultiArrayExpressionPass, OsuifTypeBuilderModule, PaddingPass, Pass, PipelinablePass, Pipeliner, PipelinerDispatchPass, PrintDotSuifCFGraphPass, PrintModule, PrintSuifCFGraphPass, RemoveExplicitLoopLabels, RemoveIfAndLoopPass, RemoveTrashPass, RepeatValueBlockBuilderPass, RequireModule, RequireProcedureReturns, S2CPass, SBrowserModule, SaveModule, SetAddrTakenPass, SimpleModule, StripAnnotesPass, StructPaddingPass, SuifCFGraphBuilderModule, SuifCFGraphPass, SuifClonerModule, SuifPrinterModule, TestCloneModule, TestWalkerModule, TimeModule, TypeBuilderModule, TypeCheckerPass, UnconvertFromFortranForm, UnownedPass, ValidateSuifPass, VirtualTests, Vtbl, XLoadModule, build_single_vtable_pass, convertsuif1to2b, convertsuif2bto1_pass, dismantle_if_statements_pass, dismantle_if_statements_pass, globalize_class_method_symbols_pass, globalize_class_method_symbols_pass, globalize_class_variable_symbols_pass, iterator_pass, j2s_Pass, j2s_Program, md_Pass, print_pass, sup_Pass, walker_based_module, and walker_pass.

bool Module::delete_me ( void) const [inline, 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 CountSuifObjectPass, Driver, GCSymbolTablePass, S2CPass, SimpleModule, TimeModule, and ValidateSuifPass.

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

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

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

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

get the module description.

Reimplemented in MarkLibPass, and SimpleModule.

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

LString Module::get_module_name () const [inline, 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 TestCloneModule, and TestWalkerModule.

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

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

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

String Module::get_usage () const [virtual]

void Module::import_module ( const char * module_name)

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

initializes the modules.

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

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

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

Reimplemented in SuifPrinterModule.

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

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

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

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

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

bool Module::parse_command_line ( TokenStream * ts) [inline, virtual]

parses the input for this Module.

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

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

bool Module::supports_interface ( const LString & interface_name) const [inline, 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


Friends And Related Function Documentation

class ModuleSubSystem [friend]


Member Data Documentation

OptionList * Module::_command_line [protected]

OptionLiteral * Module::_command_name [protected]

OptionSelection * Module::_flags [protected]

OptionLiteral * Module::_help_flag [protected]

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

LString Module::_module_name [protected]

SuifEnv * Module::_suif_env [protected]


The documentation for this class was generated from the following files:
Generated at Mon Jul 31 13:44:05 2000 for NCI SUIF by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000