Changeset 4158 in CLRX


Ignore:
Timestamp:
May 13, 2018, 2:40:32 PM (7 days ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: Fixed last testcase (missing sa[1] (7) in vidxCallmap).
Add vidx to callMap before entry call and if join inside subroutines (not before call point).

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

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

    r4154 r4158  
    368368    }
    369369   
    370     auto flit = flowStack.begin() + flowStkStart.stackPos + (flowStkStart.inSubroutines);
     370    auto flit = flowStack.begin() + flowStkStart.stackPos;
     371    // applyVIdx to call entry (if needed, and if some join inside subroutines)
     372    // resolve this vidx before these call point and if nexts>1
     373    if (flowStkStart.inSubroutines && lv.contain(codeBlocks[flit->blockIndex].end-1) &&
     374        codeBlocks[flit->blockIndex].nexts.size() > 1)
     375        // just apply, only if join before call
     376        addVIdxToCallEntry(flit->blockIndex, lvRegType, vidx,
     377                    codeBlocks, vidxCallMap, vidxRoutineMap);
     378   
     379    if (flowStkStart.inSubroutines)
     380        ++flit; // skip this codeblock before call
     381   
    371382    const CodeBlock& lastBlk = codeBlocks[flit->blockIndex];
    372    
    373383    if (flit != flitEnd)
    374384    {
  • CLRadeonExtender/trunk/tests/amdasm/AsmRegAlloc3.cpp

    r4157 r4158  
    24842484        },
    24852485        {   // vidxCallMap
    2486             { 0, { { { 2, 3, 6, 16 }, { }, { }, { } } } },
     2486            { 0, { { { 2, 3, 6, 7, 16 }, { }, { }, { } } } },
    24872487            { 5, { { { 6 }, { }, { }, { } } } }
    24882488        },
Note: See TracChangeset for help on using the changeset viewer.