Polaris: ArcSpec.h Source File

ArcSpec.h

Go to the documentation of this file.
00001 #ifndef ARC_SPECIPICATION_H
00002 #define ARC_SPECIPICATION_H
00003 ///
00004 /// Defintion of the size of each field in an arc in a compacted form.
00005 /// Assumption: size(Arc_type) is a byte 
00006 ///
00007 #define A_BYTE      8      /// in bits
00008 #define Bytes(bits) (bits/8+1)   /// For the last bit(0) marking the arc ending
00009 ///#define Valid_low_bound(pos) pos < 0 ? 0 : 1
00010 ///#define Valid_high_bound(pos)    pos < A_BYTE ? 1 : 0
00011 ///#define Invalidate(pos)      pos = -1
00012 ///
00013 ///
00014 /// Every arc starts with a bit of active field
00015 ///
00016 #define ARC_ACTIVE      (Arc_type)'\x80'
00017 ///
00018 ///
00019 /// Arc DV field includes a flag marking the new DV field, dependence decision,
00020 /// dependence direction, dependence type, a direction vector 
00021 ///
00022 #define ARC_1_BIT       (Arc_type)'\x80'
00023 #define ARC_2_BIT       (Arc_type)'\xc0'
00024 #define ARC_3_BIT       (Arc_type)'\xe0'
00025 #define ARC_8_BIT       (Arc_type)'\xff'
00026 ///
00027 ///
00028 /// Number of bits
00029 ///
00030 #define ONE_BIT     1
00031 #define TWO_BIT     2
00032 #define THREE_BIT   3
00033 #define EIGHT_BIT   8
00034 ///
00035 ///
00036 /// Offset of each field from the beginning of this DV field
00037 ///
00038 #define DVF_DDECI   0
00039 #define DVF_DDIREC  1
00040 #define DVF_DTYPE   2
00041 #define DVF_DIREC   4
00042 #define DVF_DDIST   7
00043 ///
00044 ///
00045 /// Extra constants
00046 ///
00047 #define CONST_BITS  8   /// New mark, Dep_Deci, Dep_Direc, Dep_type, End mark
00048 #define NUM_OF_PTRS 4   /// target_stmt, target_expr, label, next_arc
00049 ///
00050 ///
00051 /// Assumed & Proved dependence
00052 ///
00053 enum DEP_DECISION { _ASSUMED = 0,
00054             _PROVED = ARC_1_BIT,
00055             _INDEP };
00056 ///
00057 ///
00058 /// Normal/Reverse dependence direction (hidden from outside)
00059 ///
00060 enum DEP_DIREC { _NORMAL = 0,
00061          _REVERSE = ARC_1_BIT };
00062 ///
00063 ///
00064 /// Dependence types: DVfield with a NULL direction vector is assumed to have
00065 ///          an UNKNOWN dependence type.  _UNKNOWN won't be ever stored
00066 ///          in the arc, but stored in ActiveArc for user access.
00067 ///
00068 enum DEP_TYPE { _FLOW = 0,
00069         _ANTI = (Arc_type)'\x40', 
00070         _INPUT = ARC_1_BIT, 
00071         _OUTPUT = ARC_2_BIT,
00072         _UNKNOWN };
00073 ///
00074 ///
00075 /// Direction type: Element of direction vector
00076 ///
00077 enum DIREC_TYPE { _DELIM = 0,
00078           _EQ = (Arc_type)'\x20',
00079           _GT = (Arc_type)'\x40',
00080           _GE = (Arc_type)'\x60',
00081           _LT = ARC_1_BIT,
00082           _LE = (Arc_type)'\xa0',
00083           _NEQ = ARC_2_BIT,
00084           _STAR = ARC_3_BIT };
00085 ///
00086 /// Distance type: Element of direction vector
00087 ///
00088 typedef signed char DDIST_TYPE;
00089 #define INV_DDIST -128
00090 ///
00091 /// Position offset used to traverse the arc ranging from 0 to 7
00092 ///
00093 ///
00094 #endif
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:05:37 2005