Merge pull request #876 from dbabokin/ptx_off

PTX support refinement
This commit is contained in:
Dmitry Babokin
2014-10-16 17:28:28 +04:00
3 changed files with 6 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ ARM_ENABLED=0
# Disable NVPTX by request
# To disable: make NVPTX_ENABLED=0
NVPTX_ENABLED=1
NVPTX_ENABLED=0
# Add llvm bin to the path so any scripts run will go to the right llvm-config
LLVM_BIN= $(shell $(LLVM_CONFIG) --bindir)

View File

@@ -226,7 +226,7 @@ def build_LLVM(version_LLVM, revision, folder, tarball, debug, selfbuild, extra,
try_do_LLVM("configure release version for selfbuild ",
"../" + LLVM_SRC + "/configure --prefix=" + llvm_home + "/" +
LLVM_BIN_selfbuild + " --enable-optimized" +
" --enable-targets=x86,x86_64" +
" --enable-targets=x86,x86_64,nvptx" +
((" --with-gcc-toolchain=" + gcc_toolchain_path) if gcc_toolchain_path != "" else "") +
mac_system_root,
from_validation)
@@ -244,7 +244,7 @@ def build_LLVM(version_LLVM, revision, folder, tarball, debug, selfbuild, extra,
try_do_LLVM("configure release version ",
"../" + LLVM_SRC + "/configure --prefix=" + llvm_home + "/" +
LLVM_BIN + " --enable-optimized" + selfbuild_compiler +
" --enable-targets=x86,x86_64" +
" --enable-targets=x86,x86_64,nvptx" +
((" --with-gcc-toolchain=" + gcc_toolchain_path) if gcc_toolchain_path != "" else "") +
mac_system_root,
from_validation)
@@ -257,7 +257,7 @@ def build_LLVM(version_LLVM, revision, folder, tarball, debug, selfbuild, extra,
try_do_LLVM("configure debug version ",
"../" + LLVM_SRC + "/configure --prefix=" + llvm_home + "/" + LLVM_BIN +
" --enable-debug-runtime --enable-debug-symbols --enable-keep-symbols" + selfbuild_compiler +
" --enable-targets=x86,x86_64" +
" --enable-targets=x86,x86_64,nvptx" +
((" --with-gcc-toolchain=" + gcc_toolchain_path) if gcc_toolchain_path != "" else "") +
mac_system_root,
from_validation)

View File

@@ -701,10 +701,12 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
"i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-"
"f80:128:128-n8:16:32:64-S128-v16:16:16-v32:32:32-v4:128:128";
}
#ifdef ISPC_NVPTX_ENABLED
else if (m_isa == Target::NVPTX)
{
dl_string = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64";
}
#endif
// 3. Finally set member data
m_dataLayout = new llvm::DataLayout(dl_string);