Only verify LazyCallGraph under expensive checks
authorArthur Eubanks <aeubanks@google.com>
Mon, 22 Feb 2021 21:36:29 +0000 (13:36 -0800)
committerArthur Eubanks <aeubanks@google.com>
Tue, 23 Feb 2021 04:18:59 +0000 (20:18 -0800)
commit468fa037b2a15a40f17329a995d058dda6049d28
tree4fd7543c8bfd29d31724f426923703970422dc1d
parent896d0e1a2a79caad35ede3385bbcfd7fe0702b43
Only verify LazyCallGraph under expensive checks

These verify calls are causing a lot of slowdown on some files, up to 8x.
The LazyCallGraph infra has been tested a lot over the years, so I'm fairly confident that we don't always need to run the verifys.

These verifies took >90% of total time in one of the compilations I looked at.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D97225
llvm/lib/Analysis/CGSCCPassManager.cpp
llvm/lib/Analysis/LazyCallGraph.cpp