[PATCH] D92881: scudo: Fix quarantine allocation when MTE enabled.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 11:15:41 PST 2020


pcc added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/combined.h:103
+      // user allocation.
+      if (UNLIKELY(Allocator.useMemoryTagging()))
+        storeTags(reinterpret_cast<uptr>(Ptr),
----------------
hctim wrote:
> Are we sticking `UNLIKELY` around any memtag branches at this point? I feel like this might be a pain to undo when we actually have production devices that ship with this branch. Does it provide us a significant benefit?
Yes, I'm just being consistent with the other places where we are doing this. I don't remember if we ever measured the perf impact of `UNLIKELY` on non-MTE devices so maybe if we don't see a significant perf impact we could just remove them now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92881



More information about the llvm-commits mailing list