Changeset 4115 in CLRX


Ignore:
Timestamp:
May 8, 2018, 1:24:49 PM (3 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: some updates. Asm: optimize putting the integers without given expression (putting zeroes).

Location:
CLRadeonExtender/trunk
Files:
3 edited

Legend:

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

    r4102 r4115  
    695695        {
    696696            if (expr->isEmpty()) // empty expression print warning
     697            {
    697698                asmr.printWarning(linePtr, "No expression, zero has been put");
    698            
    699             if (expr->getSymOccursNum()==0)
     699                uint64_t zero = 0;
     700                asmr.putData(sizeof(T), reinterpret_cast<const cxbyte*>(&zero));
     701            }
     702            else if (expr->getSymOccursNum()==0)
    700703            {
    701704                // put directly to section
  • CLRadeonExtender/trunk/amdasm/AsmRegAlloc.cpp

    r4113 r4115  
    18161816        {
    18171817            ARDOut << " ret: " << entry.blockIndex << "\n";
    1818             auto res = routineMap.insert({ entry.blockIndex, { } });
     1818            const size_t routineBlock = callStack.back().routineBlock;
     1819            auto res = routineMap.insert({ routineBlock, { } });
    18191820            if (res.second)
    18201821                createRoutineDataLv(codeBlocks, routineMap, res.first->second,
    1821                         entry.blockIndex, vregIndexMaps, livenesses,
     1822                        routineBlock, vregIndexMaps, livenesses,
    18221823                        regTypesNum, regRanges);
    18231824            else
  • CLRadeonExtender/trunk/tests/amdasm/AsmRegAlloc3.cpp

    r4114 r4115  
    985985        s_add_u32 s2, s2, routine-.
    986986        s_add_u32 s3, s3, routine-.+4
    987         /*
    988987        .cf_call routine
    989988        s_swappc_b64 s[0:1], s[2:3]
    990         */
     989       
    991990        s_lshl_b32 sa[2], sa[2], 3
    992991        s_lshl_b32 sa[3], sa[3], 4
    993992        s_endpgm
     993       
    994994routine:
    995         /*
    996995        s_xor_b32 sa[2], sa[2], sa[4]
    997996        s_xor_b32 sa[3], sa[3], sa[4]
    998997        .cf_ret
    999998        s_setpc_b64 s[0:1]
    1000         */
    1001999)ffDXD",
    10021000        {
Note: See TracChangeset for help on using the changeset viewer.