Lines Matching defs:position

102  * A use position represents a live interval use at a given position.
109 size_t position,
114 position_(position),
236 size_t position = instruction->GetLifetimePosition();
238 instruction, /* environment */ nullptr, temp_index, position, first_use_);
239 AddRange(position, position + 1);
244 // is specified, the use will be recorded at `actual_user`'s lifetime position.
257 size_t position = actual_user->GetLifetimePosition() + 1;
265 position = actual_user->GetLifetimePosition();
277 && (first_use_->GetPosition() < position)) {
282 while ((cursor->GetNext() != nullptr) && (cursor->GetNext()->GetPosition() < position)) {
285 DCHECK(first_use_->GetPosition() + 1 == position);
287 instruction, nullptr /* environment */, input_index, position, cursor->GetNext());
290 first_range_->end_ = position;
297 nullptr /* instruction */, environment, input_index, position, first_env_use_);
300 instruction, nullptr /* environment */, input_index, position, first_use_);
313 new (allocator_) LiveRange(start_block_position, position, nullptr);
318 // `first_range_` is before the given `position`.
319 DCHECK_LE(position, first_range_->GetEnd());
321 DCHECK(first_range_->GetStart() > position);
329 new (allocator_) LiveRange(start_block_position, position, first_range_);
420 bool IsDeadAt(size_t position) const {
421 return GetEnd() <= position;
424 bool IsDefinedAt(size_t position) const {
425 return GetStart() <= position && !IsDeadAt(position);
428 // Returns true if the interval contains a LiveRange covering `position`.
429 // The range at or immediately after the current position of linear scan
430 // is cached for better performance. If `position` can be smaller than
432 bool Covers(size_t position) {
433 LiveRange* candidate = FindRangeAtOrAfter(position, range_search_start_);
435 return (candidate != nullptr && candidate->GetStart() <= position);
439 bool CoversSlow(size_t position) const {
440 LiveRange* candidate = FindRangeAtOrAfter(position, first_range_);
441 return candidate != nullptr && candidate->GetStart() <= position;
484 size_t FirstRegisterUseAfter(size_t position) const {
486 return position == GetStart() ? position : kNoLifetime;
489 if (IsDefiningPosition(position) && DefinitionRequiresRegister()) {
490 return position;
497 if (use_position > position) {
511 size_t FirstUseAfter(size_t position) const {
513 return position == GetStart() ? position : kNoLifetime;
516 if (IsDefiningPosition(position)) {
518 return position;
525 if (use_position > position) {
558 SafepointPosition* FindSafepointJustBefore(size_t position) const {
562 if (safepoint->GetPosition() >= position) return previous;
568 * Split this interval at `position`. This interval is changed to:
569 * [start ... position).
572 * [position ... end)
574 LiveInterval* SplitAt(size_t position) {
577 DCHECK_GT(position, GetStart());
579 if (GetEnd() <= position) {
580 // This range dies before `position`, no need to split.
585 SafepointPosition* new_last_safepoint = FindSafepointJustBefore(position);
606 // Iterate over the ranges, and either find a range that covers this position, or
607 // two ranges in between this position (that is, the position is in a lifetime hole).
609 if (position >= current->GetEnd()) {
613 } else if (position <= current->GetStart()) {
614 // If the previous range did not cover this position, we know position is in
631 // This range covers position. We create a new last_range_ for this interval
632 // that covers last_range_->Start() and position. We also shorten the current
634 DCHECK(position < current->GetEnd() && position > current->GetStart());
636 last_range_ = new (allocator_) LiveRange(current->start_, position, nullptr);
643 current->start_ = position;
726 // Returns the location of the interval following its siblings at `position`.
727 Location GetLocationAt(size_t position);
729 // Finds the sibling that is defined at `position`.
730 LiveInterval* GetSiblingAt(size_t position);
903 // Searches for a LiveRange that either covers the given position or is the
905 // known to end before `position` can be skipped with `search_start`.
906 LiveRange* FindRangeAtOrAfter(size_t position, LiveRange* search_start) const {
912 DCHECK(IsDeadAt(position));
913 } else if (search_start->GetStart() > position) {
914 DCHECK_EQ(search_start, FindRangeAtOrAfter(position, first_range_));
921 range != nullptr && range->GetEnd() <= position;
933 // of the instruction requires a register, we return the position of that instruction
955 bool IsDefiningPosition(size_t position) const {
956 return IsParent() && (position == GetStart());
959 bool HasSynthesizeUseAt(size_t position) const {
963 if ((use_position == position) && use->IsSynthesized()) {
966 if (use_position > position) break;
1077 // The first range at or after the current position of a linear scan. It is