This is an archive of the discontinued LLVM Phabricator instance.

[ms] Reintroduce feature guards in intrinsic headers in Microsoft mode
ClosedPublic

Authored by thakis on May 16 2016, 10:57 AM.

Details

Reviewers
hans
Summary

Visual Studio's C++ standard library headers include intrin.h, so the intrinsic headers get included a lot more often in Microsoft mode than elsewhere. The AVX512 intrinsics are a lot of code (0.7 MB, causing 30% compile time overhead for small programs including e.g. <string> and 6% compile time overhead for larger projects like e.g. v8). Since multiversioning can't be relied on in Microsoft mode (cl.exe doesn't support it), having faster compiles seems like the much better tradeoff until we have a better intrinsic story going forward (which we'll need for e.g. PR19898).

Actually using intrinsics on Windows already requires the right /arch: settings, so this patch should have no big behavior change.

See also thread "The intrinsics headers (especially avx512) are too big. What to do about it?" on cfe-dev.

Diff Detail

Event Timeline

thakis updated this revision to Diff 57371.May 16 2016, 10:57 AM
thakis retitled this revision from to [ms] Reintroduce feature guards in intrinsic headers in Microsoft mode.
thakis updated this object.
thakis added a reviewer: hans.
thakis added a subscriber: cfe-commits.
hans accepted this revision.May 16 2016, 11:18 AM
hans edited edge metadata.

lgtm

This revision is now accepted and ready to land.May 16 2016, 11:18 AM
thakis closed this revision.May 16 2016, 11:19 AM
thakis updated this object.
thakis edited edge metadata.

r269675, thanks!

Should this be reverted due to:

https://github.com/llvm/llvm-project/issues/53520
https://github.com/llvm/llvm-project/issues/63492

I mean: yes faster compile is nice to have but having diverging behavior from MSVC seems like the wrong way to solve it.

Herald added a project: Restricted Project. ยท View Herald TranscriptJul 12 2023, 2:45 PM