now nvptx allows extern "C" task void, which is emits a kernel that should (?) be callable by driver API from external code
This commit is contained in:
@@ -733,11 +733,13 @@ 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 0 /* NVPTX64::task_and_externC */
|
||||
if (functionType->isTask) {
|
||||
Error(pos, "\"task\" qualifier is illegal with C-linkage extern "
|
||||
"function \"%s\". Ignoring this function.", name.c_str());
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
std::vector<Symbol *> funcs;
|
||||
symbolTable->LookupFunction(name.c_str(), &funcs);
|
||||
@@ -795,7 +797,7 @@ Module::AddFunctionDeclaration(const std::string &name,
|
||||
#else // LLVM 3.1 and 3.3+
|
||||
function->addFnAttr(llvm::Attribute::AlwaysInline);
|
||||
#endif
|
||||
if (functionType->isTask)
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user