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  

ipConstant Class Reference

A single constant value associated with one def of a variable. More...

#include <ipconstants.h>

Inheritance diagram for ipConstant:

analysisVal List of all members.

Public Member Functions

void intern ()
void assign (const ipConstant *other)
virtual bool diff (analysisVal *other) const
 Comparison.

virtual void meet_with (const analysisVal *other)
 Meet "^" operator.

virtual void binary_operator (const Operator *op, const analysisVal *right_operand)
virtual void unary_operator (const Operator *op)
virtual void cast_operator (const typeNode *type)
void print (ostream &o)
 Output.

virtual analysisValclone () const=0

Private Member Functions

 ipConstant (constant &value)
 ipConstant ()
 ipConstant (const ipConstant &other)
virtual ~ipConstant ()
void to_bottom ()
bool is_top () const
bool is_bottom () const
const constantvalue () const
constantvalue ()

Private Attributes

constant _value
bool _top
bool _internal

Friends

class ipConstantPropagation
class ipConstantsChanger

Detailed Description

A single constant value associated with one def of a variable.

This class represents a single constant value associated with one def of a variable. It can hold either a constant value, or have the special lattice TOP value. The lattice BOTTOM is represented by a constant no_val (which is built into the constant class).

Definition at line 55 of file ipconstants.h.


Constructor & Destructor Documentation

ipConstant::ipConstant constant   value [private]
 

Definition at line 52 of file ipconstants.cc.

ipConstant::ipConstant   [private]
 

Definition at line 58 of file ipconstants.cc.

ipConstant::ipConstant const ipConstant &    other [private]
 

Definition at line 64 of file ipconstants.cc.

ipConstant::~ipConstant   [private, virtual]
 

Definition at line 70 of file ipconstants.cc.


Member Function Documentation

void ipConstant::assign const ipConstant *    other
 

Definition at line 96 of file ipconstants.cc.

References _top, and _value.

Referenced by ipConstantPropagation::assignment().

virtual analysisVal* analysisVal::clone   const [pure virtual, inherited]
 

bool ipConstant::diff analysisVal   other const [virtual]
 

Comparison.

Definition at line 104 of file ipconstants.cc.

References is_bottom(), constant::is_equal_to(), is_top(), and value().

Referenced by ipConstantPropagation::assignment().

void ipConstant::intern   [inline]
 

Definition at line 87 of file ipconstants.h.

Referenced by ipConstantPropagation::assignment().

void ipConstant::meet_with const analysisVal   other [virtual]
 

Meet "^" operator.

Must satisfy the following:

  • Associative: x ^ (y ^ z) = (x ^ y) ^ z
  • Commutative: x ^ y = y ^ x
  • Idempotent: x ^ x = x

Definition at line 123 of file ipconstants.cc.

References _top, is_bottom(), constant::is_equal_to(), is_top(), to_bottom(), and value().

void ipConstant::print ostream &    o
 

Output.

Definition at line 214 of file ipconstants.cc.

References is_bottom(), is_top(), constant::to_string(), and value().

Referenced by ipConstantPropagation::stats().


Friends And Related Function Documentation

friend class ipConstantPropagation [friend]
 

Definition at line 57 of file ipconstants.h.

friend class ipConstantsChanger [friend]
 

Definition at line 58 of file ipconstants.h.


Member Data Documentation

bool ipConstant::_internal [private]
 

Definition at line 64 of file ipconstants.h.

bool ipConstant::_top [private]
 

Definition at line 63 of file ipconstants.h.

Referenced by assign(), is_top(), meet_with(), and to_bottom().

constant ipConstant::_value [private]
 

Definition at line 62 of file ipconstants.h.

Referenced by assign(), is_bottom(), is_top(), and to_bottom().


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

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