[Mlir-commits] [clang] [llvm] [mlir] [LLVM] Improve IR parsing and printing for target memory locations (PR #176968)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Mar 18 11:59:44 PDT 2026


================
@@ -2609,18 +2609,27 @@ bool LLParser::parseAllocKind(AllocFnKind &Kind) {
   return false;
 }
 
-static std::optional<MemoryEffects::Location> keywordToLoc(lltok::Kind Tok) {
+static std::optional<SmallVector<MemoryEffects::Location, 2>>
+keywordToLoc(lltok::Kind Tok) {
+  using Loc = IRMemLocation;
+
   switch (Tok) {
   case lltok::kw_argmem:
-    return IRMemLocation::ArgMem;
+    return SmallVector<Loc, 2>{Loc::ArgMem};
----------------
CarolineConcatto wrote:

Changes made in keywordToLoc, now it is using std::optional and remove the smalvector repetition.

https://github.com/llvm/llvm-project/pull/176968


More information about the Mlir-commits mailing list