Changeset 4302


Ignore:
Timestamp:
Nov 12, 2014, 6:36:28 PM (4 years ago)
Author:
linmengl
Message:

use template for 256-bit library test. Tested 256-bit long integer shift.

Location:
trunk/lib_ir/gen
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib_ir/gen/CMakeLists.txt

    r4238 r4302  
    1414add_custom_command(
    1515  OUTPUT llc_func_256_optimized.o llc_func_256_optimized.bc
    16   COMMAND ${LLVM_OPT} -O3 -mattr=+avx2,+bmi2 ${CMAKE_CURRENT_SOURCE_DIR}/llc_func_256.ll -o llc_func_256_optimized.bc
     16  COMMAND ${LLVM_OPT} -O3 -mattr=+avx2,+bmi2 llc_func_256.ll -o llc_func_256_optimized.bc
    1717  COMMAND ${LLVM_LLC} -O3 -mattr=+avx2,+bmi2 -filetype=obj llc_func_256_optimized.bc
    1818  DEPENDS llc_func_256.ll)
     
    3030
    3131add_custom_command(
    32   OUTPUT llc_func.ll test_llc.cpp
     32  OUTPUT llc_func.ll test_llc.cpp llc_func_256.ll test_llc_256.cpp
    3333  COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/gen.py
    34   DEPENDS llc_func.pytemplate.ll test_llc.pytemplate.cpp gen.py)
     34  DEPENDS llc_func_256.pytemplate.ll llc_func.pytemplate.ll test_llc_256.pytemplate.cpp test_llc.pytemplate.cpp gen.py)
    3535
    3636add_test(
  • trunk/lib_ir/gen/gen.py

    r4296 r4302  
    99LLTemplate      = "llc_func.pytemplate.ll"
    1010LLOutput        = "llc_func.ll"
     11
     12Test256Template    = "test_llc_256.pytemplate.cpp"
     13Test256Output      = "test_llc_256.cpp"
     14LL256Template      = "llc_func_256.pytemplate.ll"
     15LL256Output        = "llc_func_256.ll"
     16
    1117FuncTemplate    = "ParabixGeneratedFuncs.pytemplate.h"
    1218FuncOutput      = "ParabixGeneratedFuncs.h"
     
    101107    # mv ParabixGeneratedFuncs.h ~/llvm_suit/llvm_git/lib/Target/X86/
    102108
     109def genLL256File():
     110    fillTemplate(template=LL256Template, output=LL256Output,
     111                 params=dict(LongShiftAmount256 = LongShiftAmount256))
     112
     113def genTest256File():
     114    fillTemplate(template=Test256Template, output=Test256Output,
     115                 params=dict(LongShiftAmount256 = LongShiftAmount256))
     116
    103117if __name__ == '__main__':
    104118    genTestFile()
    105119    genLLFile()
     120
    106121    genFuncFile()
    107122
     123    genLL256File()
     124    genTest256File()
     125
Note: See TracChangeset for help on using the changeset viewer.