This patch changes the Profile function to match the FunctionProtoType constructor, which uses epi.ExceptionSpec.SourceDecl and not epi.ExceptionSpec.SourceDecl->getCanonicalDecl(). This change eliminates an inconsistency that was observed within the FunctionProtoTypes set by adding a verification function to FoldingSet to assert that all items in the set still hash to their current bucket. Asserting this verification showed that some FunctionProtoTypes no longer hashed to their original bucket. This inconsistency was not catastrophic because of self-correction -- FoldingSet does not store hashes and recomputes them whenever it rebuckets. Thus, it's not possible to observe the issue immediately after rebucketing. Comparing the before and after profiles of a FunctionProtoType that was in the wrong bucket showed that the only part of the profile that changed was epi.ExceptionSpec.SourceDecl->getCanonicalDecl(). After changing the profile function to match the constructor, no incorrectly bucketed FunctionProtoTypes were observed in a TU with ~2.6M prototypes.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo