[llvm] [MemProf] Allow hint update on existing calls to nobuiltin hot/cold new (PR #156476)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 09:01:24 PDT 2025


================
@@ -1719,6 +1719,37 @@ Value *LibCallSimplifier::optimizeRealloc(CallInst *CI, IRBuilderBase &B) {
   return nullptr;
 }
 
+// Allow existing calls to operator new() that takes a __hot_cold_t parameter to
+// be updated with a compiler-determined hot cold hint value. This is used in
+// cases where the call is marked nobuiltin (because operator new called
+// explicitly) and therefore cannot be replaced with a different callee.
----------------
snehasish wrote:

Do you know why the distinction of being called explicitly matters for builtin vs no-builtin?

https://github.com/llvm/llvm-project/pull/156476


More information about the llvm-commits mailing list