Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages
memoryBlock Class Reference#include <memoryblock.h>
Inheritance diagram for memoryBlock:
List of all members.
|
Public Types |
typedef map< Location *, DestructiveKind > | destructive_assignment_map |
typedef destructive_assignment_map::iterator | destructive_assignment_map_p |
typedef destructive_assignment_map::const_iterator | destructive_assignment_map_cp |
typedef map< Location *, memoryblock_set > | complicit_assignment_map |
typedef complicit_assignment_map::iterator | complicit_assignment_map_p |
typedef complicit_assignment_map::const_iterator | complicit_assignment_map_cp |
enum | DestructiveKind { Control_flow,
Parameter_pass,
Weak_update,
Additive
} |
enum | Output_mode { NAME_ONLY,
CURRENT_VALUE,
AFTER_ASSIGNMENT,
ALL_VALUES
} |
Public Member Functions |
void | clear () |
| Clear.
|
declNode * | decl () const |
procNode * | local_to () const |
bool | is_synthetic_decl () const |
bool | write_protected () const |
void | set_write_protected () |
bool | is_indexed () const |
void | set_indexed () |
stmtLocation * | allocation_site () const |
bool | is_heap_object () const |
void | set_heap_object (stmtLocation *alloc_site) |
bool | is_allocation_object () const |
memoryUse * | current_use () const |
memoryDef * | current_def () const |
void | reset_current_def_use (Location *unused) |
void | set_current_def_use (Location *where) |
memoryBlock * | container () const |
bool | is_flow_sensitive () const |
void | set_flow_sensitive () |
void | set_flow_insensitive () |
bool | is_unify () const |
void | set_unify (bool flag) |
UnifyType * | unifyType () const |
void | unifyType (UnifyType *t) |
bool | is_single_assignment () const |
bool | is_return_value () const |
bool | set_return_value () |
procedureinfo_set & | input_to () |
memoryDef * | def_at (Location *where, bool &is_new) |
| Create a definition.
|
memoryDef * | nearest_def_at (Location *where) |
| Find the nearest dominating def.
|
memoryUse * | use_at (Location *where) |
| Find the nearest interprocedural dominating def Create a use.
|
memoryDef * | last_def_at (basicblockLocation *block) |
| Find the last def in a basic block.
|
memoryDef * | find_def_at (Location *where) |
| Find a def.
|
memoryUse * | find_use_at (Location *where) |
| Find a use.
|
void | find_uses_at (Location *where, memoryuse_set &uses) |
| Find uses.
|
const memorydef_list & | defs () const |
| List of defs.
|
void | add_parameter_assignment (procNode *proc, stmtLocation *callsite, memoryBlock *block) |
| Add a parameter-assignment.
|
void | add_parameter_assignment (procNode *proc, stmtLocation *callsite, memoryblock_set &blocks) |
| Add a parameter-assignment.
|
const callsite_objects_map & | parameter_assignments (procNode *proc) |
| Get parameter-assignments.
|
void | apply_weak_update (Location *current, memoryDef *previous_def, memoryuse_set &uses) |
| Apply weak update.
|
void | setup_merge_uses_at (basicblockLocation *merge_location, memoryDef *reaching_def, basicblock_set &predecessors) |
| Set up a merge point.
|
void | merge_uses_at (basicblockLocation *where, memoryuse_list &uses, cfg_edge_set &active_edges, memoryDef *dominating_def, bool computePointers) |
| Process a merge point.
|
void | reachable_blocks (Location *where, bool has_use_here, memoryblock_list &worklist, memoryblock_set &already_seen, memoryBlock *null) |
| Reachable blocks.
|
memoryBlock * | get_allocation_object (memoryModel &Memory) |
| Get the allocation object.
|
memoryBlock * | allocation_object () |
| Return the allocation object.
|
Multiplicity | at_allocation (Location *current, memoryDef *reaching_def, memoryblock_set &defs, memoryuse_set &uses, memoryblock_set &changes) |
| At an allocation.
|
Multiplicity | at_deallocation (Location *current, memoryDef *reaching_def, memoryblock_set &defs, memoryuse_set &uses, memoryblock_set &changes) |
| At a deallocation.
|
memoryBlock * | top_most_container () |
| Top-most container.
|
memoryblock_set | containers () const |
memoryblock_set | top_most_containers () |
void | def_uses (memoryDef *def, memoryuse_list &uses) |
| Def uses.
|
void | prune_defs_uses () |
void | dot (const string &field_name, declNode *field_decl, memoryModel &Memory, memoryblock_set &results) |
bool | is_array () const |
bool | is_array_element () const |
void | set_array_element (memoryBlock *element) |
memoryBlock * | get_array_element () |
memoryDef * | setup_array_def () |
bool | in_scope (basicblockLocation *where) const |
void | print (ostream &o, Location *path, Output_mode mode=CURRENT_VALUE) const |
string | name () const |
string | generate_su_field_name (const string &field) const |
void | print_def_use (ostream &o) const |
void | update_def_use_chains () |
void | stats (ostream &out, bool header, long int &global_defs, long int &global_merge_defs, long int &global_weak_defs, long int &global_uses, long int &global_merge_uses) |
|
void | add_destructive_assignment (Location *where, DestructiveKind cause) |
| Add destructive assignment.
|
void | add_complicit_assignment (Location *where, memoryblock_set &objects) |
| Add complicit assignment.
|
void | add_complicit_assignment (Location *where, memoryBlock *object) |
| Add complicit assignment.
|
const destructive_assignment_map & | destructive_assignments () const |
| Get destructive assignment list.
|
const complicit_assignment_map & | complicit_assignments () const |
| Get the complicit assignment list.
|
void | add_to_flow_sensitive_list (flow_sensitive_set &flow_sensitive_objects) |
| Add to flow-sensitivity list.
|
bool | is_in_flow_sensitive_list (flow_sensitive_set &flow_sensitive_objects) |
| Find in flow-sensitivity list.
|
void | set_flow_sensitivity (flow_sensitive_set &flow_sensitive_objects) |
| Set flow sensivity.
|
void | add_to_non_unify_list (UnifyTypes &non_unify_types) |
| Add to non-unify list.
|
void | set_unification (UnifyTypes &unify_types) |
| Set unification.
|
Static Public Member Functions |
void | stats () |
void | print_multiplicity (Multiplicity m, ostream &out) |
| Print multiplicity values.
|
Public Attributes |
enumPropertyAnn * | property |
| Property handle.
|
memoryblock_vector | property_blocks |
| Property blocks.
|
Static Public Attributes |
int | memoryblock_count = 0 |
Private Member Functions |
| memoryBlock (declNode *decl, bool synthetic, memoryBlock *container, procNode *local_to) |
| Create a new memoryBlock.
|
| ~memoryBlock () |
| Destructor.
|
memoryblock_set | top_most_containers (memoryblock_set &visited) |
Private Attributes |
REF memoryBlock * | _container |
| The containing struct, if there is one.
|
parameter_assign_map | _parameter_assignments |
| Parameter-assignments.
|
REF memoryUse * | _current_use |
| Current use.
|
REF memoryDef * | _current_def |
| Current def.
|
component_map | _components |
| A list of things contained in this memory block.
|
declNode * | _decl |
| The declaration of this object.
|
int | _synthetic_decl:1 |
| Synthetic declaration flag.
|
int | _write_protected:1 |
| Write protected.
|
int | _is_array:1 |
| Is array.
|
int | _is_array_element:1 |
| Is array element.
|
int | _is_indexed:1 |
| Is indexed.
|
int | _is_allocation_object:1 |
| Is alloc object.
|
int | _flow_sensitive:1 |
| Flow sensitivity.
|
int | _unify:1 |
| Unification.
|
int | _single_assignment:1 |
| Single assignment.
|
int | _is_return_value:1 |
| Is return value?
|
procNode * | _local_to |
| Owner procedure.
|
stmtLocation * | _allocation_site |
| Name Heap allocation site.
|
memoryBlock * | _allocation_object |
| Initializer def Allocation object.
|
procedureinfo_set | _input_to |
| Only def Only use Input to.
|
destructive_assignment_map | _destructive_assignments |
| Destructive assignments.
|
complicit_assignment_map | _complicit_assignments |
| Complicit assignments.
|
UnifyType * | _unifytype |
| information on unified type, if this object is unified.
|
|
TREE orderedDefs | Defs |
TREE orderedUses | Uses |
Static Private Attributes |
FieldNameDB | FieldNames |
Friends |
class | memoryModel |
ostream & | operator<< (ostream &o, const memoryBlock &mb) |
Member Typedef Documentation
typedef complicit_assignment_map::const_iterator memoryBlock::complicit_assignment_map_cp
|
|
typedef complicit_assignment_map::iterator memoryBlock::complicit_assignment_map_p
|
|
typedef destructive_assignment_map::const_iterator memoryBlock::destructive_assignment_map_cp
|
|
typedef destructive_assignment_map::iterator memoryBlock::destructive_assignment_map_p
|
|
Member Enumeration Documentation
enum memoryBlock::DestructiveKind
|
|
|
- Enumeration values:
-
Control_flow |
|
Parameter_pass |
|
Weak_update |
|
Additive |
|
Definition at line 84 of file memoryblock.h. |
enum memoryBlock::Output_mode
|
|
|
- Enumeration values:
-
NAME_ONLY |
|
CURRENT_VALUE |
|
AFTER_ASSIGNMENT |
|
ALL_VALUES |
|
Definition at line 732 of file memoryblock.h. |
Constructor & Destructor Documentation
memoryBlock::memoryBlock |
( |
declNode * |
decl, |
|
|
bool |
synthetic, |
|
|
memoryBlock * |
container, |
|
|
procNode * |
local_to |
|
) |
[private] |
|
memoryBlock::~memoryBlock |
( |
|
) |
[private] |
|
Member Function Documentation
void memoryBlock::add_complicit_assignment |
( |
Location * |
where, |
|
|
memoryBlock * |
object |
|
) |
|
|
|
Add a parameter-assignment.
This version is used for regular formal parameter assignments, where there could be multiple actual parameters coming from different objects.
Definition at line 475 of file memoryblock.cc.
References _parameter_assignments. |
void memoryBlock::add_parameter_assignment |
( |
procNode * |
proc, |
|
|
stmtLocation * |
callsite, |
|
|
memoryBlock * |
block |
|
) |
|
|
void memoryBlock::add_to_flow_sensitive_list |
( |
flow_sensitive_set & |
flow_sensitive_objects |
) |
|
|
void memoryBlock::add_to_non_unify_list |
( |
UnifyTypes & |
non_unify_types |
) |
|
|
|
Add to non-unify list.
This method adds the block to the given flow-sensitivity list. It does this by adding a flow_sensitive_pair object containing a statement and a declaration, which can be used to identify the block on subsequent analysis passes. We need this capability because the memoryBlocks themselves are destroyed and recreated on each pass.
Definition at line 1513 of file memoryblock.cc.
References name(), and unifyType(). |
memoryBlock * memoryBlock::allocation_object |
( |
|
) |
|
|
stmtLocation* memoryBlock::allocation_site |
( |
|
) |
const [inline] |
|
|
At an allocation.
This method handles the multiplicity analysis for a heap allocation site. It should only be called on the special allocation object. The method returns the new multiplicity value.
Definition at line 1048 of file memoryblock.cc.
References _container, Bounded, Deallocated, def, def_at(), Error, vector_set< memoryBlock * >::insert(), is_flow_sensitive(), memoryAccess::multiplicity(), Multiplicity, name(), print_multiplicity(), Single, Unallocated, Unbounded, use, and use_at().
Referenced by Pointers::at_allocation(). |
|
At a deallocation.
This method handles the multiplicity analysis for a heap deallocation site. The same conditions hold for this method as for at_allocation() above.
Definition at line 1147 of file memoryblock.cc.
References _container, Bounded, Deallocated, def, def_at(), Error, vector_set< memoryBlock * >::insert(), is_flow_sensitive(), memoryAccess::multiplicity(), Multiplicity, name(), print_multiplicity(), Single, Unallocated, Unbounded, use, and use_at().
Referenced by Pointers::at_deallocation(). |
void memoryBlock::clear |
( |
|
) |
|
|
|
Clear.
Remove all def and use information, preparing for reanalysis.
Definition at line 119 of file memoryblock.cc.
References _current_def, orderedUses::clear(), orderedDefs::clear(), orderedDefs::def_list(), Defs, defs(), is_array(), memorydef_list_cp, unifyType(), and Uses.
Referenced by memoryModel::clear(), and ~memoryBlock(). |
|
Get the complicit assignment list.
Definition at line 627 of file memoryblock.h. |
memoryBlock* memoryBlock::container |
( |
|
) |
const [inline] |
|
|
Definition at line 1605 of file memoryblock.cc.
References UnifyType::blank, BLANK, BOTTOM, container(), vector_set< memoryBlock * >::find(), vector_set< memoryBlock * >::insert(), name(), UnifyType::object, OBJECT, UnifyType::objTyp(), Unify_Object::p, Unify_Structure::p, Unify_Simple::p, Unify_Blank::p, Unify_Parents::parents(), UnifyType::simple, SIMPLE, UnifyType::structure, STRUCTURE, and unifyType().
Referenced by top_most_containers(). |
memoryDef* memoryBlock::current_def |
( |
|
) |
const [inline] |
|
|
Definition at line 384 of file memoryblock.h.
Referenced by procedureInfo::add_external_output(), apply_weak_update(), constantAnalyzer::at_assignment(), constantAnalyzer::at_conservative_procedure_call(), livenessAnalyzer::at_merge(), constantAnalyzer::at_merge(), constantAnalyzer::at_parameter_pass(), constantAnalyzer::at_self_assignment(), procedureInfo::check_merge_point(), livenessAnalyzer::collectDefs(), Pointers::nearest_def_at(), Pointers::print_memoryblock_def_set(), Pointers::process_local_changes(), Pointers::record_external_inputs_and_outputs(), and procedureInfo::setup_merge_point(). |
memoryUse* memoryBlock::current_use |
( |
|
) |
const [inline] |
|
declNode* memoryBlock::decl |
( |
|
) |
const [inline] |
|
|
Definition at line 364 of file memoryblock.h.
Referenced by add_to_flow_sensitive_list(), Pointers::assignment_operator(), dot(), Pointers::dot_operator(), UnificationBasedPtr::ecrDeref(), UnificationBasedPtr::ensure_struct_obj(), Pointers::eval(), memoryModel::generate_array_elements_for(), memoryModel::generate_su_field(), generate_su_field_name(), Pointers::is_allocation(), Pointers::is_deallocation(), Pointers::is_exit(), is_in_flow_sensitive_list(), Pointers::is_reallocation(), Pointers::is_va_arg(), Pointers::is_va_start(), ipConstantPropagation::lookup(), name(), Pointers::procedure_call(), constantAnalyzer::rebuild_flowvalue(), Pointers::record_external_inputs_and_outputs(), Pointers::self_assignment(), Pointers::star_operator(), top_most_container(), and top_most_containers(). |
|
Create a definition.
Create a def of the memoryBlock at the given location, if one doesn't already exist. Return the memoryDef object, and also set the current_def to this def.
Definition at line 167 of file memoryblock.cc.
References _current_def, _single_assignment, Location::BasicBlock, Defs, is_array(), is_flow_sensitive(), Location::kind(), orderedDefs::make_def_at(), name(), procLocation::proc(), Location::Procedure, setup_array_def(), Location::Statement, stmtLocation::stmt(), memoryAccess::where(), and write_protected().
Referenced by Pointers::assignment_operator(), at_allocation(), at_deallocation(), Pointers::conservative_procedure_call(), memoryModel::generate_array_elements_for(), memoryModel::initialize_struct(), Pointers::merge_operator(), and Pointers::self_assignment(). |
|
List of defs.
Return a list of all the defs of this object.
Definition at line 483 of file memoryblock.h.
Referenced by clear(). |
|
Definition at line 776 of file memoryblock.cc.
References _components, _local_to, component_map_p, decl(), declNode::decl_location(), FieldNames, Func, memoryModel::generate_su_field(), memoryBlock::FieldNameDB::get_field(), vector_set< memoryBlock * >::insert(), is_unify(), declNode::name(), name(), declNode::no_tdef_type(), declNode::PROC, Node::typ(), and memoryModel::unification().
Referenced by Pointers::dot_operator(), and memoryModel::initialize_struct(). |
string memoryBlock::generate_su_field_name |
( |
const string & |
field |
) |
const |
|
memoryBlock * memoryBlock::get_allocation_object |
( |
memoryModel & |
Memory |
) |
|
|
|
Get the allocation object.
Get the allocation object, creating it if necessary. This object is used to track the state of heap allocated objects (multiplicity analysis).
Definition at line 975 of file memoryblock.cc.
References _allocation_object, _container, _is_allocation_object, memoryModel::generate_su_field(), is_flow_sensitive(), is_unify(), name(), set_flow_insensitive(), set_flow_sensitive(), set_flow_sensitivity(), set_unify(), and pointerOptions::Unify_objects.
Referenced by Pointers::at_allocation(), Pointers::at_deallocation(), and Pointers::current_multiplicity(). |
memoryBlock * memoryBlock::get_array_element |
( |
|
) |
|
|
bool memoryBlock::is_allocation_object |
( |
|
) |
const [inline] |
|
bool memoryBlock::is_array |
( |
|
) |
const [inline] |
|
bool memoryBlock::is_array_element |
( |
|
) |
const [inline] |
|
bool memoryBlock::is_flow_sensitive |
( |
|
) |
const [inline] |
|
|
Definition at line 392 of file memoryblock.h.
References _flow_sensitive.
Referenced by Pointers::assignment_operator(), Pointers::at_allocation(), at_allocation(), Pointers::at_deallocation(), at_deallocation(), procedureInfo::check_merge_point(), Pointers::current_multiplicity(), def_at(), find_def_at(), find_use_at(), get_allocation_object(), last_def_at(), nearest_def_at(), Pointers::pass_one_external_input(), Pointers::pass_one_external_output(), Pointers::process_local_changes(), Pointers::process_merge_point(), Pointers::record_external_inputs_and_outputs(), reset_current_def_use(), Pointers::self_assignment(), set_current_def_use(), procedureInfo::setup_merge_point(), and use_at(). |
bool memoryBlock::is_heap_object |
( |
|
) |
const [inline] |
|
bool memoryBlock::is_in_flow_sensitive_list |
( |
flow_sensitive_set & |
flow_sensitive_objects |
) |
|
|
bool memoryBlock::is_indexed |
( |
|
) |
const [inline] |
|
bool memoryBlock::is_return_value |
( |
|
) |
const [inline] |
|
bool memoryBlock::is_single_assignment |
( |
|
) |
const [inline] |
|
bool memoryBlock::is_synthetic_decl |
( |
|
) |
const [inline] |
|
bool memoryBlock::is_unify |
( |
|
) |
const [inline] |
|
procNode* memoryBlock::local_to |
( |
|
) |
const [inline] |
|
|
Process a merge point.
When a merge point is actually encountered, this function returns the list of merge uses (inputs to the phi function), which will have been previously set up by the setup_merge_uses_at() method above. In addition, during the computation of def-use chains, this method finds the reaching def for each merge use (I believe that I've found a clever way to do this).
Definition at line 591 of file memoryblock.cc.
References basicblock_list, basicblockLocation::block(), cfg_edge_pair, basicblockNode::dfn(), orderedUses::make_merge_uses_at(), name(), pred_use_map, pred_use_map_cp, basicblockNode::preds(), basicblockLocation::proc_location(), use, and Uses.
Referenced by Pointers::process_merge_point(). |
string memoryBlock::name |
( |
|
) |
const |
|
|
Definition at line 1956 of file memoryblock.cc.
References _decl, _local_to, container(), procNode::decl(), decl(), declNode::decl_location(), is_array_element(), typeNode::is_ellipsis(), declNode::name(), procLocation::proc(), Location::procedure(), procLocation::stmt_location(), declNode::type(), and declNode::UNKNOWN.
Referenced by mergePoints::add_block_to_merge_point(), add_complicit_assignment(), add_destructive_assignment(), procedureInfo::add_external_input(), procedureInfo::add_external_output(), add_to_flow_sensitive_list(), add_to_non_unify_list(), Pointers::assignment_operator(), at_allocation(), Pointers::at_deallocation(), at_deallocation(), containers(), memoryModel::create_memory_object(), def_at(), livenessAnalyzer::determineLiveness(), dot(), Pointers::dot_operator(), memoryModel::generate_array_elements_for(), memoryModel::generate_su_field(), get_allocation_object(), memoryModel::initialize_struct(), is_in_flow_sensitive_list(), Pointers::merge_operator(), merge_uses_at(), Pointers::nearest_def_at(), Pointers::pass_external_outputs(), Pointers::pass_one_external_input(), Pointers::pass_one_external_output(), Pointers::pass_parameters(), print(), print_def_use(), Pointers::print_memoryblock_def_set(), Pointers::print_memorydef_set(), Pointers::procedure_call(), Pointers::process_local_changes(), constantAnalyzer::rebuild_flowvalue(), Pointers::record_external_inputs_and_outputs(), precisionAnalyzer::report(), Pointers::self_assignment(), set_unification(), procedureInfo::setup_merge_point(), Pointers::star_operator(), stats(), top_most_container(), top_most_containers(), UnificationBasedPtr::unify(), and use_at(). |
|
Find the nearest dominating def.
This requires a dominance-based search through the ordered defs list to determine the nearest dominating definition. It is guaranteed to be unique by the placement of the merge nodes (phi functions).
Definition at line 251 of file memoryblock.cc.
References _current_def, def, Defs, orderedDefs::find_strictly_dominating_def(), is_array(), is_flow_sensitive(), orderedDefs::make_def_at(), and setup_array_def().
Referenced by Pointers::nearest_def_at(), Pointers::pass_one_external_output(), reachable_blocks(), and procedureInfo::setup_merge_point(). |
void memoryBlock::print |
( |
ostream & |
o, |
|
|
Location * |
path, |
|
|
Output_mode |
mode = CURRENT_VALUE |
|
) |
const |
|
void memoryBlock::print_def_use |
( |
ostream & |
o |
) |
const |
|
|
Definition at line 1860 of file memoryblock.cc.
References _components, component_map_cp, Defs, memoryBlock::FieldNameDB::field_name(), FieldNames, name(), orderedUses::print(), orderedDefs::print(), and Uses.
Referenced by Pointers::assignment_operator(), Pointers::merge_operator(), and Pointers::nearest_def_at(). |
void memoryBlock::print_multiplicity |
( |
Multiplicity |
m, |
|
|
ostream & |
out |
|
) |
[static] |
|
|
Print multiplicity values.
Definition at line 1246 of file memoryblock.cc.
References Bounded, Deallocated, Error, Single, Top, Unallocated, and Unbounded.
Referenced by Pointers::assignment_operator(), at_allocation(), at_deallocation(), Pointers::merge_operator(), and Pointers::self_assignment(). |
void memoryBlock::prune_defs_uses |
( |
|
) |
|
|
void memoryBlock::reset_current_def_use |
( |
Location * |
unused |
) |
|
|
void memoryBlock::set_array_element |
( |
memoryBlock * |
element |
) |
|
|
void memoryBlock::set_current_def_use |
( |
Location * |
where |
) |
|
|
void memoryBlock::set_flow_insensitive |
( |
|
) |
[inline] |
|
void memoryBlock::set_flow_sensitive |
( |
|
) |
[inline] |
|
void memoryBlock::set_heap_object |
( |
stmtLocation * |
alloc_site |
) |
[inline] |
|
void memoryBlock::set_indexed |
( |
|
) |
[inline] |
|
bool memoryBlock::set_return_value |
( |
|
) |
[inline] |
|
void memoryBlock::set_unification |
( |
UnifyTypes & |
unify_types |
) |
|
|
void memoryBlock::set_unify |
( |
bool |
flag |
) |
[inline] |
|
void memoryBlock::set_write_protected |
( |
|
) |
[inline] |
|
void memoryBlock::stats |
( |
ostream & |
out, |
|
|
bool |
header, |
|
|
long int & |
global_defs, |
|
|
long int & |
global_merge_defs, |
|
|
long int & |
global_weak_defs, |
|
|
long int & |
global_uses, |
|
|
long int & |
global_merge_uses |
|
) |
|
|
void memoryBlock::stats |
( |
|
) |
[static] |
|
memoryBlock * memoryBlock::top_most_container |
( |
|
) |
|
|
|
Definition at line 1636 of file memoryblock.cc.
References container(), Node::coord(), procNode::decl(), decl(), declNode::decl_location(), declNode::ENUM, Func, vector_set< memoryBlock * >::insert(), is_allocation_object(), local_to(), declNode::name(), name(), typeNode::no_tdef_type(), declNode::no_tdef_type(), property, Ptr, Node::typ(), declNode::type(), and unifyType().
Referenced by Pointers::record_external_inputs_and_outputs(), and top_most_container(). |
void memoryBlock::unifyType |
( |
UnifyType * |
t |
) |
[inline] |
|
UnifyType* memoryBlock::unifyType |
( |
|
) |
const [inline] |
|
|
Definition at line 401 of file memoryblock.h.
Referenced by add_to_non_unify_list(), Pointers::assignment_operator(), clear(), containers(), memoryModel::create_memory_object(), Pointers::dot_operator(), memoryModel::generate_array_elements_for(), memoryModel::generate_su_field(), memoryModel::initialize_struct(), memoryModel::lookup_string_constant(), reset_current_def_use(), set_array_element(), set_unification(), UnificationBasedPtr::settype(), Pointers::star_operator(), top_most_container(), top_most_containers(), and ~memoryBlock(). |
void memoryBlock::update_def_use_chains |
( |
|
) |
|
|
|
Find the nearest interprocedural dominating def Create a use.
Create a use of the memoryBlock at the given location, if one doesn't already exist. Return the memoryUse object and set the current_use to the use.
Definition at line 333 of file memoryblock.cc.
References _current_use, def, is_array(), is_flow_sensitive(), orderedUses::make_use_at(), name(), setup_array_def(), and Uses.
Referenced by apply_weak_update(), Pointers::assignment_operator(), at_allocation(), at_deallocation(), Pointers::current_multiplicity(), Pointers::dot_operator(), memoryModel::generate_array_elements_for(), Pointers::generate_uses(), memoryModel::initialize_struct(), Pointers::pass_one_external_input(), Pointers::pass_one_external_output(), Pointers::self_assignment(), and Pointers::star_operator(). |
bool memoryBlock::write_protected |
( |
|
) |
const [inline] |
|
|
Definition at line 369 of file memoryblock.h.
References _write_protected.
Referenced by add_complicit_assignment(), Pointers::assignment_operator(), constantAnalyzer::at_assignment(), constantAnalyzer::at_conservative_procedure_call(), Pointers::at_deallocation(), constantAnalyzer::at_self_assignment(), livenessAnalyzer::collectDefs(), Pointers::conservative_procedure_call(), def_at(), Pointers::dot_operator(), Pointers::merge_operator(), Pointers::pass_one_external_input(), Pointers::record_external_inputs_and_outputs(), and Pointers::self_assignment(). |
Friends And Related Function Documentation
friend class memoryModel [friend]
|
|
ostream& operator<< |
( |
ostream & |
o, |
|
|
const memoryBlock & |
mb |
|
) |
[friend] |
|
Member Data Documentation
memoryBlock* memoryBlock::_allocation_object [private]
|
|
|
Initializer def Allocation object.
This is a pointer to a special memoryBlock that represents the allocation state of heap allocated objects. This object is used for the multiplicity analysis (which is a very sparse analysis problem).
Definition at line 273 of file memoryblock.h.
Referenced by allocation_object(), and get_allocation_object(). |
|
Name Heap allocation site.
For heap allocated objects, this field holds the statement that generate the allocation (typically malloc() or calloc()).
Definition at line 255 of file memoryblock.h. |
|
Complicit assignments.
This map is used by the precision monitor to record complicit assignments: where they occur and the objects that are responsible.
Definition at line 309 of file memoryblock.h.
Referenced by add_complicit_assignment(). |
REF memoryBlock* memoryBlock::_container [private]
|
|
REF memoryDef* memoryBlock::_current_def [private]
|
|
REF memoryUse* memoryBlock::_current_use [private]
|
|
|
Destructive assignments.
This map is used by the precision monitor to record destructive assignments: where they occur and the cause.
Definition at line 302 of file memoryblock.h.
Referenced by add_destructive_assignment(). |
int memoryBlock::_flow_sensitive [private]
|
|
|
Only def Only use Input to.
This set contains all the procedures for which this object is an external input. We need this list for flow-insensitive objects so that we can force reanalysis of those procedures.
Definition at line 295 of file memoryblock.h. |
int memoryBlock::_is_allocation_object [private]
|
|
int memoryBlock::_is_array [private]
|
|
int memoryBlock::_is_array_element [private]
|
|
|
Is array element.
This flag is set to true if this object represents the elements of a C array.
Definition at line 188 of file memoryblock.h.
Referenced by is_array_element(). |
int memoryBlock::_is_indexed [private]
|
|
|
Is indexed.
This flag is set to true for objects that are indexed (array elements) or any memory that is accessed by pointer arithmetic. Such objects represent more than one actual objects.
Definition at line 196 of file memoryblock.h.
Referenced by is_indexed(), and set_indexed(). |
int memoryBlock::_is_return_value [private]
|
|
procNode* memoryBlock::_local_to [private]
|
|
|
Parameter-assignments.
When this object is an input to a context-insensitive procedure, we merge its state from each of the possible call sites. This map keeps track of the reaching def for each callsite according to the procedure being called. If there is no reaching def, then the memoryDef pointer is null.
Definition at line 124 of file memoryblock.h.
Referenced by add_parameter_assignment(). |
int memoryBlock::_single_assignment [private]
|
|
|
Single assignment.
For flow-insensitive objects, record if there is only one assignment ever made to the object. This helps the adaptive algorithm avoid making too many variables flow sensitive.
Definition at line 227 of file memoryblock.h.
Referenced by def_at(), and is_single_assignment(). |
int memoryBlock::_synthetic_decl [private]
|
|
int memoryBlock::_unify [private]
|
|
|
Unification.
We can control unification on a per-object basis. When this flag is true this object can be unified with another object. The default will be determined by the memoryModel.
Definition at line 219 of file memoryblock.h.
Referenced by is_unify(), and set_unify(). |
int memoryBlock::_write_protected [private]
|
|
int memoryBlock::memoryblock_count = 0 [static]
|
|
enumPropertyAnn* memoryBlock::property
|
|
|
Property blocks.
Each regular memoryBlock has a vector of pointers to the property blocks.
Definition at line 331 of file memoryblock.h. |
|
Definition at line 112 of file memoryblock.h.
Referenced by clear(), def_uses(), find_use_at(), find_uses_at(), merge_uses_at(), print_def_use(), set_current_def_use(), setup_merge_uses_at(), stats(), update_def_use_chains(), and use_at(). |
The documentation for this class was generated from the following files:
|