================
@@ -402,6 +405,29 @@ void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes(
F->addFnAttr("amdgpu-max-num-workgroups", AttrVal.str());
}
+
+ if (auto *Attr = FD->getAttr<CUDAClusterDimsAttr>()) {
+ uint32_t X =
----------------
erichkeane wrote:
```
auto getVal(const Expr * E) { return
E->EvaluateKnownConstInt(M.getContext()).getExtValue()' };
```
Then you can just omit all X, Y, and Z (and avoid the problematic type here),
and make it:
```
llvm::interleaveComma({Attr->getX(), Attr->getY(), Attr->getZ()}, OS, [&](const
Expr *E){getVal(E); });
```
Instead of the comma stuff. Perhaps a cast/etc needed to get the init list to
form correctly though.
https://github.com/llvm/llvm-project/pull/156686
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits