Commit Graph

2 Commits

Author SHA1 Message Date
Arthur Eubanks 0cdd671df9 [CGSCC][DevirtWrapper] Properly handle invalidating analyses for invalidated SCCs
f77342693 handled the adaptor and pass manager but missed the devirt wrapper.
2022-09-29 09:55:23 -07:00
Arthur Eubanks f77342693b [CGSCC] Properly handle invalidating analyses for invalidated SCCs
Currently if we mark an SCC as invalid, if we haven't set UR.UpdatedC, we won't propagate the PreservedAnalyses up to the parent pass (adaptor/pass manager).

In the provided test case, we inline the function into itself then delete it as it has no users. The SCC is marked as invalid without providing a replacement UR.UpdatedC. Then the CGSCC pass manager and adaptor discard the PreservedAnalyses. Instead, handle PreservedAnalyses first before bailing due to the invalid SCC.

Fixes crashes due to out of date analyses.
2022-09-21 09:50:00 -07:00