Changeset 3846


Ignore:
Timestamp:
May 17, 2014, 7:35:39 PM (5 years ago)
Author:
cameron
Message:

Fix backup file logic, set 1024 maxwidth

File:
1 edited

Legend:

Unmodified
Added
Removed
  • parabix-LLVM/mkValueTypes.py

    r3845 r3846  
    5555    VTmap['float_vector_value_type_defs'] = ''
    5656    for fpfw in [16,32,64]:
    57         for fieldcount in [f for f in fws if f > 1 and f * fpfw <= maxwidth]:
     57        for fieldcount in [f for f in fws if f * fpfw <= maxwidth]:
    5858            enumVal += 1
    5959            vType = "v%sf%s" % (fieldcount, fpfw)
     
    6262            VectorSizeMap[fpfw * fieldcount].append(vType)
    6363            VectorFieldSizeMap[fpfw].append(vType)
    64     VTmap['first_float_vector_type'] = "v%sf%s" % (2, 16)
     64    VTmap['first_float_vector_type'] = "v%sf%s" % (1, 16)
    6565    VTmap['last_float_vector_type'] = vType
    6666    VTmap['x86mmx'] = enumVal + 1
     
    234234    VTmap['getVectorVT'] = make_getVectorVT(VectorFieldSizeMap)
    235235    content = t.substitute(VTmap)
    236     if not os.path.exists("MachineValueType.h.bak"):
     236    if os.path.exists("MachineValueType.h") and not os.path.exists("MachineValueType.h.bak"):
    237237                shutil.move("MachineValueType.h", "MachineValueType.h.bak")
    238238    f = open("MachineValueType.h", "w")
     
    246246    (VTmap, VectorSizeMap, VectorFieldSizeMap) = calculateTypeData(maxwidth)
    247247    content = t.substitute(VTmap)
    248     if not os.path.exists("ValueTypes.td.bak"):
     248    if os.path.exists("ValueTypes.td") and  not os.path.exists("ValueTypes.td.bak"):
    249249                shutil.move("ValueTypes.td", "ValueTypes.td.bak")
    250250    f = open("ValueTypes.td", "w")
     
    253253
    254254if __name__ == '__main__':
    255     makeMachineValueType_h(512)
    256     makeValueTypes_td(512)
     255    makeMachineValueType_h(1024)
     256    makeValueTypes_td(1024)
Note: See TracChangeset for help on using the changeset viewer.