[llvm] [MemProf] Optionally allow transformation of nobuiltin operator new (PR #158396)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 12 21:47:41 PDT 2025
================
@@ -524,8 +537,9 @@ define void @size_returning_aligned_test() {
%call4 = call {ptr, i64} @__size_returning_new_aligned(i64 10, i64 8) #8
%p4 = extractvalue {ptr, i64} %call4, 0
call void @dummy(ptr %p4)
- ;; Attribute cold on a nobuiltin call has no effect.
- ; HOTCOLD: @__size_returning_new_aligned(i64 10, i64 8)
+ ;; Attribute cold on a nobuiltin call has no effect, unless optionally enabled.
+ ; NOBUILTIN-OFF: @__size_returning_new_aligned(i64 10, i64 8)
+ ; NOBUILTIN-ON: @__size_returning_new_aligned_hot_cold(i64 10, i64 8, i8 [[COLD]])
%call3 = call {ptr, i64} @__size_returning_new_aligned(i64 10, i64 8) #6
----------------
teresajohnson wrote:
That's a good question. Here I have applied the attributes manually, but I need to check what is happening for them normally through the clang. That's orthogonal to this change though so I will commit this one and follow up on that.
https://github.com/llvm/llvm-project/pull/158396
More information about the llvm-commits
mailing list