Public Methods |
| constantAnalyzer (bool debug=false) |
| Create a new constant analysis. More...
|
virtual string | name () |
| Name of the analysis. More...
|
void | clear () |
| Clear. More...
|
| ~constantAnalyzer () |
| Destructor. More...
|
const constant * | top () const |
| TOP value. More...
|
const constant * | bottom () const |
| BOTTOM value. More...
|
void | set_debug (bool new_val) |
| Turn debug on or off. More...
|
const constant * | lookup_expression (exprNode *expr) |
| Look up an expression. More...
|
virtual void | at_id (stmtLocation *current, idNode *id, pointerValue &value, bool result_is_a_use) |
virtual void | at_unary (stmtLocation *current, unaryNode *unary, pointerValue &operand, pointerValue &result, bool result_is_a_use) |
virtual void | at_binary (stmtLocation *current, binaryNode *binary, pointerValue &left, pointerValue &right, pointerValue &result, bool result_is_a_use) |
virtual void | at_cast (stmtLocation *current, castNode *cast, pointerValue &operand, pointerValue &result, bool result_is_a_use) |
virtual void | at_const (stmtLocation *current, constNode *cons, pointerValue &result, bool result_is_a_use) |
virtual void | at_field_access (stmtLocation *current, binaryNode *binary, pointerValue &operand, idNode *field, pointerValue &result, bool result_is_a_use) |
virtual void | at_dereference (stmtLocation *current, unaryNode *unary, pointerValue &operand, pointerValue &result, bool result_is_a_use) |
virtual void | at_address (stmtLocation *current, unaryNode *unary, pointerValue &operand, pointerValue &result, bool result_is_a_use) |
virtual void | at_index (stmtLocation *current, binaryNode *binary, pointerValue &left, pointerValue &right, pointerValue &result, bool result_is_a_use) |
virtual void | at_assignment (stmtLocation *current, binaryNode *binary, pointerValue &left, pointerValue &right, pointerValue &result, bool result_is_a_use, memoryblock_set &changes) |
virtual void | at_parameter_pass (Location *current, pointerValue &left, pointerValue &right, pointerValue &result, memoryblock_set &changes) |
virtual void | at_return (stmtLocation *stmt, returnNode *ret, pointerValue &result, pointerValue &return_val) |
virtual void | at_merge (basicblockLocation *where, memoryBlock *block, memoryuse_list &phi_uses, pointerValue &result, memoryblock_set &changes) |
virtual void | at_basicblock_entry (basicblockLocation *block, procedureInfo *info, pointerValue &initial) |
virtual void | at_stmt_entry (stmtLocation *stmt, pointerValue &result) |
virtual void | at_conservative_procedure_call (stmtLocation *current, callNode *call, pointerValue &call_target, pointervalue_list &arguments, memoryblock_set &reachable_blocks, pointerValue &return_val, memoryblock_set &changes) |
void | print (ostream &o, const constant *val) |
Protected Methods |
const constant * | lookup (const constant &value) |
| Lookup a constant value. More...
|
const constant * | lookup_flowvalue (memoryDef *def) |
| Lookup a variable value. More...
|
bool | update_flowvalue (const constant *val, memoryDef *def) |
| Update a variable value. More...
|
const constant * | meet (const constant *one, const constant *two) |
| Meet function. More...
|
const constant * | rebuild_flowvalue (pointerValue &pointer) |
| Rebuild the flow value. More...
|
const constant * | get_flowvalue (pointerValue &pointer) |
| Get the flow value. More...
|
void * | set_flowvalue (const constant *val, pointerValue &pointer) |
| Set the flow value. More...
|
void | record_expression (exprNode *expr, const constant *val) |
| Record the value of an expression. More...
|
Private Types |
typedef set< constant > | constant_set |
typedef constant_set::iterator | constant_set_p |
typedef map< memoryDef *,
const constant *> | memorydef_constant_map |
typedef memorydef_constant_map::iterator | memorydef_constant_map_p |
typedef set< procLocation * > | change_set |
typedef change_set::iterator | change_set_p |
typedef map< exprNode *, const
constant * > | expr_value_map |
typedef expr_value_map::iterator | expr_value_map_p |
Private Methods |
void | record_change (memoryDef *def) |
| Obsolete: Record a value change. More...
|
Private Attributes |
TREE constant_set | _constants |
| The set of all constants. More...
|
memorydef_constant_map | _values |
| Variables values. More...
|
const constant * | _top |
| Unique lattice top element. More...
|
const constant * | _bottom |
| Unique lattice bottom element. More...
|
change_set | _changes |
| Obsolete: Record changes. More...
|
expr_value_map | _expr_values |
| Record the value of each expression. More...
|
bool | _debug |
| Debug flag. More...
|