Changeset 3971 in CLRX


Ignore:
Timestamp:
Apr 7, 2018, 12:29:03 PM (6 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: add origRbwSSAIdMap and use if call for next recursion pass to avoid obsolete keeping previous SSAIds before this call.

File:
1 edited

Legend:

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

    r3970 r3971  
    668668    // rbwSSAIdMap - read before write SSAId's map
    669669    std::unordered_map<AsmSingleVReg, size_t> rbwSSAIdMap;
     670    std::unordered_map<AsmSingleVReg, size_t> origRbwSSAIdMap;
    670671    LastSSAIdMap curSSAIdMap;
    671672    LastSSAIdMap lastSSAIdMap;
     
    13221323    // insert readBeforeWrite only if doesnt exists in destination
    13231324    dest.rbwSSAIdMap.insert(src.rbwSSAIdMap.begin(), src.rbwSSAIdMap.end());
     1325    dest.origRbwSSAIdMap.insert(src.origRbwSSAIdMap.begin(), src.origRbwSSAIdMap.end());
    13241326   
    13251327    //joinLastSSAIdMap(dest.curSSAIdMap, src.lastSSAIdMap);
     
    15581560            // if already added
    15591561            beforeFirstAccess = false;
     1562           
     1563        rdata.origRbwSSAIdMap.insert({ ssaEntry.first,
     1564                        ssaEntry.second.ssaIdBefore }).second;
    15601565    }
    15611566   
     
    19761981                {
    19771982                    const RoutineData& srcRdata = routineMap.find(rblock)->second;
    1978                     for (const auto& rbw: srcRdata.rbwSSAIdMap)
     1983                    // for next recursion pass call - choose origRvwSSAIdMap
     1984                    // otherwise - standard rbwSsaIdMap
     1985                    const std::unordered_map<AsmSingleVReg, size_t>& srcRbwSSAIdMap =
     1986                        (entry.blockIndex.pass == 0 && rblock.pass!=0) ?
     1987                        srcRdata.origRbwSSAIdMap : srcRdata.rbwSSAIdMap;
     1988                    if (entry.blockIndex.pass == 0 && rblock.pass!=0)
     1989                        std::cout << "choose origRbwSSAIdMap: " << rblock << std::endl;
     1990                       
     1991                    for (const auto& rbw: srcRbwSSAIdMap)
    19791992                    {
    19801993                        allInCalls.insert(rbw.first);
Note: See TracChangeset for help on using the changeset viewer.