Find all material instances that use a specific override

I’m doing an optimization pass, I’ve got a master material that’s used in 200+ instances and I want to find out how many and which instances use the different parameters and overrides.

For example, the master material has a ‘sparkle’ effect that can be switched on that is very expensive - I want to find all the material instances that actually use it.