identified bug due to llvm-3.4

This commit is contained in:
Evghenii
2013-11-14 21:18:25 +01:00
parent 1b940fd41e
commit 1445202e0e
4 changed files with 8 additions and 7 deletions

View File

@@ -36,7 +36,7 @@
# If you have your own special version of llvm and/or clang, change
# these variables to match.
LLVM_CONFIG=$(shell which /home/evghenii/usr/local/llvm/bin-3.3/bin/llvm-config)
LLVM_CONFIG=$(shell which /home/evghenii/usr/local/llvm/bin-trunk/bin/llvm-config)
CLANG_INCLUDE=$(shell $(LLVM_CONFIG) --includedir)
# Enable ARM by request

View File

@@ -8,7 +8,7 @@ LD=g++
LDFLAGS=-lcuda
ISPC=ispc
ISPCFLAGS=-O3 --math-lib=default --target=nvptx64,avx
ISPCFLAGS=-O3 --math-lib=default --target=nvptx64
LLVM32 = $(HOME)/usr/local/llvm/bin-3.2
LLVM = $(HOME)/usr/local/llvm/bin-3.3
@@ -37,7 +37,7 @@ $(PROG): $(CXX_OBJ) kernel.ptx
%_ispc_nvptx64.bc: %.ispc
$(ISPC) $(ISPCFLAGS) --emit-llvm -o `basename $< .ispc`_ispc.bc -h `basename $< .ispc`_ispc.h $< --emit-llvm
$(ISPC) $(ISPCFLAGS) --emit-llvm -o `basename $< .ispc`_ispc_nvptx64.bc -h `basename $< .ispc`_ispc.h $< --emit-llvm
%.ptx: %.bc
$(LLVM32DIS) $<

View File

@@ -8,7 +8,7 @@ LD=g++
LDFLAGS=-lcuda
ISPC=ispc
ISPCFLAGS=-O3 --math-lib=default --target=nvptx64,avx
ISPCFLAGS=-O3 --math-lib=default --target=nvptx64
LLVM32 = $(HOME)/usr/local/llvm/bin-3.2
LLVM = $(HOME)/usr/local/llvm/bin-3.3
@@ -37,7 +37,7 @@ $(PROG): $(CXX_OBJ) kernel.ptx
%_ispc_nvptx64.bc: %.ispc
$(ISPC) $(ISPCFLAGS) --emit-llvm -o `basename $< .ispc`_ispc.bc -h `basename $< .ispc`_ispc.h $< --emit-llvm
$(ISPC) $(ISPCFLAGS) --emit-llvm -o `basename $< .ispc`_ispc_nvptx64.bc -h `basename $< .ispc`_ispc.h $< --emit-llvm
%.ptx: %.bc
$(LLVM32DIS) $<

View File

@@ -2334,7 +2334,7 @@ Module::CompileAndOutput(const char *srcFile,
char ptxname[] = "nvptx64";
for (int k = 0; k < 7; k++)
ptxname[k] = target[k];
if (target != NULL && strcmp(ptxname,"nvptx64") == 0) // NVPTX64
if (0) //target != NULL && strcmp(ptxname,"nvptx64") == 0) // NVPTX64
{
std::vector<std::string> targets = lExtractTargets(target);
Assert(targets.size() > 1);
@@ -2458,7 +2458,8 @@ Module::CompileAndOutput(const char *srcFile,
}
else if (target == NULL || strchr(target, ',') == NULL) {
// We're only compiling to a single target
g->target = new Target(arch, cpu, target, generatePIC);
const bool isPTX = strcmp(target, "nvptx64") == 0;
g->target = new Target(arch, cpu, target, generatePIC, isPTX);
if (!g->target->isValid())
return 1;