This is an archive of the discontinued LLVM Phabricator instance.

[clang][deps] Modules don't contribute to search path usage
ClosedPublic

Authored by jansvoboda11 on Mar 9 2022, 7:57 AM.

Details

Summary

To reduce the number of modules we build in explicit builds (which use strict context hash), we prune unused header search paths. This essentially merges parts of the dependency graph.

Determining whether a search path was used to discover a module (through implicit module maps) proved to be somewhat complicated. Initial support landed in D102923, while D113676 attempts to fix some bugs.

However, now that we don't use implicit module maps in explicit builds (since D120465), we don't need to consider such search paths as used anymore. Modules are no longer discovered through the header search mechanism, so we can drop such search paths (provided they are not needed for other reasons).

This patch removes whatever support for detecting such usage we had, since it's buggy and not required anymore.

Depends on D120465.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Mar 9 2022, 7:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2022, 7:57 AM
jansvoboda11 requested review of this revision.Mar 9 2022, 7:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2022, 7:57 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dexonsmith added inline comments.Mar 14 2022, 10:45 AM
clang/lib/Lex/HeaderSearch.cpp
307

This triggers a bunch of noise in this patch. Is it possible to make this change either before or after, to avoid the noise, giving that there's a functional change hiding here?

Undo unrelated changes

dexonsmith accepted this revision.Mar 15 2022, 12:50 PM

Nice! LGTM.

This revision is now accepted and ready to land.Mar 15 2022, 12:50 PM