public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3552] c++: don't warn about internal interference sizes Date: Wed, 15 Sep 2021 15:32:09 +0000 (GMT) [thread overview] Message-ID: <20210915153209.4F5FE3858416@sourceware.org> (raw) https://gcc.gnu.org/g:4320a4b717dcccddf230d0b944bfc5a7ae282508 commit r12-3552-g4320a4b717dcccddf230d0b944bfc5a7ae282508 Author: Jason Merrill <jason@redhat.com> Date: Wed Sep 15 09:30:10 2021 -0400 c++: don't warn about internal interference sizes Most any compilation on ARM/AArch64 was warning because the default L1 cache line size of 32B was smaller than the default std::hardware_constructive_interference_size of 64B. This is mostly due to inaccurate --param l1-cache-line-size, but it's not helpful to complain to a user that didn't set the values. gcc/cp/ChangeLog: * decl.c (cxx_init_decl_processing): Only warn about odd interference sizes if they were specified with --param. Diff: --- gcc/cp/decl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 1a2925b4108..9ad9446e262 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4756,7 +4756,7 @@ cxx_init_decl_processing (void) /* Check that the hardware interference sizes are at least alignof(max_align_t), as required by the standard. */ const int max_align = max_align_t_align () / BITS_PER_UNIT; - if (param_destruct_interfere_size) + if (global_options_set.x_param_destruct_interfere_size) { if (param_destruct_interfere_size < max_align) error ("%<--param destructive-interference-size=%d%> is less than " @@ -4767,11 +4767,13 @@ cxx_init_decl_processing (void) "is less than %<--param l1-cache-line-size=%d%>", param_destruct_interfere_size, param_l1_cache_line_size); } + else if (param_destruct_interfere_size) + /* Assume the internal value is OK. */; else if (param_l1_cache_line_size >= max_align) param_destruct_interfere_size = param_l1_cache_line_size; /* else leave it unset. */ - if (param_construct_interfere_size) + if (global_options_set.x_param_construct_interfere_size) { if (param_construct_interfere_size < max_align) error ("%<--param constructive-interference-size=%d%> is less than " @@ -4783,6 +4785,8 @@ cxx_init_decl_processing (void) "is greater than %<--param l1-cache-line-size=%d%>", param_construct_interfere_size, param_l1_cache_line_size); } + else if (param_construct_interfere_size) + /* Assume the internal value is OK. */; else if (param_l1_cache_line_size >= max_align) param_construct_interfere_size = param_l1_cache_line_size; }
reply other threads:[~2021-09-15 15:32 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210915153209.4F5FE3858416@sourceware.org \ --to=jason@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).