46 if (pair.first == 0 || pair.second == 0)
57 NodeID newStride =
gcd(pair.second, existStride);
58 if (newStride != existStride)
78 assert(indices.size() == pairVec.size() &&
"vector size not match");
81 bool reachUpperBound =
true;
82 for (
u32_t i = 0; i < indices.size(); i++)
84 assert(pairVec[i].first > 0 &&
"number must be greater than 0");
85 if (indices[i] < (pairVec[i].first - 1))
86 reachUpperBound =
false;
90 bool increased =
false;
91 if (reachUpperBound ==
false)
94 while (increased ==
false)
96 if (indices[i] < (pairVec[i].first - 1))
125 std::vector<NodeID> indices;
126 u32_t size = lhsVec.size();
129 indices.push_back(0);
137 while (i < lhsVec.size())
139 ofst += (lhsVec[i].second * indices[i]);
PointsTo computeAllLocations() const
Compute all possible locations according to offset and number-stride pairs.
FieldInfo::ElemNumStridePairVec ElemNumStridePairVec
static const llvm::cl::opt< bool > SingleStride
bool isConstantOffset() const
Return TRUE if this is a constant location set.
bool increaseIfNotReachUpperBound(std::vector< NodeID > &indices, const ElemNumStridePairVec &pairVec) const
Return TRUE if successfully increased any index by 1.
void addElemNumStridePair(const NodePair &pair)
unsigned gcd(unsigned n1, unsigned n2) const
Return greatest common divisor.
static u32_t getMaxFieldLimit()
Size_t getOffset() const
Get methods.
const ElemNumStridePairVec & getNumStridePair() const
std::pair< NodeID, NodeID > NodePair
ElemNumStridePairVec numStridePair
element number and stride pair