This is an archive of the discontinued LLVM Phabricator instance.

[PredicateInfo] Use Intrinsic::getDeclaration now that it handles unnamed types.
ClosedPublic

Authored by jeroen.dobbelaere on Jul 16 2021, 6:26 AM.

Details

Summary

This is a second attempt to fix the EXPENSIVE_CHECKS issue that was mentioned In D91661#2875179 by @jroelofs.

(The first attempt was in D105983)

D91661 more or less completely reverted D49126 and by doing so also removed the cleanup logic of the created declarations and calls.
This patch is a replacement for D91661 (which must itself be reverted first). It only replaces the custom declaration creation with the generic version and shows the test impact.

Diff Detail

Event Timeline

jeroen.dobbelaere requested review of this revision.Jul 16 2021, 6:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2021, 6:26 AM
nikic added a comment.Jul 16 2021, 9:48 AM

Won't this also remove the declaration if there's a pre-existing use?

Won't this also remove the declaration if there's a pre-existing use?

No, but it might remove a declaration that is available but not used.

Only track newly introduced declarations for removal. Do not use the 'use count' to decide this.

This revision is now accepted and ready to land.Jul 28 2021, 9:49 AM
This revision was landed with ongoing or failed builds.Jul 28 2021, 10:31 AM
This revision was automatically updated to reflect the committed changes.
fhahn added a comment.Aug 3 2021, 6:04 AM

thanks for pushing this through!