`CMakeLists.txt`: Should we add `/volatileMetadata-` for x86 and x64?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.2k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
There's an undocumented /volatileMetadata option.
All I know about it is from DevCom-1538997 resolution:
The nops get inserted because of the flag
/volatileMetadatawhich is now on by default. You can return to the old behavior by adding/volatileMetadata-, but doing so will result in worse performance if your code is ever run emulated. It’ll still be emulated correctly, but the emulator will have to pessimistically assume every load/store needs a barrier.
My understanding is that the usual x86 / x64 MSVC STL builds are not supposed to run on ARM, because there are ARM64EC builds for that.
OTOH, the impact from extra nop and binary size growth due to extra metadata is minimal and the impact from /volatileMetadata- load barriers I think is high. So probably adding /volatileMetadata- isn't worth doing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing CMakeLists.txt and the MSVC configuration for x86 and x64 builds. Read the linked /volatileMetadata and ARM64EC references to understand the performance tradeoff, then determine whether adding /volatileMetadata- is appropriate; done means reaching and documenting a decision for the affected configurations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100