I am new to MLIR and my question is quit basic so I’m sorry if I have missed something obvious.
I would like to implement a pass that along with some transformations it also collects information.
I would then like to use this info but only when that specific pass finishes. Alternatively, I would like to pass information from one pass to the next. Either would do.
Here is what I know:
Passclass provides a hook called
runOnOperationwhich - from what I understand - runs multiple times for each matching Op. However, I would like to collect information across all these calls.
PassInstrumentationclass looked promising at first but it seems that it runs before/after every pass which seems a bit too much for me (I would like to run something after only one specific pass).
I just couldn’t find anything related in the documentation, examples, or the code yet.
Thank you in advance !