C-Breeze
C Compiler Infrastructure

[ Project home page]
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

memoryDef Class Reference

#include <memoryaccess.h>

Inheritance diagram for memoryDef:

memoryAccess PerClassHeap< PointersHeap > List of all members.

Public Types

enum  WeakReason { MultipleLHS, HighMultiplicity, Forced }

Public Member Functions

 memoryDef (Location *where, memoryBlock *owner)
 ~memoryDef ()
const memoryblock_setpoints_to () const
const constantvalue () const
void set_value (const constant *newval)
memoryUseself_assign_use () const
void set_self_assign_use (memoryUse *new_use)
void add_pointers (const memoryblock_set &mbs)
 Add pointers.

void clear_points_to ()
 Clear the points-to set.

void print (ostream &o) const
Locationwhere () const
bool is_weak () const
void set_weak (bool is)
Multiplicity multiplicity () const
void set_multiplicity (Multiplicity lin)
bool search_for_def () const
void search_for_def (bool val)
bool is_active () const
void set_active ()
void set_inactive ()
memoryBlockowner () const

Static Public Member Functions

void stats ()

Static Public Attributes

bool Verbose = false
unsigned int def_count = 0
unsigned int use_count = 0
unsigned int merge_use_count = 0

Private Attributes

memoryblock_set _points_to
 Uses of this def The points-to set at this def.

const constant_value
 The previous reaching definition Constant value.

memoryUse_self_assign_use
 Self-assign use.


Member Enumeration Documentation

enum memoryAccess::WeakReason [inherited]
 

Enumeration values:
MultipleLHS 
HighMultiplicity 
Forced 

Definition at line 174 of file memoryaccess.h.


Constructor & Destructor Documentation

memoryDef::memoryDef Location   where,
memoryBlock   owner
 

Definition at line 79 of file memoryaccess.cc.

References memoryAccess::def_count.

memoryDef::~memoryDef  
 

Definition at line 92 of file memoryaccess.cc.

References memoryAccess::def_count.


Member Function Documentation

void memoryDef::add_pointers const memoryblock_set   mbs
 

Add pointers.

Add pointer values into the points-to set for this def.

Definition at line 99 of file memoryaccess.cc.

References _points_to, and vector_set< memoryBlock * >::insert().

Referenced by memoryBlock::apply_weak_update(), Pointers::assignment_operator(), and memoryBlock::setup_array_def().

void memoryDef::clear_points_to  
 

Clear the points-to set.

Remove all the previous values. This is usually done as part of a strong update.

Definition at line 104 of file memoryaccess.cc.

References _points_to.

bool memoryAccess::is_active   const [inline, inherited]
 

Definition at line 230 of file memoryaccess.h.

References memoryAccess::_active.

bool memoryAccess::is_weak   const [inline, inherited]
 

Definition at line 219 of file memoryaccess.h.

References memoryAccess::_is_weak.

Referenced by procedureInfo::add_external_output(), and Pointers::assignment_operator().

Multiplicity memoryAccess::multiplicity   const [inline, inherited]
 

Definition at line 224 of file memoryaccess.h.

References memoryAccess::_multiplicity, and Multiplicity.

Referenced by memoryBlock::at_allocation(), memoryBlock::at_deallocation(), Pointers::current_multiplicity(), Pointers::merge_operator(), and Pointers::self_assignment().

memoryBlock* memoryAccess::owner   const [inline, inherited]
 

Definition at line 239 of file memoryaccess.h.

const memoryblock_set& memoryDef::points_to   const [inline]
 

Definition at line 299 of file memoryaccess.h.

References memoryblock_set.

Referenced by memoryBlock::apply_weak_update(), Pointers::assignment_operator(), Pointers::conservative_procedure_call(), memoryModel::generate_array_elements_for(), memoryModel::initialize_struct(), Pointers::merge_operator(), and Pointers::self_assignment().

void memoryDef::print ostream &    o const
 

Definition at line 111 of file memoryaccess.cc.

References memoryAccess::where().

Referenced by Pointers::assignment_operator(), and memoryUse::print().

void memoryAccess::search_for_def bool    val [inline, inherited]
 

Definition at line 228 of file memoryaccess.h.

References memoryAccess::_search_for_def.

bool memoryAccess::search_for_def   const [inline, inherited]
 

Definition at line 227 of file memoryaccess.h.

References memoryAccess::_search_for_def.

memoryUse* memoryDef::self_assign_use   const [inline]
 

Definition at line 309 of file memoryaccess.h.

void memoryAccess::set_active   [inline, inherited]
 

Definition at line 231 of file memoryaccess.h.

References memoryAccess::_active.

void memoryAccess::set_inactive   [inline, inherited]
 

Definition at line 232 of file memoryaccess.h.

References memoryAccess::_active.

void memoryAccess::set_multiplicity Multiplicity    lin [inline, inherited]
 

Definition at line 225 of file memoryaccess.h.

References memoryAccess::_multiplicity.

void memoryDef::set_self_assign_use memoryUse   new_use [inline]
 

Definition at line 310 of file memoryaccess.h.

void memoryDef::set_value const constant   newval [inline]
 

Definition at line 305 of file memoryaccess.h.

void memoryAccess::set_weak bool    is [inline, inherited]
 

Definition at line 220 of file memoryaccess.h.

References memoryAccess::_is_weak.

Referenced by memoryBlock::apply_weak_update().

void memoryAccess::stats   [static, inherited]
 

Definition at line 62 of file memoryaccess.cc.

References memoryAccess::def_count, and memoryAccess::use_count.

Referenced by pointers_phase::run().

const constant* memoryDef::value   const [inline]
 

Definition at line 304 of file memoryaccess.h.

Location* memoryAccess::where   const [inline, inherited]
 

Definition at line 217 of file memoryaccess.h.

Referenced by Pointers::assignment_operator(), memoryBlock::def_at(), memoryUse::print(), print(), memoryUse::reaching_def(), Pointers::record_external_inputs_and_outputs(), and memoryBlock::setup_merge_uses_at().


Member Data Documentation

memoryblock_set memoryDef::_points_to [private]
 

Uses of this def The points-to set at this def.

Definition at line 267 of file memoryaccess.h.

Referenced by add_pointers(), and clear_points_to().

memoryUse* memoryDef::_self_assign_use [private]
 

Self-assign use.

For defs caused by self-assignments, point back to the use because it might be at a different location. For example, in the case of external outputs the use is at the return statement and the def is at the call site.

Definition at line 284 of file memoryaccess.h.

const constant* memoryDef::_value [private]
 

The previous reaching definition Constant value.

Definition at line 275 of file memoryaccess.h.

unsigned int memoryAccess::def_count = 0 [static, inherited]
 

Definition at line 49 of file memoryaccess.cc.

Referenced by Pointers::analyze_procedure_at(), memoryDef(), memoryAccess::stats(), and ~memoryDef().

unsigned int memoryAccess::merge_use_count = 0 [static, inherited]
 

Definition at line 51 of file memoryaccess.cc.

unsigned int memoryAccess::use_count = 0 [static, inherited]
 

Definition at line 50 of file memoryaccess.cc.

Referenced by memoryUse::memoryUse(), memoryAccess::stats(), and memoryUse::~memoryUse().

bool memoryAccess::Verbose = false [static, inherited]
 

Definition at line 48 of file memoryaccess.cc.


The documentation for this class was generated from the following files:

Generated on August 27, 2003
Back to the C-Breeze home page