Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages
ipConstantPropagation Class ReferenceControls data for management of constant propagation problem.
More...
#include <ipconstants.h>
Inheritance diagram for ipConstantPropagation:
List of all members.
|
Public Member Functions |
| ipConstantPropagation (bool debug=false) |
virtual bool | assignment (const Path *where, memoryDef *left_hand_side, analysisVal *right_hand_side, bool is_strong_update) |
| Process an assignment, return true if the state of the defined object changes.
|
virtual analysisVal * | lookup (memoryBlock *block, memoryUse *use) |
virtual analysisVal * | lookup (constNode *con) |
virtual analysisVal * | lookup (const string &field_name) |
virtual void | free (analysisVal *to_free) |
| Free: must be able to accept 0 as an argument.
|
virtual analysisVal * | top () |
| Return a *COPY* of the TOP flow value.
|
virtual analysisVal * | bottom () |
| Return a *COPY* the BOTTOM flow value.
|
virtual analysisVal * | binary_operator (const Operator *op, const analysisVal *left_operand, const analysisVal *right_operand) |
virtual analysisVal * | unary_operator (const Operator *op, const analysisVal *operand) |
virtual analysisVal * | cast_operator (const typeNode *type, const analysisVal *operand) |
void | stats () |
| Print some statistics.
|
Direction | direction () const |
| Get the direction.
|
virtual string | name ()=0 |
| Name of the analysis.
|
virtual bool | compare_property_value (Location *where, memoryBlock *property_block, procedureInfo *callee) |
| Compare current property value against the last input to callee.
|
virtual void | record_input_to_value (procedureInfo *callee, memoryBlock *property_block, Location *where) |
| Record the value of a property when it is used as an input_to/external_input value to a call to callee at a call site.
|
|
The rest of these functions are hooks for the pointer analyzer to call at various points in the analysis. They serve as the transfer functions for the dataflow analysis problem.
|
virtual void | at_id (stmtLocation *current, idNode *id, pointerValue &result) |
virtual void | at_unary (stmtLocation *current, threeAddrNode *r, pointerValue &operand, pointerValue &result) |
virtual void | at_sizeof (stmtLocation *current, threeAddrNode *r, pointerValue &operand, pointerValue &result) |
virtual void | at_binary (stmtLocation *current, stmtNode *r, pointerValue &left, pointerValue &right, pointerValue &result) |
virtual void | at_cast (stmtLocation *current, operandNode *operand, pointerValue &operand_value, pointerValue &result) |
virtual void | at_const (stmtLocation *current, constNode *cons, pointerValue &result) |
virtual void | at_call (stmtLocation *current, operandNode *call, pointerValue &call_target, procNode *callee, pointervalue_list &arguments, pointerValue &return_val) |
virtual void | at_field_access (stmtLocation *current, operandNode *operand, pointerValue &operand_value, pointerValue &result) |
virtual void | at_dereference (stmtLocation *current, operandNode *operand, pointerValue &operand_value, pointerValue &result) |
virtual void | at_address (stmtLocation *current, operandNode *operand, pointerValue &operand_value, pointerValue &result) |
virtual void | at_index (stmtLocation *current, operandNode *operand, pointerValue &left, pointerValue &right, pointerValue &result) |
virtual void | at_assignment (stmtLocation *current, pointerValue &left, pointerValue &right, pointerValue &result, memoryblock_set &changes) |
virtual void | at_parameter_pass (Location *current, stmtLocation *parameter_callsite, pointerValue &left, pointerValue &right, memoryblock_set &changes) |
virtual void | at_self_assignment (Location *source, Location *target, memoryBlock *block, memoryblock_set &changes, bool is_input) |
virtual void | at_return (Location *current, pointerValue &left, pointerValue &right, memoryblock_set &changes) |
virtual void | at_threeAddr (stmtLocation *stmt, threeAddrNode *threeaddr, pointerValue &result) |
virtual void | at_conditiongoto (stmtLocation *stmt, conditiongotoNode *c, pointerValue &result) |
virtual void | at_allocation (stmtLocation *stmt, pointervalue_list &arguments, memoryBlock *block, memoryblock_set &changes) |
virtual void | at_deallocation (stmtLocation *stmt, pointerValue &to_deallocate, memoryblock_set &changes) |
virtual void | at_merge (Location *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_stmt_exit (stmtLocation *stmt, pointerValue &result) |
virtual void | at_basicblock_exit (basicblockLocation *block, procedureInfo *info, pointerValue &final) |
virtual void | at_conservative_procedure_call (stmtLocation *current, operandNode *call, operand_list &args, pointerValue &call_target, pointervalue_list &arguments, memoryblock_set &reachable_blocks, pointerValue &return_val, memoryblock_set &changes) |
virtual void | at_procedure_entry (procLocation *proc, procedureInfo *info, pointerValue &return_val) |
virtual void | at_procedure_exit (procLocation *proc, procedureInfo *info, pointerValue &return_val) |
Protected Attributes |
Direction | _direction |
Private Member Functions |
void | allocate (ipConstant *ic) |
ipConstant * | clone (analysisVal *to_clone) |
Private Attributes |
const_variables_map | _values |
constants_map | _constants |
enums_map | _enums |
ipConstant * | _top |
ipConstant * | _bottom |
bool | _debug |
ipconstant_set | _deleted |
int | _count |
Detailed Description
Controls data for management of constant propagation problem.
This class controls the constant propagation algorithm by holding the current states of all objects, looking them up when needed, and setting their values at assignments.
Definition at line 145 of file ipconstants.h.
Constructor & Destructor Documentation
ipConstantPropagation::ipConstantPropagation |
( |
bool |
debug = false |
) |
[inline] |
|
Member Function Documentation
void ipConstantPropagation::allocate |
( |
ipConstant * |
ic |
) |
[inline, private] |
|
bool ipConstantPropagation::assignment |
( |
const Path * |
where, |
|
|
memoryDef * |
left_hand_side, |
|
|
analysisVal * |
right_hand_side, |
|
|
bool |
is_strong_update |
|
) |
[virtual] |
|
analysisVal * ipConstantPropagation::bottom |
( |
|
) |
[virtual] |
|
Direction analysisProblem::direction |
( |
|
) |
const [inline, inherited] |
|
void ipConstantPropagation::free |
( |
analysisVal * |
to_free |
) |
[virtual] |
|
virtual string analysisProblem::name |
( |
|
) |
[pure virtual, inherited] |
|
void ipConstantPropagation::stats |
( |
|
) |
|
|
Member Data Documentation
ipConstant* ipConstantPropagation::_bottom [private]
|
|
int ipConstantPropagation::_count [private]
|
|
bool ipConstantPropagation::_debug [private]
|
|
Direction analysisProblem::_direction [protected, inherited]
|
|
enums_map ipConstantPropagation::_enums [private]
|
|
The documentation for this class was generated from the following files:
|