Changeset 3852 in CLRX


Ignore:
Timestamp:
Feb 25, 2018, 4:17:46 PM (14 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: further applying VectorSet? in AsmRegAlloc?.

File:
1 edited

Legend:

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

    r3851 r3852  
    10431043        {
    10441044            // if not inserted
    1045             std::vector<size_t>& ssaIds = res.first->second;
    1046             auto ssaIdIt = ssaIds.end();
     1045            VectorSet<size_t>& ssaIds = res.first->second;
    10471046            if (sinfo.readBeforeWrite)
    1048                 ssaIdIt = std::find(ssaIds.begin(), ssaIds.end(),
    1049                         sinfo.ssaIdBefore);
    1050             if (ssaIdIt == ssaIds.end())
    1051                 ssaIds.push_back(sinfo.ssaIdLast);
    1052             else
    1053                 *ssaIdIt = sinfo.ssaIdLast;
     1047                ssaIds.eraseValue(sinfo.ssaIdBefore);
     1048            ssaIds.insertValue(sinfo.ssaIdLast);
    10541049        }
    10551050    }
     
    11161111    std::cout << std::endl;
    11171112   
    1118     {   // if cblock with some children
    1119         auto nit = std::find(ssaIds.begin(), ssaIds.end(), nextSSAId-1);
    1120         if (nit != ssaIds.end() && nextSSAId != curSSAId)
    1121         {
    1122             std::cout << "erase in blk2: " << ssaEntry.first.regVar <<
    1123                     ":" << ssaEntry.first.index << ": " <<
    1124                     entry.blockIndex << " ssaId=" << *nit << std::endl;
    1125             ssaIds.erase(nit);  // just remove
    1126         }
    1127     }
     1113    // if cblock with some children
     1114    if (nextSSAId != curSSAId)
     1115        ssaIds.eraseValue(nextSSAId-1);
     1116   
    11281117    // push previous SSAId to lastSSAIdMap (later will be replaced)
    11291118    /*std::cout << "call back: " << nextSSAId << "," <<
Note: See TracChangeset for help on using the changeset viewer.