Skip to content

Create helper script to run IWYU on Halide #6251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Conversation

steven-johnson
Copy link
Contributor

My main workstation was offline friday afternoon thru monday morning, so I took the opportunity to try to plug in IWYU, which is infamously ticklish to get right. This PR includes a helper script to run it, along with a 'mapping' file and a handful of changes to source code to enable IWYU to avoid getting confused and making a mess. (There will be a dependent PR off of this one that will actually apply IWYU.)

In theory, this sort of cleanup could improve compile speed; however, I'm not noticing anything meaningful in my local timings (though perhaps the armbots may notice a change). The appeal is more one of appealing to OCD, frankly.

Please note that unlike clang-format or clang-tidy, this is NOT intended to be run on a regular basis (and certainly not as a presubmit check); because of the nature of C++ includes, getting IWYU is a bit of a black art and fairly system dependent. I only bothered to get this running correctly on OSX using a Homebrew-installed IWYU 0.16; running on anything else is likely to require manual tweaking and examination every time this is used, which should be infrequent.

@steven-johnson steven-johnson added the skip_buildbots Do not run buildbots on this PR. Must add before opening PR as we scan labels immediately. label Oct 21, 2021
@steven-johnson
Copy link
Contributor Author

I'm going to convert this to draft (but leave it open), since it seems unlikely to be of interest any time soon. (I'll harvest a couple of minor changes to land separately).

@steven-johnson steven-johnson marked this pull request as draft October 21, 2021 16:41
@steven-johnson steven-johnson removed the request for review from abadams October 21, 2021 16:41
steven-johnson added a commit that referenced this pull request Oct 21, 2021
A couple of minor hygiene changes, extracted from #6251:

- Clean up LLVM_Headers.h to uniformly use <> instead of "" and to alphabetize properly
- Clean up WABT includes to reflect what we need more accurately
steven-johnson added a commit that referenced this pull request Oct 26, 2021
A couple of minor hygiene changes, extracted from #6251:

- Clean up LLVM_Headers.h to uniformly use <> instead of "" and to alphabetize properly
- Clean up WABT includes to reflect what we need more accurately
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip_buildbots Do not run buildbots on this PR. Must add before opening PR as we scan labels immediately.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant