Changeset 4008 in CLRX


Ignore:
Timestamp:
Apr 17, 2018, 7:14:08 AM (4 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: Rewrite Liveness::expand method (allow to expand every regions in the liveness).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/AsmRegAlloc.cpp

    r4007 r4008  
    773773    void expand(size_t k)
    774774    {
    775         std::map<size_t, size_t>::iterator it;
    776         if (l.empty())
    777             it = l.insert(std::make_pair(k, k+1)).first;
    778         else
    779         {
    780             it = l.end();
     775        auto it = l.lower_bound(k);
     776        if (it != l.begin())
    781777            --it;
    782             it->second = k+1;
    783         }
     778        else // do nothing
     779            return;
     780        if (it->first <= k && it->second > k)
     781            // we need expand previous region to this
     782            --it;
     783        it->second = k+1;
    784784        join(it);
    785785    }
Note: See TracChangeset for help on using the changeset viewer.