[Polly] Invalidate passes after Scop processing in NewPM.
ScopDetection's DetectionContext holds AssertionVH for
RequiredInvariantLoads. An assertion is thrown if the handle's value is
erased and the ScopDetection is not yet invalidated. The ScopDetection
must remain valid durting the ScopPassManager. Enusure that all Scop
analyses are free'd when the ScopPass manager is done.
If IR generation has happened, also invalidate all other passes to avoid
possible issues because, like for the legacy pass manager, Polly does not
yet perfectly preserve them.
1 file changed