================ @@ -0,0 +1,50 @@ +;; Tests that we store the type identifiers in .callgraph section of the binary. + +; RUN: llc --call-graph-section -filetype=obj -o - < %s | \ +; RUN: llvm-readelf -x .callgraph - | FileCheck %s + +declare void @foo() + +declare noundef i32 @bar(i8 signext) + +declare noundef ptr @baz(ptr) + +define dso_local void @main() { +entry: + %retval = alloca i32, align 4 + %fp_foo = alloca ptr, align 8 + %a = alloca i8, align 1 + %fp_bar = alloca ptr, align 8 + %fp_baz = alloca ptr, align 8 + store i32 0, ptr %retval, align 4 + store ptr @foo, ptr %fp_foo, align 8 + %fp_foo_val = load ptr, ptr %fp_foo, align 8 + call void (...) %fp_foo_val(), !callee_type !1 + store ptr @bar, ptr %fp_bar, align 8 + %fp_bar_val = load ptr, ptr %fp_bar, align 8 + %a_val = load i8, ptr %a, align 1 + %call_fp_bar = call i32 %fp_bar_val(i8 signext %a_val), !callee_type !3 + store ptr @baz, ptr %fp_baz, align 8 + %fp_baz_val = load ptr, ptr %fp_baz, align 8 + %call_fp_baz = call ptr %fp_baz_val(ptr %a), !callee_type !5 + call void @foo() + %a_val_2 = load i8, ptr %a, align 1 + %call_bar = call i32 @bar(i8 signext %a_val_2) ---------------- Prabhuk wrote:
#119468 PR has the detailed documentation. It talks about the type metadata being added to indirect callsites alone. I can make an explicit callout to the fact that no metadata will be attached to the direct call sites. https://github.com/llvm/llvm-project/pull/87576 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits