[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 19 13:05:27 PDT 2024


AaronBallman wrote:

During today's office hours, @philnik777 mentioned that support for these macros would be very beneficial to libc++ folks. This is intended as a starting point for the support in that it does not currently have any special logic for any particular target and it does not have a diagnostic for using these macros within a header file.

In support of getting some target-specific values that make sense, I'm hopeful that the following folks can suggest proper values for the targets they know about (I pulled this list from the LLVM code owners list, so if there are others I should CC, please add them): @arsenm @asb @asl @jholewinski @mshockwave @SixWeining @benshi001 @kaz7 @TNorthover @nigelp-xmos @jpienaar @phoebewang @andreisfr @markschimmel @uweigand @wuzish @iliya-diyachkov 

If any of you are able to let me know what the minimum offset is between two objects to avoid false sharing and what the maximum size of contiguous memory is to promote true sharing for your target, I can add it as part of this PR. If you don't know or are happy with the defaults I picked, that's fine too. I figure we can improve these values as we see fit. And if the answer is "it's complicated", I'd appreciate if we could handle that in a follow-up patch so we can get libc++ folks unblocked.


https://github.com/llvm/llvm-project/pull/89446


More information about the cfe-commits mailing list