LLVM 3.9 version support
This commit is contained in:
16
alloy.py
16
alloy.py
@@ -124,6 +124,9 @@ def build_LLVM(version_LLVM, revision, folder, tarball, debug, selfbuild, extra,
|
|||||||
FOLDER_NAME=version_LLVM
|
FOLDER_NAME=version_LLVM
|
||||||
if version_LLVM == "trunk":
|
if version_LLVM == "trunk":
|
||||||
SVN_PATH="trunk"
|
SVN_PATH="trunk"
|
||||||
|
if version_LLVM == "3.8":
|
||||||
|
SVN_PATH="branches/release_38"
|
||||||
|
version_LLVM = "3_8"
|
||||||
if version_LLVM == "3.7":
|
if version_LLVM == "3.7":
|
||||||
SVN_PATH="tags/RELEASE_370/final"
|
SVN_PATH="tags/RELEASE_370/final"
|
||||||
version_LLVM = "3_7"
|
version_LLVM = "3_7"
|
||||||
@@ -300,6 +303,7 @@ def unsupported_llvm_targets(LLVM_VERSION):
|
|||||||
"3.6":["avx512knl-i32x16"],
|
"3.6":["avx512knl-i32x16"],
|
||||||
"3.7":[],
|
"3.7":[],
|
||||||
"3.8":[],
|
"3.8":[],
|
||||||
|
"3.9":[],
|
||||||
"trunk":[]}
|
"trunk":[]}
|
||||||
return prohibited_list[LLVM_VERSION]
|
return prohibited_list[LLVM_VERSION]
|
||||||
|
|
||||||
@@ -419,8 +423,10 @@ def build_ispc(version_LLVM, make):
|
|||||||
temp = "3_6"
|
temp = "3_6"
|
||||||
if version_LLVM == "3.7":
|
if version_LLVM == "3.7":
|
||||||
temp = "3_7"
|
temp = "3_7"
|
||||||
if version_LLVM == "trunk":
|
if version_LLVM == "3.8":
|
||||||
temp = "3_8"
|
temp = "3_8"
|
||||||
|
if version_LLVM == "trunk":
|
||||||
|
temp = "3_9"
|
||||||
os.environ["LLVM_VERSION"] = "LLVM_" + temp
|
os.environ["LLVM_VERSION"] = "LLVM_" + temp
|
||||||
try_do_LLVM("clean ISPC for building", "msbuild ispc.vcxproj /t:clean", True)
|
try_do_LLVM("clean ISPC for building", "msbuild ispc.vcxproj /t:clean", True)
|
||||||
try_do_LLVM("build ISPC with LLVM version " + version_LLVM + " ", "msbuild ispc.vcxproj /V:m /p:Platform=Win32 /p:Configuration=Release /t:rebuild", True)
|
try_do_LLVM("build ISPC with LLVM version " + version_LLVM + " ", "msbuild ispc.vcxproj /V:m /p:Platform=Win32 /p:Configuration=Release /t:rebuild", True)
|
||||||
@@ -560,7 +566,7 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
|
|||||||
archs.append("x86-64")
|
archs.append("x86-64")
|
||||||
if "native" in only:
|
if "native" in only:
|
||||||
sde_targets_t = []
|
sde_targets_t = []
|
||||||
for i in ["3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "trunk"]:
|
for i in ["3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "trunk"]:
|
||||||
if i in only:
|
if i in only:
|
||||||
LLVM.append(i)
|
LLVM.append(i)
|
||||||
if "current" in only:
|
if "current" in only:
|
||||||
@@ -843,7 +849,7 @@ def Main():
|
|||||||
if os.environ.get("SMTP_ISPC") == None:
|
if os.environ.get("SMTP_ISPC") == None:
|
||||||
error("you have no SMTP_ISPC in your environment for option notify", 1)
|
error("you have no SMTP_ISPC in your environment for option notify", 1)
|
||||||
if options.only != "":
|
if options.only != "":
|
||||||
test_only_r = " 3.2 3.3 3.4 3.5 3.6 3.7 trunk current build stability performance x86 x86-64 x86_64 -O0 -O2 native debug nodebug "
|
test_only_r = " 3.2 3.3 3.4 3.5 3.6 3.7 3.8 trunk current build stability performance x86 x86-64 x86_64 -O0 -O2 native debug nodebug "
|
||||||
test_only = options.only.split(" ")
|
test_only = options.only.split(" ")
|
||||||
for iterator in test_only:
|
for iterator in test_only:
|
||||||
if not (" " + iterator + " " in test_only_r):
|
if not (" " + iterator + " " in test_only_r):
|
||||||
@@ -953,7 +959,7 @@ if __name__ == '__main__':
|
|||||||
llvm_group = OptionGroup(parser, "Options for building LLVM",
|
llvm_group = OptionGroup(parser, "Options for building LLVM",
|
||||||
"These options must be used with -b option.")
|
"These options must be used with -b option.")
|
||||||
llvm_group.add_option('--version', dest='version',
|
llvm_group.add_option('--version', dest='version',
|
||||||
help='version of llvm to build: 3.2 3.3 3.4 3.5 3.6 3.7 trunk. Default: trunk', default="trunk")
|
help='version of llvm to build: 3.2 3.3 3.4 3.5 3.6 3.7 3.8 trunk. Default: trunk', default="trunk")
|
||||||
llvm_group.add_option('--with-gcc-toolchain', dest='gcc_toolchain_path',
|
llvm_group.add_option('--with-gcc-toolchain', dest='gcc_toolchain_path',
|
||||||
help='GCC install dir to use when building clang. It is important to set when ' +
|
help='GCC install dir to use when building clang. It is important to set when ' +
|
||||||
'you have alternative gcc installation. Note that otherwise gcc from standard ' +
|
'you have alternative gcc installation. Note that otherwise gcc from standard ' +
|
||||||
@@ -994,7 +1000,7 @@ if __name__ == '__main__':
|
|||||||
run_group.add_option('--only', dest='only',
|
run_group.add_option('--only', dest='only',
|
||||||
help='set types of tests. Possible values:\n' +
|
help='set types of tests. Possible values:\n' +
|
||||||
'-O0, -O2, x86, x86-64, stability (test only stability), performance (test only performance),\n' +
|
'-O0, -O2, x86, x86-64, stability (test only stability), performance (test only performance),\n' +
|
||||||
'build (only build with different LLVM), 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, trunk, native (do not use SDE),\n' +
|
'build (only build with different LLVM), 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, trunk, native (do not use SDE),\n' +
|
||||||
'current (do not rebuild ISPC), debug (only with debug info), nodebug (only without debug info, default).',
|
'current (do not rebuild ISPC), debug (only with debug info), nodebug (only without debug info, default).',
|
||||||
default="")
|
default="")
|
||||||
run_group.add_option('--perf_LLVM', dest='perf_llvm',
|
run_group.add_option('--perf_LLVM', dest='perf_llvm',
|
||||||
|
|||||||
@@ -149,6 +149,8 @@ define(`PTR_OP_ARGS',
|
|||||||
ifelse(LLVM_VERSION, LLVM_3_7,
|
ifelse(LLVM_VERSION, LLVM_3_7,
|
||||||
``$1 , $1 *'',
|
``$1 , $1 *'',
|
||||||
LLVM_VERSION, LLVM_3_8,
|
LLVM_VERSION, LLVM_3_8,
|
||||||
|
``$1 , $1 *'',
|
||||||
|
LLVM_VERSION, LLVM_3_9,
|
||||||
``$1 , $1 *'',
|
``$1 , $1 *'',
|
||||||
``$1 *''
|
``$1 *''
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ define(`WIDTH',`16')
|
|||||||
ifelse(LLVM_VERSION, LLVM_3_7,
|
ifelse(LLVM_VERSION, LLVM_3_7,
|
||||||
`include(`target-avx512-common.ll')',
|
`include(`target-avx512-common.ll')',
|
||||||
LLVM_VERSION, LLVM_3_8,
|
LLVM_VERSION, LLVM_3_8,
|
||||||
|
`include(`target-avx512-common.ll')',
|
||||||
|
LLVM_VERSION, LLVM_3_9,
|
||||||
`include(`target-avx512-common.ll')'
|
`include(`target-avx512-common.ll')'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,10 @@ define(`MASK_HIGH_BIT_ON',
|
|||||||
define(`PTR_OP_ARGS',
|
define(`PTR_OP_ARGS',
|
||||||
ifelse(LLVM_VERSION, LLVM_3_7,
|
ifelse(LLVM_VERSION, LLVM_3_7,
|
||||||
``$1 , $1 *'',
|
``$1 , $1 *'',
|
||||||
|
ifelse(LLVM_VERSION, LLVM_3_8,
|
||||||
|
``$1 , $1 *'',
|
||||||
|
ifelse(LLVM_VERSION, LLVM_3_9,
|
||||||
|
``$1 , $1 *'',
|
||||||
``$1 *''
|
``$1 *''
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ define(`PTR_OP_ARGS',
|
|||||||
ifelse(LLVM_VERSION, LLVM_3_7,
|
ifelse(LLVM_VERSION, LLVM_3_7,
|
||||||
``$1 , $1 *'',
|
``$1 , $1 *'',
|
||||||
LLVM_VERSION, LLVM_3_8,
|
LLVM_VERSION, LLVM_3_8,
|
||||||
|
``$1 , $1 *'',
|
||||||
|
LLVM_VERSION, LLVM_3_9,
|
||||||
``$1 , $1 *'',
|
``$1 , $1 *'',
|
||||||
``$1 *''
|
``$1 *''
|
||||||
)
|
)
|
||||||
@@ -64,6 +66,8 @@ define(`PTR_OP_ARGS',
|
|||||||
|
|
||||||
define(`MdORi64',
|
define(`MdORi64',
|
||||||
ifelse(LLVM_VERSION, LLVM_3_8,
|
ifelse(LLVM_VERSION, LLVM_3_8,
|
||||||
|
``i64'',
|
||||||
|
LLVM_VERSION, LLVM_3_9,
|
||||||
``i64'',
|
``i64'',
|
||||||
``double''
|
``double''
|
||||||
)
|
)
|
||||||
@@ -71,6 +75,8 @@ define(`MdORi64',
|
|||||||
|
|
||||||
define(`MfORi32',
|
define(`MfORi32',
|
||||||
ifelse(LLVM_VERSION, LLVM_3_8,
|
ifelse(LLVM_VERSION, LLVM_3_8,
|
||||||
|
``i32'',
|
||||||
|
LLVM_VERSION, LLVM_3_9,
|
||||||
``i32'',
|
``i32'',
|
||||||
``float''
|
``float''
|
||||||
)
|
)
|
||||||
@@ -1564,7 +1570,7 @@ define <$1 x $2> @__atomic_compare_exchange_$3_global($2* %ptr, <$1 x $2> %cmp,
|
|||||||
%cmp_LANE_ID = extractelement <$1 x $2> %cmp, i32 LANE
|
%cmp_LANE_ID = extractelement <$1 x $2> %cmp, i32 LANE
|
||||||
%val_LANE_ID = extractelement <$1 x $2> %val, i32 LANE
|
%val_LANE_ID = extractelement <$1 x $2> %val, i32 LANE
|
||||||
|
|
||||||
;; 3.5, 3.6, 3.7 and 3.8 code is the same since m4 has no OR and AND operators
|
;; 3.5, 3.6, 3.7, 3.8 and 3.9 code is the same since m4 has no OR and AND operators
|
||||||
ifelse(LLVM_VERSION,LLVM_3_5,`
|
ifelse(LLVM_VERSION,LLVM_3_5,`
|
||||||
%r_LANE_ID_t = cmpxchg $2 * %ptr, $2 %cmp_LANE_ID, $2 %val_LANE_ID seq_cst seq_cst
|
%r_LANE_ID_t = cmpxchg $2 * %ptr, $2 %cmp_LANE_ID, $2 %val_LANE_ID seq_cst seq_cst
|
||||||
%r_LANE_ID = extractvalue { $2, i1 } %r_LANE_ID_t, 0
|
%r_LANE_ID = extractvalue { $2, i1 } %r_LANE_ID_t, 0
|
||||||
@@ -1577,6 +1583,9 @@ define <$1 x $2> @__atomic_compare_exchange_$3_global($2* %ptr, <$1 x $2> %cmp,
|
|||||||
',LLVM_VERSION,LLVM_3_8,`
|
',LLVM_VERSION,LLVM_3_8,`
|
||||||
%r_LANE_ID_t = cmpxchg $2 * %ptr, $2 %cmp_LANE_ID, $2 %val_LANE_ID seq_cst seq_cst
|
%r_LANE_ID_t = cmpxchg $2 * %ptr, $2 %cmp_LANE_ID, $2 %val_LANE_ID seq_cst seq_cst
|
||||||
%r_LANE_ID = extractvalue { $2, i1 } %r_LANE_ID_t, 0
|
%r_LANE_ID = extractvalue { $2, i1 } %r_LANE_ID_t, 0
|
||||||
|
',LLVM_VERSION,LLVM_3_9,`
|
||||||
|
%r_LANE_ID_t = cmpxchg $2 * %ptr, $2 %cmp_LANE_ID, $2 %val_LANE_ID seq_cst seq_cst
|
||||||
|
%r_LANE_ID = extractvalue { $2, i1 } %r_LANE_ID_t, 0
|
||||||
',`
|
',`
|
||||||
%r_LANE_ID = cmpxchg $2 * %ptr, $2 %cmp_LANE_ID, $2 %val_LANE_ID seq_cst
|
%r_LANE_ID = cmpxchg $2 * %ptr, $2 %cmp_LANE_ID, $2 %val_LANE_ID seq_cst
|
||||||
')
|
')
|
||||||
@@ -1589,7 +1598,7 @@ define <$1 x $2> @__atomic_compare_exchange_$3_global($2* %ptr, <$1 x $2> %cmp,
|
|||||||
|
|
||||||
define $2 @__atomic_compare_exchange_uniform_$3_global($2* %ptr, $2 %cmp,
|
define $2 @__atomic_compare_exchange_uniform_$3_global($2* %ptr, $2 %cmp,
|
||||||
$2 %val) nounwind alwaysinline {
|
$2 %val) nounwind alwaysinline {
|
||||||
;; 3.5, 3.6, 3.7 and 3.8 code is the same since m4 has no OR and AND operators
|
;; 3.5, 3.6, 3.7, 3.8 and 3.9 code is the same since m4 has no OR and AND operators
|
||||||
ifelse(LLVM_VERSION,LLVM_3_5,`
|
ifelse(LLVM_VERSION,LLVM_3_5,`
|
||||||
%r_t = cmpxchg $2 * %ptr, $2 %cmp, $2 %val seq_cst seq_cst
|
%r_t = cmpxchg $2 * %ptr, $2 %cmp, $2 %val seq_cst seq_cst
|
||||||
%r = extractvalue { $2, i1 } %r_t, 0
|
%r = extractvalue { $2, i1 } %r_t, 0
|
||||||
@@ -1602,6 +1611,9 @@ define $2 @__atomic_compare_exchange_uniform_$3_global($2* %ptr, $2 %cmp,
|
|||||||
',LLVM_VERSION,LLVM_3_8,`
|
',LLVM_VERSION,LLVM_3_8,`
|
||||||
%r_t = cmpxchg $2 * %ptr, $2 %cmp, $2 %val seq_cst seq_cst
|
%r_t = cmpxchg $2 * %ptr, $2 %cmp, $2 %val seq_cst seq_cst
|
||||||
%r = extractvalue { $2, i1 } %r_t, 0
|
%r = extractvalue { $2, i1 } %r_t, 0
|
||||||
|
',LLVM_VERSION,LLVM_3_9,`
|
||||||
|
%r_t = cmpxchg $2 * %ptr, $2 %cmp, $2 %val seq_cst seq_cst
|
||||||
|
%r = extractvalue { $2, i1 } %r_t, 0
|
||||||
',`
|
',`
|
||||||
%r = cmpxchg $2 * %ptr, $2 %cmp, $2 %val seq_cst
|
%r = cmpxchg $2 * %ptr, $2 %cmp, $2 %val seq_cst
|
||||||
')
|
')
|
||||||
|
|||||||
2
ispc.h
2
ispc.h
@@ -41,7 +41,7 @@
|
|||||||
#include "ispc_version.h"
|
#include "ispc_version.h"
|
||||||
|
|
||||||
#if ISPC_LLVM_VERSION < OLDEST_SUPPORTED_LLVM || ISPC_LLVM_VERSION > LATEST_SUPPORTED_LLVM
|
#if ISPC_LLVM_VERSION < OLDEST_SUPPORTED_LLVM || ISPC_LLVM_VERSION > LATEST_SUPPORTED_LLVM
|
||||||
#error "Only LLVM 3.2, 3.3, 3.4, 3.5, 3.6, 3.7 and 3.8 development branch are supported"
|
#error "Only LLVM 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8 and 3.9 development branch are supported"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
|||||||
@@ -50,9 +50,10 @@
|
|||||||
#define ISPC_LLVM_3_6 30600
|
#define ISPC_LLVM_3_6 30600
|
||||||
#define ISPC_LLVM_3_7 30700
|
#define ISPC_LLVM_3_7 30700
|
||||||
#define ISPC_LLVM_3_8 30800
|
#define ISPC_LLVM_3_8 30800
|
||||||
|
#define ISPC_LLVM_3_9 30900
|
||||||
|
|
||||||
#define OLDEST_SUPPORTED_LLVM ISPC_LLVM_3_2
|
#define OLDEST_SUPPORTED_LLVM ISPC_LLVM_3_2
|
||||||
#define LATEST_SUPPORTED_LLVM ISPC_LLVM_3_8
|
#define LATEST_SUPPORTED_LLVM ISPC_LLVM_3_9
|
||||||
|
|
||||||
#ifdef __ispc__xstr
|
#ifdef __ispc__xstr
|
||||||
#undef __ispc__xstr
|
#undef __ispc__xstr
|
||||||
|
|||||||
Reference in New Issue
Block a user