[NewPM] fixing asserts on deleted loop in -print-after-all

IR-printing AfterPass instrumentation might be called on a loop
that has just been invalidated. We should skip printing it to
avoid spurious asserts.

Reviewed By: chandlerc, philip.pfaffe
Differential Revision: https://reviews.llvm.org/D54740

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348887 91177308-0d34-0410-b5e6-96231b3b80d8
11 files changed