29  29 
// B can point to. Constraints can handle copies, loads, and stores, and

30  30 
// address taking.

31  31 
//

32  
// The Offline constraint graph optimization portion includes offline variable

33  
// substitution algorithms intended to pointer and location equivalences.

34  
// Pointer equivalences are those pointers that will have the same pointsto

35  
// sets, and location equivalences are those variables that always appear

36  
// together in pointsto sets.⏎

 32 
// The offline constraint graph optimization portion includes offline variable⏎

 33 
// substitution algorithms intended to computer pointer and location

 34 
// equivalences. Pointer equivalences are those pointers that will have the

 35 
// same pointsto sets, and location equivalences are those variables that

 36 
// always appear together in pointsto sets.

37  37 
//

38  38 
// The inclusion constraint solving phase iteratively propagates the inclusion

39  39 
// constraints until a fixed point is reached. This is an O(N^3) algorithm.


136  136 
};

137  137 

138  138 
// Node class  This class is used to represent a node in the constraint

139  
// graph. Due to various optimizations, not always the case that there is a

140  
// mapping from a Node to a Value. In particular, we add artificial Node's

141  
// that represent the set of pointedto variables shared for each location

142  
// equivalent Node.⏎

 139 
// graph. Due to various optimizations, it is not always the case that⏎

 140 
// there is a mapping from a Node to a Value. In particular, we add

 141 
// artificial Node's that represent the set of pointedto variables shared

 142 
// for each location equivalent Node.

143  143 
struct Node {

144  144 
Value *Val;

145  145 
SparseBitVector<> *Edges;


159  159 
// Number of incoming edges, used during variable substitution to early

160  160 
// free the pointsto sets

161  161 
unsigned NumInEdges;

162  
// True if our ponitsto set is in the Set2PEClass map⏎

 162 
// True if our pointsto set is in the Set2PEClass map⏎

163  163 
bool StoredInHash;

164  
// True if our node has no indirect constraints (Complex or otherwise)⏎

 164 
// True if our node has no indirect constraints (complex or otherwise)⏎

165  165 
bool Direct;

166  166 
// True if the node is address taken, *or* it is part of a group of nodes

167  167 
// that must be kept together. This is set to true for functions and

168  168 
// their arg nodes, which must be kept at the same position relative to

169  169 
// their base function node.

170  
// kept at the same position relative to their base function node.

171  170 
bool AddressTaken;

172  171 

173  172 
// Nodes in cycles (or in equivalence classes) are united together using a
