I have a project where the following situation happens repeatedly. There exists a rather expensive (e.g., polyhedral model) yet frequently used analysis that expects the ops it process to have passed the verifier. At the same time, the verification logic itself largely overlaps with the analysis, and is similarly expensive. I’d like to reuse the results of the expensive computation between the analysis and the verifier.
It looks like most of what I need can be achieved by giving the op verification hook access to the analysis manager. In this case, the verifier will get the analysis from the manager, and the following passes will be able to reuse it. If passes preserve the analysis, the verifier can reuse it again. This looks like mostly plumbing work, and is in theory sufficient for my use case.
A potentially more interesting scenario is a failable analysis, i.e., a situation where an analysis cannot be performed, which indicates a problem with the IR and should be reported by the verifier. It’s unclear to me whether we would like to support such things natively in the infrastructure or not.