Enabling LLVM 5.0 and making fixes to track changes in LLVM for the past

couple months.
The changes are tested with LLVM 3.9, 4.0 and trunk on MacOS (sse4,
avx2, skx).
This commit is contained in:
Dmitry Babokin
2017-03-01 11:10:34 -08:00
parent d0bfe7738a
commit 6d649e1dff
12 changed files with 99 additions and 16 deletions

View File

@@ -137,6 +137,9 @@ def checkout_LLVM(component, use_git, version_LLVM, revision, target_dir, from_v
if version_LLVM == "trunk":
SVN_PATH="trunk"
GIT_BRANCH="master"
elif version_LLVM == "4_0":
SVN_PATH="branches/release_40"
GIT_BRANCH="release_40"
elif version_LLVM == "3_9":
SVN_PATH="tags/RELEASE_390/final"
GIT_BRANCH="release_39"
@@ -392,6 +395,7 @@ def unsupported_llvm_targets(LLVM_VERSION):
"3.8":[],
"3.9":[],
"4.0":[],
"5.0":[],
"trunk":[]}
return prohibited_list[LLVM_VERSION]
@@ -518,8 +522,10 @@ def build_ispc(version_LLVM, make):
temp = "3_8"
if version_LLVM == "3.9":
temp = "3_9"
if version_LLVM == "trunk":
if version_LLVM == "4.0":
temp = "4_0"
if version_LLVM == "trunk":
temp = "5_0"
os.environ["LLVM_VERSION"] = "LLVM_" + temp
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)
@@ -659,7 +665,7 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
archs.append("x86-64")
if "native" in only:
sde_targets_t = []
for i in ["3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "trunk"]:
for i in ["3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "4.0", "trunk"]:
if i in only:
LLVM.append(i)
if "current" in only:
@@ -945,7 +951,7 @@ def Main():
if os.environ.get("SMTP_ISPC") == None:
error("you have no SMTP_ISPC in your environment for option notify", 1)
if options.only != "":
test_only_r = " 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 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 3.9 4.0 trunk current build stability performance x86 x86-64 x86_64 -O0 -O2 native debug nodebug "
test_only = options.only.split(" ")
for iterator in test_only:
if not (" " + iterator + " " in test_only_r):
@@ -1058,7 +1064,7 @@ if __name__ == '__main__':
llvm_group = OptionGroup(parser, "Options for building LLVM",
"These options must be used with -b option.")
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 3.8 3.9 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 3.9 4.0 trunk. Default: trunk', default="trunk")
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 ' +
'you have alternative gcc installation. Note that otherwise gcc from standard ' +
@@ -1101,7 +1107,7 @@ if __name__ == '__main__':
run_group.add_option('--only', dest='only',
help='set types of tests. Possible values:\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, 3.8, 3.9, 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, 3.9, 4.0, trunk, native (do not use SDE),\n' +
'current (do not rebuild ISPC), debug (only with debug info), nodebug (only without debug info, default).',
default="")
run_group.add_option('--perf_LLVM', dest='perf_llvm',