reversed to original changes. Here is the plan to use CDP and genarate only device code with host wrapper..

This commit is contained in:
Evghenii
2013-11-12 12:51:56 +01:00
parent 3fd76d59ea
commit 4cd7e10ad3
6 changed files with 24 additions and 13 deletions

View File

@@ -733,7 +733,7 @@ Module::AddFunctionDeclaration(const std::string &name,
if (storageClass == SC_EXTERN_C) {
// Make sure the user hasn't supplied both an 'extern "C"' and a
// 'task' qualifier with the function
if (functionType->isTask && !g->target->isPTX()) { //tISA() != Target::NVPTX64) {
if (functionType->isTask) { // && !g->target->isPTX()) { //tISA() != Target::NVPTX64) {
Error(pos, "\"task\" qualifier is illegal with C-linkage extern "
"function \"%s\". Ignoring this function.", name.c_str());
return;
@@ -795,7 +795,7 @@ Module::AddFunctionDeclaration(const std::string &name,
#else // LLVM 3.1 and 3.3+
function->addFnAttr(llvm::Attribute::AlwaysInline);
#endif
if (functionType->isTask && g->target->getISA() != Target::NVPTX64)
if (functionType->isTask) // && g->target->getISA() != Target::NVPTX64)
// This also applies transitively to members I think?
#if defined(LLVM_3_1)
function->setDoesNotAlias(1, true);
@@ -2327,7 +2327,7 @@ Module::CompileAndOutput(const char *srcFile,
g->PtxString = std::string();
for (int itarget = 0; itarget < 2; itarget++)
for (int itarget = 0; itarget < 1; itarget++)
{
fprintf(stderr, "compiling nvptx64 : target= %s\n",targets[itarget].c_str());
g->target = new Target(arch, cpu, targets[itarget].c_str(), generatePIC, /* isPTX= */ true);