[PATCH] D133392: [MTE] Add AArch64GlobalsTagging Pass

Evgenii Stepanov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 9 11:51:43 PDT 2022


eugenis added a comment.

Change description says that the new pass "marks them as tagged". That's not what is happening.



================
Comment at: llvm/lib/CodeGen/GlobalMerge.cpp:657
+    // Tagged global variables shouldn't be merged, as they are assigned unique
+    // memory tags at runtime.
+    if (GV.isTagged())
----------------
This comment is not convincing. The change description is right that some globals can be merged, copy that here, or extend the comment a little to explain why and under what assumptions.


================
Comment at: llvm/lib/MC/ELFObjectWriter.cpp:1344
+  // when relocating `end` symbols, and this can only be determined by the
+  // attributes of the symbol itself.
+  if (Sym->isMemtag())
----------------
Isn't a bigger reason that we need to know the address tag to put on the pointer, and that requires a symbol, not a section reference?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133392/new/

https://reviews.llvm.org/D133392



More information about the cfe-commits mailing list