================
@@ -375,11 +375,8 @@ void
CodeGenModule::handleCUDALaunchBoundsAttr(llvm::Function *F,
if (MinBlocks > 0) {
if (MinBlocksVal)
*MinBlocksVal = MinBlocks.getExtValue();
- if (F) {
- // Create !{<func-ref>, metadata !"minctasm", i32 <val>} node
- NVPTXTargetCodeGenInfo::addNVVMMetadata(F, "minctasm",
- MinBlocks.getExtValue());
- }
+ if (F)
+ F->addFnAttr("nvvm.minctasm", llvm::utostr(MinBlocks.getExtValue()));
----------------
jholewinski wrote:
We should eventually create a list of strings for valid `nvvm.` function
attributes and use them here instead of hard-coding strings. It would serve as
a single-source-of-truth for the set of valid attributes. Not necessary for
this PR, but something to consider for the future.
https://github.com/llvm/llvm-project/pull/125908
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits