forked from OSchip/llvm-project
parent
1b2156fcae
commit
c82c9f078a
|
|
@ -286,6 +286,7 @@ public:
|
||||||
}
|
}
|
||||||
BecameZero = allzero;
|
BecameZero = allzero;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a hash value for this element;
|
// Get a hash value for this element;
|
||||||
uint64_t getHashValue() const {
|
uint64_t getHashValue() const {
|
||||||
uint64_t HashVal = 0;
|
uint64_t HashVal = 0;
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,11 @@
|
||||||
// B can point to. Constraints can handle copies, loads, and stores, and
|
// B can point to. Constraints can handle copies, loads, and stores, and
|
||||||
// address taking.
|
// address taking.
|
||||||
//
|
//
|
||||||
// The Offline constraint graph optimization portion includes offline variable
|
// The offline constraint graph optimization portion includes offline variable
|
||||||
// substitution algorithms intended to pointer and location equivalences.
|
// substitution algorithms intended to computer pointer and location
|
||||||
// Pointer equivalences are those pointers that will have the same points-to
|
// equivalences. Pointer equivalences are those pointers that will have the
|
||||||
// sets, and location equivalences are those variables that always appear
|
// same points-to sets, and location equivalences are those variables that
|
||||||
// together in points-to sets.
|
// always appear together in points-to sets.
|
||||||
//
|
//
|
||||||
// The inclusion constraint solving phase iteratively propagates the inclusion
|
// The inclusion constraint solving phase iteratively propagates the inclusion
|
||||||
// constraints until a fixed point is reached. This is an O(N^3) algorithm.
|
// constraints until a fixed point is reached. This is an O(N^3) algorithm.
|
||||||
|
|
@ -137,10 +137,10 @@ namespace {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Node class - This class is used to represent a node in the constraint
|
// Node class - This class is used to represent a node in the constraint
|
||||||
// graph. Due to various optimizations, not always the case that there is a
|
// graph. Due to various optimizations, it is not always the case that
|
||||||
// mapping from a Node to a Value. In particular, we add artificial Node's
|
// there is a mapping from a Node to a Value. In particular, we add
|
||||||
// that represent the set of pointed-to variables shared for each location
|
// artificial Node's that represent the set of pointed-to variables shared
|
||||||
// equivalent Node.
|
// for each location equivalent Node.
|
||||||
struct Node {
|
struct Node {
|
||||||
Value *Val;
|
Value *Val;
|
||||||
SparseBitVector<> *Edges;
|
SparseBitVector<> *Edges;
|
||||||
|
|
@ -160,15 +160,14 @@ namespace {
|
||||||
// Number of incoming edges, used during variable substitution to early
|
// Number of incoming edges, used during variable substitution to early
|
||||||
// free the points-to sets
|
// free the points-to sets
|
||||||
unsigned NumInEdges;
|
unsigned NumInEdges;
|
||||||
// True if our ponits-to set is in the Set2PEClass map
|
// True if our points-to set is in the Set2PEClass map
|
||||||
bool StoredInHash;
|
bool StoredInHash;
|
||||||
// True if our node has no indirect constraints (Complex or otherwise)
|
// True if our node has no indirect constraints (complex or otherwise)
|
||||||
bool Direct;
|
bool Direct;
|
||||||
// True if the node is address taken, *or* it is part of a group of nodes
|
// True if the node is address taken, *or* it is part of a group of nodes
|
||||||
// that must be kept together. This is set to true for functions and
|
// that must be kept together. This is set to true for functions and
|
||||||
// their arg nodes, which must be kept at the same position relative to
|
// their arg nodes, which must be kept at the same position relative to
|
||||||
// their base function node.
|
// their base function node.
|
||||||
// kept at the same position relative to their base function node.
|
|
||||||
bool AddressTaken;
|
bool AddressTaken;
|
||||||
|
|
||||||
// Nodes in cycles (or in equivalence classes) are united together using a
|
// Nodes in cycles (or in equivalence classes) are united together using a
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue