Dynamic loading of custom passes in wasm-opt
Hi, I created my own pass that instruments all the malloc/calloc/realloc/free calls in the WASM binary so I can very precisely track the heap memory usage. I don't think my usecase is generic enough to include the pass in the upstream wasm-opt (although I wouldn't mind doing that if maintainers are happy to accept it), so I thought I'll compile it as DSO library and load it dynamically.
I realized that wasm-opt doesn't have an option to dynamically load passes from DSOs; was that functionality ever considered and/or is there a plan to add such feature?
We've thought in the past that it would be neat to be able to have pass plugins, but we've never made plans to actually work on such a feature.
FWIW, I think we would be happy to take a pass for tracking memory usage upstream.