[PATCH] D149600: [MemProf] Recognize hot/cold operator new as replaceable allocations

Snehasish Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 1 11:29:48 PDT 2023


snehasish accepted this revision.
snehasish added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: clang/test/CodeGenCXX/new_hot_cold.cpp:16
+
+enum class __hot_cold_t : uint8_t;
+namespace malloc_namespace {
----------------
Can we skip the typedef and just say `enum class __hot_cold_t : unsigned char;`?

Also it might be useful to link to the tcmalloc documentation for hot_cold_t to document the expected underlying type?
https://github.com/google/tcmalloc/blob/220043886d4e2efff7a5702d5172cb8065253664/tcmalloc/malloc_extension.h#L53




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149600



More information about the cfe-commits mailing list