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  

pointerValue Class Reference

Pointer value class. More...

#include <pointervalue.h>

List of all members.

Public Member Functions

 pointerValue ()
 Defaut constructor.

 pointerValue (memoryBlock *mb, bool is_address=false)
 Single memory block constructor.

 pointerValue (const pointerValue &other)
 Copy constructor.

 ~pointerValue ()
 Destructor.

void copy_pointers_from (const pointerValue &other)
 Copy pointers.

void initialize_pointers ()
 Reinitialize the value.

void add_blocks_from (const pointerValue &other)
 Add blocks from another pointer.

bool is_lvalue ()
 Is assignable?


Public Attributes

memoryblock_set blocks
 Memory blocks.

const constantconstant_value
 Constant value.

bool is_address
 Is address?

bool is_a_use
 Is a use?

memoryblock_set dereferenced
 Dereferenced pointers.


Static Public Attributes

int count = 0


Detailed Description

Pointer value class.

This class holds a temporary pointer value, which consists of a set of target memory blocks, and a boolean that indicates whether it's an "address-of" pointer. We need this because expressions such as "&y" don't have storage associated with them.

Definition at line 59 of file pointervalue.h.


Constructor & Destructor Documentation

pointerValue::pointerValue  
 

Defaut constructor.

Definition at line 49 of file pointervalue.cc.

References count.

pointerValue::pointerValue memoryBlock   mb,
bool    is_address = false
 

Single memory block constructor.

Definition at line 60 of file pointervalue.cc.

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

pointerValue::pointerValue const pointerValue &    other
 

Copy constructor.

Definition at line 74 of file pointervalue.cc.

References count.

pointerValue::~pointerValue  
 

Destructor.

Definition at line 85 of file pointervalue.cc.

References count.


Member Function Documentation

void pointerValue::add_blocks_from const pointerValue &    other [inline]
 

Add blocks from another pointer.

Definition at line 137 of file pointervalue.h.

References blocks, dereferenced, vector_set< memoryBlock * >::insert(), and is_address.

Referenced by Pointers::eval().

void pointerValue::copy_pointers_from const pointerValue &    other [inline]
 

Copy pointers.

Definition at line 121 of file pointervalue.h.

References blocks, dereferenced, and is_address.

Referenced by Pointers::determine_call_targets(), Pointers::eval(), and Pointers::star_operator().

void pointerValue::initialize_pointers   [inline]
 

Reinitialize the value.

Definition at line 129 of file pointervalue.h.

Referenced by Pointers::analyze_procedure().

bool pointerValue::is_lvalue   [inline]
 

Is assignable?

Is the given pointerValue an L-value

Definition at line 148 of file pointervalue.h.


Member Data Documentation

memoryblock_set pointerValue::blocks
 

Memory blocks.

The objects that make up the "value" of the pointer analysis lattice element.

Definition at line 72 of file pointervalue.h.

Referenced by add_blocks_from(), Pointers::analyze_procedure_at(), Pointers::assignment_operator(), Pointers::at_allocation(), constantAnalyzer::at_assignment(), Pointers::at_deallocation(), constantAnalyzer::at_parameter_pass(), Pointers::call_operator(), livenessAnalyzer::collectDefs(), Pointers::conservative_procedure_call(), copy_pointers_from(), Pointers::determine_call_targets(), Pointers::dot_operator(), Pointers::eval(), Pointers::generate_uses(), Pointers::is_allocation(), Pointers::is_deallocation(), Pointers::is_exit(), Pointers::is_reallocation(), Pointers::is_va_arg(), Pointers::is_va_start(), pointerValue(), Pointers::procedure_call(), constantAnalyzer::rebuild_flowvalue(), precisionAnalyzer::record(), and Pointers::star_operator().

const constant* pointerValue::constant_value
 

Constant value.

For constant propagation and constant folding

Definition at line 78 of file pointervalue.h.

Referenced by Pointers::analyze_procedure(), Pointers::assignment_operator(), constantAnalyzer::at_address(), constantAnalyzer::at_assignment(), constantAnalyzer::at_basicblock_entry(), constantAnalyzer::at_binary(), constantAnalyzer::at_cast(), constantAnalyzer::at_const(), constantAnalyzer::at_dereference(), constantAnalyzer::at_field_access(), constantAnalyzer::at_id(), constantAnalyzer::at_index(), constantAnalyzer::at_parameter_pass(), constantAnalyzer::at_return(), constantAnalyzer::at_stmt_entry(), constantAnalyzer::at_unary(), and Pointers::eval().

int pointerValue::count = 0 [static]
 

Definition at line 47 of file pointervalue.cc.

Referenced by pointerValue(), Pointers::stats(), and ~pointerValue().

memoryblock_set pointerValue::dereferenced
 

Dereferenced pointers.

Keep a list of the pointers that are dereferenced in order to get this value.

Definition at line 97 of file pointervalue.h.

Referenced by add_blocks_from(), Pointers::assignment_operator(), copy_pointers_from(), Pointers::dot_operator(), and Pointers::star_operator().

bool pointerValue::is_a_use
 

Is a use?

True if the objects will be used.

Definition at line 90 of file pointervalue.h.

Referenced by Pointers::analyze_procedure(), constantAnalyzer::at_binary(), constantAnalyzer::at_cast(), constantAnalyzer::at_dereference(), constantAnalyzer::at_field_access(), constantAnalyzer::at_id(), constantAnalyzer::at_index(), constantAnalyzer::at_unary(), Pointers::call_operator(), Pointers::eval(), and Pointers::pass_return_value().

bool pointerValue::is_address
 

Is address?

True if this represents the address of the memory blocks.

Definition at line 84 of file pointervalue.h.

Referenced by add_blocks_from(), Pointers::assignment_operator(), Pointers::at_allocation(), constantAnalyzer::at_parameter_pass(), Pointers::conservative_procedure_call(), copy_pointers_from(), Pointers::determine_call_targets(), Pointers::dot_operator(), Pointers::eval(), Pointers::generate_uses(), Pointers::procedure_call(), constantAnalyzer::rebuild_flowvalue(), precisionAnalyzer::record(), Pointers::setup_va_list_variables(), and Pointers::star_operator().


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

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