Changeset 4098 in CLRX


Ignore:
Timestamp:
May 7, 2018, 9:31:20 AM (6 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: add LastVRegStackPos and use it in LastVRegMap.

Location:
CLRadeonExtender/trunk/amdasm
Files:
2 edited

Legend:

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

    r4097 r4098  
    755755            FlowStackCIter flit = flowStack.begin();
    756756            if (lvrit != lastVRegMap.end())
    757                 flit += lvrit->second.back().blockIndex;
     757                flit += lvrit->second.back().stackPos;
    758758           
    759759            cxuint regType = getRegType(regTypesNum, regRanges, entry.first);
     
    17651765                    FlowStackCIter flit = flowStack.begin();
    17661766                    if (lvrit != lastVRegMap.end())
    1767                         flit += lvrit->second.back().blockIndex;
     1767                        flit += lvrit->second.back().stackPos;
    17681768                   
    17691769                    const CodeBlock& lastBlk = codeBlocks[flit->blockIndex];
     
    18231823                    if (lvrit != lastVRegMap.end())
    18241824                    {
    1825                         std::vector<LastAccessBlockPos>& lastPos = lvrit->second;
     1825                        std::vector<LastVRegStackPos>& lastPos = lvrit->second;
    18261826                        lastPos.pop_back();
    18271827                        if (lastPos.empty()) // just remove from lastVRegs
  • CLRadeonExtender/trunk/amdasm/AsmRegAlloc.h

    r4097 r4098  
    202202    bool operator!=(const LastAccessBlockPos& v) const
    203203    { return blockIndex!=v.blockIndex; }
     204};
     205
     206struct CLRX_INTERNAL LastVRegStackPos
     207{
     208    size_t stackPos;
     209    bool inSubroutines; // true if last access in some called subroutine
    204210};
    205211
     
    384390
    385391// key - singlevreg, value - code block chain
    386 typedef std::unordered_map<AsmSingleVReg, std::vector<LastAccessBlockPos> > LastVRegMap;
     392typedef std::unordered_map<AsmSingleVReg, std::vector<LastVRegStackPos> > LastVRegMap;
    387393
    388394struct CLRX_INTERNAL LiveBlock
Note: See TracChangeset for help on using the changeset viewer.