-print-after IR printing generally can not print the IR unit (Loop or SCC) which has just been invalidated by the pass.
However, when working in -print-module-scope mode even if Loop was invalidated there is still a valid module
that we can print.
Since we can not access invalidated IR unit from AfterPassInvalidated instrumentation point we can remember
the module to be printed *before* pass. This change introduces BeforePass instrumentation that stores all the
information required for module printing into the stack and then after pass (in AfterPassInvalidated) just print
whatever has been placed on stack.