Changeset 3997 for trunk


Ignore:
Timestamp:
Aug 12, 2014, 4:43:38 PM (5 years ago)
Author:
linmengl
Message:

some refactoring, mult for i4/i8 ready now

Location:
trunk/lib_ir/gen
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib_ir/gen/gen.py

    r3996 r3997  
    1212FuncOutput      = "ParabixGeneratedFuncs.h"
    1313
    14 FunctionList = ["add", "sub", "mult", "eq", "lt", "gt", "ult", "ugt", "vsll", "vsrl", "vsra"]
    15 FunctionListI4 = ["add", "sub"]
     14FunctionListI2 = ["add", "sub", "mult", "eq", "lt", "gt", "ult", "ugt", "vsll", "vsrl", "vsra"]
     15FunctionListI4 = ["add", "sub", "mult"]
    1616FunctionListI8 = ["add", "sub", "mult", "eq", "lt", "gt", "ult", "ugt", "vsll", "vsrl", "vsra"]
    1717
     
    4646
    4747#Get all v64i2 names
    48 FunctionNames = [{"c": C(name), "cxx": CXX(name), "op": OP(name),
    49                   "flag": FLAG(name), "fw": FW} for name in FunctionList]
     48FunctionNamesI2 = [{"c": C(name), "cxx": CXX(name), "op": OP(name),
     49                  "flag": FLAG(name), "fw": FW} for name in FunctionListI2]
    5050FW = 4
    5151FunctionNamesI4 = [{"c": C(name), "cxx": CXX(name), "op": OP(name),
     
    6868    fillTemplate(template=TestTemplate, output=TestOutput,
    6969                 params=dict(HeaderComment = "AUTO GENERATED FILE",
    70                              FunctionNames = FunctionNames,
     70                             FunctionNamesI2 = FunctionNamesI2,
    7171                             FunctionNamesI4 = FunctionNamesI4,
    7272                             FunctionNamesI8 = FunctionNamesI8,
     
    7575def genLLFile():
    7676    fillTemplate(template=LLTemplate, output=LLOutput,
    77                  params=dict(FunctionNames = FunctionNames,
     77                 params=dict(FunctionNamesI2 = FunctionNamesI2,
    7878                             FunctionNamesI4 = FunctionNamesI4,
    7979                             FunctionNamesI8 = FunctionNamesI8,
     
    8383    fillTemplate(template=FuncTemplate, output=FuncOutput,
    8484                 params=dict(HeaderComment = "AUTO GENERATED FILE",
    85                              FunctionNames = FunctionNames,
     85                             FunctionNames = FunctionNamesI2,
    8686                             Implement = impl_data.getImplements()))
    8787    # NEED to copy manually.
     
    9191    genTestFile()
    9292    genLLFile()
    93     #genFuncFile()
     93    genFuncFile()
    9494
  • trunk/lib_ir/gen/llc_func.pytemplate.ll

    r3996 r3997  
    1 {% for name in FunctionNames %}
     1{% for name in FunctionNamesI2 %}
    22define <64 x i2> @{{ name.c }}(<64 x i2> %a, <64 x i2> %b) {
    33entry:
  • trunk/lib_ir/gen/test_llc.pytemplate.cpp

    r3996 r3997  
    99#include <cstdlib>
    1010using namespace std;
    11 {% set Names = FunctionNames + FunctionNamesI4 + FunctionNamesI8 %}
     11{% set Names = FunctionNamesI2 + FunctionNamesI4 + FunctionNamesI8 %}
    1212
    1313extern "C" {
Note: See TracChangeset for help on using the changeset viewer.