Changeset 3969 in CLRX


Ignore:
Timestamp:
Apr 6, 2018, 7:46:08 PM (13 days ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: keep retSSAId of the input of regvar while reducing retSSAIds. Add extra debug outputs.

File:
1 edited

Legend:

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

    r3968 r3969  
    15131513        // reduce SSAIds replaces
    15141514        for (BlockIndex rblock: ssaIdsIt->second.routines)
    1515             routineMap.find(rblock)->second.lastSSAIdMap[ssaEntry.first] =
    1516                             VectorSet<size_t>({ ssaId-1 });
     1515        {
     1516            RoutineData& rdata = routineMap.find(rblock)->second;
     1517            size_t rbwRetSSAId = SIZE_MAX;
     1518            auto rbwIt = rdata.rbwSSAIdMap.find(ssaEntry.first);
     1519            auto rlsit = rdata.lastSSAIdMap.find(ssaEntry.first);
     1520            if (rbwIt != rdata.rbwSSAIdMap.end() && rlsit->second.hasValue(rbwIt->second))
     1521                rbwRetSSAId = rbwIt->second;
     1522            rlsit->second = VectorSet<size_t>({ ssaId-1 });
     1523            if (rbwRetSSAId != SIZE_MAX)
     1524            {
     1525                std::cout << "  keep retSSAId rbw: " << rbwRetSSAId << std::endl;
     1526                // add retSSAId without changes (in way without regvar changes)
     1527                rlsit->second.insertValue(rbwRetSSAId);
     1528            }
     1529        }
    15171530        // finally remove from container (because obsolete)
    15181531        retSSAIdMap.erase(ssaIdsIt);
     
    17271740        FlowStackEntry& entry = flowStack.back();
    17281741        const CodeBlock& cblock = codeBlocks[entry.blockIndex.index];
     1742       
     1743        std::cout << ":: rdata.curSSAIdMap #" << entry.blockIndex << "\n";
     1744        for (const auto& v: rdata.curSSAIdMap)
     1745        {
     1746            std::cout << "  :: " << v.first.regVar << ":" << v.first.index << ":";
     1747            for (size_t ssaId: v.second)
     1748                std::cout << " " << ssaId;
     1749            std::cout << "\n";
     1750        }
    17291751       
    17301752        auto addSubroutine = [&](
Note: See TracChangeset for help on using the changeset viewer.