Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tsan: de-hardcode number of unused bits in trace events
Precisely specifying the unused parts of the bitfield is critical for performance. If we don't specify them, compiler will generate code to load the old value and shuffle it to extract the unused bits to apply to the new value. If we specify the unused part and store 0 in there, all that unnecessary code goes away (store of the 0 const is combined with other constant parts). I don't see a good way to ensure we cover all of u64 bits with fields. So at least introduce named kUnusedBits consts and check that bits sum up to 64. Depends on D113978. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D113979
- Loading branch information
Showing
1 changed file
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters