Changeset 3654 in CLRX


Ignore:
Timestamp:
Jan 22, 2018, 5:20:49 PM (2 years ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: Fixed applying calls SSAIds while collecting SSAids to resolve.

File:
1 edited

Legend:

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

    r3653 r3654  
    508508    {
    509509        const FlowStackEntry& entry = *pfit;
     510        std::cout << "  apply: " << entry.blockIndex << std::endl;
    510511        const CodeBlock& cblock = codeBlocks[entry.blockIndex];
    511512        for (const auto& sentry: cblock.ssaInfoMap)
     
    515516                stackVarMap[sentry.first] = { sinfo.ssaId + sinfo.ssaIdChange - 1 };
    516517        }
    517         for (const NextBlock& next: cblock.nexts)
    518             if (next.isCall)
    519             {
    520                 if (next.block == nextBlock)
    521                     break; // if call to this next routine (stop)
    522                 const LastSSAIdMap& regVarMap =
    523                         routineMap.find(next.block)->second.lastSSAIdMap;
    524                 for (const auto& sentry: regVarMap)
    525                     stackVarMap[sentry.first] = sentry.second;
    526             }
     518        if (entry.nextIndex > cblock.nexts.size())
     519            for (const NextBlock& next: cblock.nexts)
     520                if (next.isCall)
     521                {
     522                    std::cout << "  applycall: " << entry.blockIndex << ": " <<
     523                            entry.nextIndex << ": " << next.block << std::endl;
     524                    const LastSSAIdMap& regVarMap =
     525                            routineMap.find(next.block)->second.lastSSAIdMap;
     526                    for (const auto& sentry: regVarMap)
     527                        stackVarMap[sentry.first] = sentry.second;
     528                }
    527529    }
    528530   
Note: See TracChangeset for help on using the changeset viewer.