[Mlir-commits] [clang] [llvm] [mlir] [NVPTX] Convert vector function nvvm.annotations to attributes (PR #127736)
Alex MacLean
llvmlistbot at llvm.org
Wed Feb 19 12:53:17 PST 2025
================
@@ -196,6 +198,36 @@ static std::optional<unsigned> getFnAttrParsedInt(const Function &F,
: std::nullopt;
}
+static SmallVector<unsigned, 3> getFnAttrParsedVector(const Function &F,
+ StringRef Attr) {
+ SmallVector<unsigned, 3> V;
+ auto &Ctx = F.getContext();
+
+ if (F.hasFnAttribute(Attr)) {
+ StringRef S = F.getFnAttribute(Attr).getValueAsString();
+ for (unsigned I = 0; I < 3 && !S.empty(); I++) {
----------------
AlexMaclean wrote:
Added
https://github.com/llvm/llvm-project/pull/127736
More information about the Mlir-commits
mailing list