Changeset 4050 in CLRX


Ignore:
Timestamp:
Apr 24, 2018, 11:22:51 PM (5 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: Remove return from reduceSSAIds. change ssaId only if regvar changed in the block.

File:
1 edited

Legend:

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

    r4049 r4050  
    722722// reduce retSSAIds (last SSAIds for regvar) while passing by code block
    723723// and emits SSA replaces for these ssaids
    724 static bool reduceSSAIds(std::unordered_map<AsmSingleVReg, size_t>& curSSAIdMap,
     724static void reduceSSAIds(std::unordered_map<AsmSingleVReg, size_t>& curSSAIdMap,
    725725            RetSSAIdMap& retSSAIdMap, RoutineMap& routineMap,
    726726            SSAReplacesMap& ssaReplacesMap, FlowStackEntry& entry, SSAEntry& ssaEntry)
     
    789789        // finally remove from container (because obsolete)
    790790        retSSAIdMap.erase(ssaIdsIt);
    791         return true;
    792791    }
    793792    else if (ssaIdsIt != retSSAIdMap.end() && sinfo.ssaIdChange!=0)
     
    799798        // just remove, if some change without read before
    800799        retSSAIdMap.erase(ssaIdsIt);
    801         return false;
    802     }
    803     // no reduced, but no reduction for this var
    804     return (ssaIdsIt == retSSAIdMap.end());
     800    }
    805801}
    806802
     
    15591555                    }
    15601556                   
    1561                     bool reducedSSAId = reduceSSAIds(curSSAIdMap, retSSAIdMap,
    1562                                 routineMap, ssaReplacesMap, entry, ssaEntry);
     1557                    reduceSSAIds(curSSAIdMap, retSSAIdMap, routineMap, ssaReplacesMap,
     1558                                entry, ssaEntry);
    15631559                   
    15641560                    size_t& ssaId = curSSAIdMap[ssaEntry.first];
     
    15791575                    sinfo.ssaIdLast = sinfo.ssaIdChange!=0 ? totalSSACount-1 : SIZE_MAX;
    15801576                    //totalSSACount = std::max(totalSSACount, ssaId);
    1581                     if (!reducedSSAId || sinfo.ssaIdChange!=0)
     1577                    if (sinfo.ssaIdChange!=0)
    15821578                        ssaId = totalSSACount;
    15831579                   
Note: See TracChangeset for help on using the changeset viewer.