[llvm] [SandboxIR] Add callbacks for instruction insert/remove/move ops. (PR #112965)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 12:59:58 PDT 2024


================
@@ -48,6 +61,21 @@ class Context {
   /// Type objects.
   DenseMap<llvm::Type *, std::unique_ptr<Type, TypeDeleter>> LLVMTypeToTypeMap;
 
+  /// Callbacks called when an IR instruction is about to get removed. Keys are
+  /// used as IDs for deregistration.
+  DenseMap<int, RemoveInstrCallback> RemoveInstrCallbacks;
----------------
tschuett wrote:

Do you want to keep them as ints or:
```
using ID = int;
```
?

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


More information about the llvm-commits mailing list