#include <fold_table.h>
Inheritance diagram for FoldTable:
Public Methods | |
FoldTable (SuifEnv *s, const LString &name = "constant_folding_table") | |
~FoldTable () | |
void | initialize () |
initializes the modules. More... | |
void | initialize_suifnodes_folds () |
Module* | clone () 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) |
|
|
|
|
|
|
|
|
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.
|
|
|
|
initializes the modules.
This method must/will be called before a call to parse_command_line or execute
Reimplemented from Module.
|
|