[Mlir-commits] [mlir] [mlir][CallGraph] Add edges for callable symbol references in CallGraph (PR #116177)
Markus Böck
llvmlistbot at llvm.org
Thu Dec 5 02:17:45 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 } : () -> ()
----------------
zero9178 wrote:
I am not sure I understand why this reference should be ignored. Couldn't the semantics of `live.user` be that it escapes `@func_b` somehow?
Good example of this would be an operation that is a global variable with an initialization body that uses `@func_b`.
https://github.com/llvm/llvm-project/pull/116177
More information about the Mlir-commits
mailing list