Changeset 4012 in CLRX


Ignore:
Timestamp:
Apr 17, 2018, 1:45:44 PM (5 weeks ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: Small changes in createInterferenceGraph: reference in argument, allocate new graphRegCount for only new ssaIds.

File:
1 edited

Legend:

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

    r4011 r4012  
    879879            const AsmRegVarUsage* rvus, LinearDepMap* ldepsOut,
    880880            EqualToDepMap* edepsOut, const VarIndexMap* vregIndexMaps,
    881             std::unordered_map<AsmSingleVReg, size_t> ssaIdIdxMap,
     881            const std::unordered_map<AsmSingleVReg, size_t>& ssaIdIdxMap,
    882882            size_t regTypesNum, const cxuint* regRanges)
    883883{
     
    10101010           
    10111011            if (sinfo.readBeforeWrite)
    1012                 ssaIdIndices[sinfo.ssaIdBefore] = graphVregsCount++;
     1012            {
     1013                if (ssaIdIndices[sinfo.ssaIdBefore] == SIZE_MAX)
     1014                    ssaIdIndices[sinfo.ssaIdBefore] = graphVregsCount++;
     1015            }
    10131016            if (sinfo.ssaIdChange!=0)
    10141017            {
    10151018                // fill up ssaIdIndices (with graph Ids)
    1016                 ssaIdIndices[sinfo.ssaIdFirst] = graphVregsCount++;
     1019                if (ssaIdIndices[sinfo.ssaIdFirst] == SIZE_MAX)
     1020                    ssaIdIndices[sinfo.ssaIdFirst] = graphVregsCount++;
    10171021                for (size_t ssaId = sinfo.ssaId+1;
    10181022                        ssaId < sinfo.ssaId+sinfo.ssaIdChange-1; ssaId++)
    10191023                    ssaIdIndices[ssaId] = graphVregsCount++;
    1020                 ssaIdIndices[sinfo.ssaIdLast] = graphVregsCount++;
     1024                if (ssaIdIndices[sinfo.ssaIdLast] == SIZE_MAX)
     1025                    ssaIdIndices[sinfo.ssaIdLast] = graphVregsCount++;
    10211026            }
    10221027        }
Note: See TracChangeset for help on using the changeset viewer.