Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

FoldTable Class Reference

#include <fold_table.h>

Inheritance diagram for FoldTable:

Module List of all members.

Public Methods

 FoldTable (SuifEnv *s, const LString &name = "constant_folding_table")
 ~FoldTable ()
void initialize ()
 initializes the modules. More...

void initialize_suifnodes_folds ()
Moduleclone () const
 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.

void add_binary_fold_fn (const LString &opcode, binary_fold_fn fn)
void add_unary_fold_fn (const LString &opcode, unary_fold_fn fn)
void add_expression_fold_fn (const LString &meta_class, expression_fold_fn fn)
void add_statement_fold_fn (const LString &meta_class, statement_fold_fn fn)
IInteger binary_fold (const LString &opcode, const IInteger &val1, const IInteger &val2, const IInteger &bit_size, bool is_signed) const
IInteger unary_fold (const LString &opcode, const IInteger &srcval, const IInteger &bit_size, bool is_signed) const
Expression* fold_and_replace_expression (Expression *expr)
Statement* fold_and_replace_statement (Statement *stmt)

Static Public Methods

FoldTable* get_fold_table (SuifEnv *s)


Detailed Description


Constructor & Destructor Documentation

FoldTable::FoldTable ( SuifEnv * s,
const LString & name = "constant_folding_table")

FoldTable::~FoldTable ()


Member Function Documentation

void FoldTable::add_binary_fold_fn ( const LString & opcode,
binary_fold_fn fn)

void FoldTable::add_expression_fold_fn ( const LString & meta_class,
expression_fold_fn fn)

void FoldTable::add_statement_fold_fn ( const LString & meta_class,
statement_fold_fn fn)

void FoldTable::add_unary_fold_fn ( const LString & opcode,
unary_fold_fn fn)

IInteger FoldTable::binary_fold ( const LString & opcode,
const IInteger & val1,
const IInteger & val2,
const IInteger & bit_size,
bool is_signed) const

Module * FoldTable::clone ( void) const [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 from Module.

Expression * FoldTable::fold_and_replace_expression ( Expression * expr)

Statement * FoldTable::fold_and_replace_statement ( Statement * stmt)

FoldTable * FoldTable::get_fold_table ( SuifEnv * s) [static]

void FoldTable::initialize ( void) [virtual]

initializes the modules.

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

Reimplemented from Module.

void FoldTable::initialize_suifnodes_folds ()

IInteger FoldTable::unary_fold ( const LString & opcode,
const IInteger & srcval,
const IInteger & bit_size,
bool is_signed) const


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