PTX support is off by default.

Fix to make it compile with PTX support off by default.
This commit is contained in:
Dmitry Babokin
2014-10-16 17:20:26 +04:00
parent 30270584aa
commit 17ee085396
2 changed files with 3 additions and 1 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

@@ -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);