Changeset 3844 in CLRX


Ignore:
Timestamp:
Feb 23, 2018, 8:17:14 PM (17 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: Make some classes with weight().

File:
1 edited

Legend:

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

    r3843 r3844  
    554554
    555555// map of last SSAId for routine, key - varid, value - last SSA ids
    556 typedef std::unordered_map<AsmSingleVReg, std::vector<size_t> > LastSSAIdMap;
    557 
    558 struct RetSSAEntry
     556class CLRX_INTERNAL LastSSAIdMap: public
     557            std::unordered_map<AsmSingleVReg, std::vector<size_t> >
     558{
     559public:
     560    LastSSAIdMap()
     561    { }
     562   
     563    size_t weight() const
     564    { return size(); }
     565};
     566
     567class CLRX_INTERNAL RBWSSAIdMap: public std::unordered_map<AsmSingleVReg, size_t>
     568{
     569public:
     570    RBWSSAIdMap()
     571    { }
     572   
     573    size_t weight() const
     574    { return size(); }
     575};
     576
     577
     578struct CLRX_INTERNAL RetSSAEntry
    559579{
    560580    std::vector<size_t> routines;
     
    564584typedef std::unordered_map<AsmSingleVReg, RetSSAEntry> RetSSAIdMap;
    565585
    566 struct RoutineData
     586struct CLRX_INTERNAL RoutineData
    567587{
    568588    // rbwSSAIdMap - read before write SSAId's map
     
    572592};
    573593
    574 struct FlowStackEntry
     594struct CLRX_INTERNAL FlowStackEntry
    575595{
    576596    size_t blockIndex;
     
    580600};
    581601
    582 struct FlowStackEntry2
     602struct CLRX_INTERNAL FlowStackEntry2
    583603{
    584604    size_t blockIndex;
     
    15951615typedef std::deque<FlowStackEntry>::const_iterator FlowStackCIter;
    15961616
    1597 struct VRegLastPos
     1617struct CLRX_INTERNAL VRegLastPos
    15981618{
    15991619    size_t ssaId; // last SSA id
Note: See TracChangeset for help on using the changeset viewer.