[NewPM] Bail out of devirtualization wrapper if the current SCC is invalidated
authorArthur Eubanks <aeubanks@google.com>
Mon, 19 Jul 2021 20:20:57 +0000 (13:20 -0700)
committerArthur Eubanks <aeubanks@google.com>
Mon, 19 Jul 2021 22:07:30 +0000 (15:07 -0700)
commit6cbb35dd3b2f115105d2d9b6da52f2bfc337891c
treeefc60a5e4eec8b157391e9e2bc1ecac1c216eb56
parent0268e123bea5bbfe64c625203cfe3b159e85b2dc
[NewPM] Bail out of devirtualization wrapper if the current SCC is invalidated

The specific case that triggered this was when inlining a recursive
internal function into itself caused the recursion to go away, allowing
the inliner to mark the function as dead. The inliner marks the SCC as
invalidated but does not provide a new SCC to continue with.

This matches the implementations of ModuleToPostOrderCGSCCPassAdaptor
and CGSCCPassManager.

Fixes PR50363.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D106306
llvm/lib/Analysis/CGSCCPassManager.cpp
llvm/test/Other/devirt-invalidated.ll [new file with mode: 0644]