1895 {
1896 if (
Start() == split_pos)
return this;
1897
1899 if (interval == nullptr) {
1902 }
1903
1905
1906
1907
1908 if (split_pos <= interval->
start()) interval = first_use_interval_;
1909
1910 UseInterval* last_before_split = nullptr;
1911 while (interval->end() <= split_pos) {
1912 last_before_split = interval;
1913 interval = interval->
next();
1914 }
1915
1916 const bool split_at_start = (interval->start() == split_pos);
1917
1918 UseInterval* first_after_split = interval;
1919 if (!split_at_start && interval->Contains(split_pos)) {
1920 first_after_split =
1921 new UseInterval(split_pos, interval->end(), interval->next());
1922 interval->end_ = split_pos;
1923 interval->next_ = first_after_split;
1924 last_before_split = interval;
1925 }
1926
1927 ASSERT(last_before_split !=
nullptr);
1928 ASSERT(last_before_split->next() == first_after_split);
1929 ASSERT(last_before_split->end() <= split_pos);
1931
1932 UsePosition* first_use_after_split =
1934
1935 SafepointPosition* first_safepoint_after_split =
1937
1939 ? first_after_split
1940 : last_use_interval_;
1943 first_safepoint_after_split, next_sibling_);
1944
1946 next_sibling_->
Start(), next_sibling_->
End()));
1947
1948 last_use_interval_ = last_before_split;
1949 last_use_interval_->next_ = nullptr;
1950
1951 if (first_use_after_split != nullptr) {
1953 }
1954
1955 return next_sibling_;
1956}
void Initialize(LiveRange *range)
void UpdateAfterSplit(intptr_t first_use_after_split_pos)
UseInterval * first_pending_use_interval() const
Representation representation() const
LiveRange(intptr_t vreg, Representation rep)
#define TRACE_ALLOC(statement)
PositionType * SplitListOfPositions(PositionType **head, intptr_t split_pos, bool split_at_start)