-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[NVPTX] Add support for Shared Cluster Memory address space [1/2] #135444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
12532e4
327c0c8
2318ddd
f7a17c4
56b6209
b72bd0b
1d29c84
c0637c6
36c29a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,13 +117,15 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeNVPTXTarget() { | |
static std::string computeDataLayout(bool is64Bit, bool UseShortPointers) { | ||
std::string Ret = "e"; | ||
|
||
if (!is64Bit) | ||
Ret += "-p:32:32"; | ||
else if (UseShortPointers) | ||
Ret += "-p3:32:32-p4:32:32-p5:32:32"; | ||
|
||
// Tensor Memory (addrspace:6) is always 32-bits. | ||
Ret += "-p6:32:32"; | ||
// Distributed Shared Memory (addrspace:7) follows shared memory | ||
// (addrspace:3). | ||
if (!is64Bit) | ||
Ret += "-p:32:32-p6:32:32-p7:32:32"; | ||
else if (UseShortPointers) { | ||
Ret += "-p3:32:32-p4:32:32-p5:32:32-p6:32:32-p7:32:32"; | ||
} else | ||
Ret += "-p6:32:32"; | ||
durga4github marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Ret += "-i64:64-i128:128-v16:16-v32:32-n16:32:64"; | ||
|
||
|
@@ -280,8 +282,10 @@ NVPTXTargetMachine::getPredicatedAddrSpace(const Value *V) const { | |
case Intrinsic::nvvm_isspacep_local: | ||
return std::make_pair(II->getArgOperand(0), llvm::ADDRESS_SPACE_LOCAL); | ||
case Intrinsic::nvvm_isspacep_shared: | ||
case Intrinsic::nvvm_isspacep_shared_cluster: | ||
return std::make_pair(II->getArgOperand(0), llvm::ADDRESS_SPACE_SHARED); | ||
case Intrinsic::nvvm_isspacep_shared_cluster: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically this is conservative since |
||
return std::make_pair(II->getArgOperand(0), | ||
llvm::ADDRESS_SPACE_SHARED_CLUSTER); | ||
default: | ||
break; | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.