Lines Matching refs:index2
299 // Returns true if heap_locations_[index1] and heap_locations_[index2] may alias.
300 bool MayAlias(size_t index1, size_t index2) const {
301 if (index1 < index2) {
302 return aliasing_matrix_.IsBitSet(AliasingMatrixPosition(index1, index2));
303 } else if (index1 > index2) {
304 return aliasing_matrix_.IsBitSet(AliasingMatrixPosition(index2, index1));
306 DCHECK(false) << "index1 and index2 are expected to be different";
361 // `index1` and `index2` are indices in the array of collected heap locations.
364 size_t AliasingMatrixPosition(size_t index1, size_t index2) const {
365 DCHECK(index2 > index1);
367 // It's (num_of_locations - 1) + ... + (num_of_locations - index1) + (index2 - index1 - 1).
368 return (number_of_locations * index1 - (1 + index1) * index1 / 2 + (index2 - index1 - 1));
372 size_t CheckedAliasingMatrixPosition(size_t index1, size_t index2, size_t position) {
373 size_t calculated_position = AliasingMatrixPosition(index1, index2);
379 bool ComputeMayAlias(size_t index1, size_t index2) const {
380 DCHECK_NE(index1, index2);
382 HeapLocation* loc2 = heap_locations_[index2];