Avoid redundant work when computing vtable vcall visibility
authorTeresa Johnson <tejohnson@google.com>
Tue, 17 Nov 2020 22:44:25 +0000 (14:44 -0800)
committerTeresa Johnson <tejohnson@google.com>
Tue, 24 Nov 2020 20:06:24 +0000 (12:06 -0800)
commit0768b0576a938b6a4832884384fcb02cd2f74e09
tree223bcf409327cdc7550c7b45f34d178225c55c51
parentc24708102501115efae27f82c24d5991059a5770
Avoid redundant work when computing vtable vcall visibility

Add a Visited set to avoid repeatedly processing the same base classes
in complex class hierarchies. This cut down the compile time of one
source file from >12min to ~1min.

Differential Revision: https://reviews.llvm.org/D91676
clang/lib/CodeGen/CGVTables.cpp
clang/lib/CodeGen/CodeGenModule.h
clang/lib/CodeGen/MicrosoftCXXABI.cpp