[PATCH] D148718: [MemProf] Optionally pass hot/cold hints to operator new

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 12:43:57 PDT 2023


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

lgtm



================
Comment at: llvm/include/llvm/Transforms/Utils/BuildLibCalls.h:253
+  /// Emit a call to the hot/cold operator new function.
+  Value *emitHotColdNew(Value *Num, IRBuilderBase &B,
+                        const TargetLibraryInfo *TLI, LibFunc NewFunc,
----------------
tejohnson wrote:
> snehasish wrote:
> >  I think in the future we will have more hints to pass. Would that modify this method or add additional methods here? If we modify these should we name these to be more generic like "emitExtendedNew"?
> > 
> > 
> I'm not really sure yet, and I'm concerned that "Extended" isn't very clear (because presumably there could be many different types of operator new extensions in the future). So I think I would prefer to keep these specific to HotCold hints, and we can rename them if needed in the future. WDYT?
I don't have a strong opinion so we can leave it as is for now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148718



More information about the llvm-commits mailing list