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
Please register or sign in to comment