generating proper tasking function for nvptx
This commit is contained in:
23
type.cpp
23
type.cpp
@@ -2957,16 +2957,19 @@ FunctionType::LLVMFunctionType(llvm::LLVMContext *ctx, bool removeMask) const {
|
||||
// hold them until the task actually runs.)
|
||||
llvm::Type *st = llvm::StructType::get(*ctx, llvmArgTypes);
|
||||
callTypes.push_back(llvm::PointerType::getUnqual(st));
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // threadIndex
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // threadCount
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskIndex
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskCount
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskIndex0
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskIndex1
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskIndex2
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskCount0
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskCount1
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskCount2
|
||||
if (g->target->getISA() != Target::NVPTX64)
|
||||
{
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // threadIndex
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // threadCount
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskIndex
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskCount
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskIndex0
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskIndex1
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskIndex2
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskCount0
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskCount1
|
||||
callTypes.push_back(LLVMTypes::Int32Type); // taskCount2
|
||||
}
|
||||
}
|
||||
else
|
||||
// Otherwise we already have the types of the arguments
|
||||
|
||||
Reference in New Issue
Block a user