[Mlir-commits] [mlir] [mlir][gpu] Add a symbol table field to TargetOptions and adjust GpuModuleToBinary (PR #65797)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Dec 12 05:30:06 PST 2023


================
@@ -100,6 +111,10 @@ class TargetOptions {
   /// Compilation process target representation.
   CompilationTarget compilationTarget;
 
+  /// Callback for obtaining the parent symbol table of all the GPU modules
+  /// being serialized.
+  function_ref<SymbolTable *()> getSymbolTableCallback;
----------------
peledins-zimperium wrote:

Is this safe?
function_ref says:
/// An efficient, type-erasing, non-owning reference to a callable. This is
/// intended for use as the type of a function parameter that is not used
/// after the function in question returns.
///
/// This class does not own the callable, so it is not in general safe to store
/// a function_ref.
So who owns  `= {}` here?

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


More information about the Mlir-commits mailing list