[Mlir-commits] [mlir] [mlir][CallGraph] Add edges for callable symbol references in CallGraph (PR #116177)
Haocong Lu
llvmlistbot at llvm.org
Thu Dec 5 04:59:48 PST 2024
================
@@ -49,25 +51,70 @@ module attributes {test.name = "simple"} {
call_indirect %fn() : () -> ()
return
}
+
+ // CHECK: Node{{.*}}func_g
+ // CHECK: Ref-Edge{{.*}}func_c
+ // CHECK: Call-Edge{{.*}}Unknown-Callee-Node
+ func.func @func_g() -> (() -> ()) {
+ // A private symbol maybe escaped.
+ %0 = func.constant @func_c : () -> ()
+ call_indirect %0() : () -> ()
+ return %0 : () -> ()
+ }
+
+ // CHECK: Node{{.*}}func_h{{.*}}private
+ func.func private @func_h() {
+ return
+ }
+
+ // Referenced symbol declarations is ignored.
+ "live.user"() { use = @func_b } : () -> ()
----------------
Luhaocong wrote:
It's my bad description, what I want to test is "If a referenced symbol (func_b) only has declaration, there would not be a reference edge from external node to it", as `CHECK-NOT` show below.
https://github.com/llvm/llvm-project/pull/116177
More information about the Mlir-commits
mailing list