identified bug due to llvm-3.4
This commit is contained in:
2
Makefile
2
Makefile
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
# If you have your own special version of llvm and/or clang, change
|
# If you have your own special version of llvm and/or clang, change
|
||||||
# these variables to match.
|
# 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)
|
CLANG_INCLUDE=$(shell $(LLVM_CONFIG) --includedir)
|
||||||
|
|
||||||
# Enable ARM by request
|
# Enable ARM by request
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ LD=g++
|
|||||||
LDFLAGS=-lcuda
|
LDFLAGS=-lcuda
|
||||||
|
|
||||||
ISPC=ispc
|
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
|
LLVM32 = $(HOME)/usr/local/llvm/bin-3.2
|
||||||
LLVM = $(HOME)/usr/local/llvm/bin-3.3
|
LLVM = $(HOME)/usr/local/llvm/bin-3.3
|
||||||
@@ -37,7 +37,7 @@ $(PROG): $(CXX_OBJ) kernel.ptx
|
|||||||
|
|
||||||
|
|
||||||
%_ispc_nvptx64.bc: %.ispc
|
%_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
|
%.ptx: %.bc
|
||||||
$(LLVM32DIS) $<
|
$(LLVM32DIS) $<
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ LD=g++
|
|||||||
LDFLAGS=-lcuda
|
LDFLAGS=-lcuda
|
||||||
|
|
||||||
ISPC=ispc
|
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
|
LLVM32 = $(HOME)/usr/local/llvm/bin-3.2
|
||||||
LLVM = $(HOME)/usr/local/llvm/bin-3.3
|
LLVM = $(HOME)/usr/local/llvm/bin-3.3
|
||||||
@@ -37,7 +37,7 @@ $(PROG): $(CXX_OBJ) kernel.ptx
|
|||||||
|
|
||||||
|
|
||||||
%_ispc_nvptx64.bc: %.ispc
|
%_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
|
%.ptx: %.bc
|
||||||
$(LLVM32DIS) $<
|
$(LLVM32DIS) $<
|
||||||
|
|||||||
@@ -2334,7 +2334,7 @@ Module::CompileAndOutput(const char *srcFile,
|
|||||||
char ptxname[] = "nvptx64";
|
char ptxname[] = "nvptx64";
|
||||||
for (int k = 0; k < 7; k++)
|
for (int k = 0; k < 7; k++)
|
||||||
ptxname[k] = target[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);
|
std::vector<std::string> targets = lExtractTargets(target);
|
||||||
Assert(targets.size() > 1);
|
Assert(targets.size() > 1);
|
||||||
@@ -2458,7 +2458,8 @@ Module::CompileAndOutput(const char *srcFile,
|
|||||||
}
|
}
|
||||||
else if (target == NULL || strchr(target, ',') == NULL) {
|
else if (target == NULL || strchr(target, ',') == NULL) {
|
||||||
// We're only compiling to a single target
|
// 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())
|
if (!g->target->isValid())
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user