[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
Mon Feb 23 07:43:44 PST 2026
================
@@ -653,15 +653,26 @@ std::string Attribute::getAsString(bool InAttrGrp) const {
OS << getModRefStr(OtherMR);
}
+ bool TargetPrintedForAll = false;
for (auto Loc : MemoryEffects::locations()) {
ModRefInfo MR = ME.getModRef(Loc);
if (MR == OtherMR)
continue;
- if (!First)
+ if (!First && !TargetPrintedForAll)
OS << ", ";
First = false;
+ if (ME.isTargetMemLoc(Loc) && ME.isTargetMemLocSameForAll()) {
----------------
CarolineConcatto wrote:
I left a comments in the code saying it needs change in the future if we increase the number of target memories
https://github.com/llvm/llvm-project/pull/176968
More information about the Mlir-commits
mailing list