Ignore:
Timestamp:
Mar 12, 2018, 8:49:31 PM (15 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: Stupid segfault in while passing by loop inside routines. Add new testcase (loop inside routines).

File:
1 edited

Legend:

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

    r3886 r3896  
    14621462                    if (loopBlocks.find(entry.blockIndex) != loopBlocks.end())
    14631463                    {   // leave from loop point
     1464                        std::cout << "   loopfound " << entry.blockIndex << std::endl;
    14641465                        auto loopsit = loopSSAIdMap.find(entry.blockIndex);
    14651466                        if (loopsit != loopSSAIdMap.end())
     1467                        {
     1468                            std::cout << "   loopssaIdMap: " <<
     1469                                    entry.blockIndex << std::endl;
    14661470                            joinLastSSAIdMap(subrData.lastSSAIdMap,
    14671471                                    loopsit->second.ssaIdMap, subrData, true);
     1472                        }
    14681473                    }
    14691474                    subroutinesCache.put(entry.blockIndex, subrData);
     
    15911596                if (loopBlocks.find(entry.blockIndex) != loopBlocks.end())
    15921597                {   // leave from loop point
     1598                    std::cout << "   loopfound: " << entry.blockIndex << std::endl;
    15931599                    if (loopsit != loopSSAIdMap.end())
     1600                    {
     1601                        std::cout << "   loopssaIdMap: " << entry.blockIndex << std::endl;
    15941602                        joinLastSSAIdMap(subrData.lastSSAIdMap, loopsit->second.ssaIdMap,
    15951603                                         subrData, true);
     1604                    }
    15961605                }
    15971606                subroutinesCache.put(entry.blockIndex, subrData);
    15981607            }
    1599             if (loopBlocks.find(entry.blockIndex) != loopBlocks.end())
     1608            if (loopBlocks.find(entry.blockIndex) != loopBlocks.end() &&
     1609                    loopsit != loopSSAIdMap.end())
    16001610                // mark that loop has passed fully
    16011611                loopsit->second.passed = true;
Note: See TracChangeset for help on using the changeset viewer.