This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Change default for --param allow-...-data-races to off


On Mon, Jun 23, 2014 at 10:02 AM, Bernd Edlinger
<bernd.edlinger@hotmail.de> wrote:
> Hi,
>
>
> On Fri, 20 Jun 2014 13:44:18, Martin Jambor wrote:
>>
>> Hi,
>>
>> On Thu, Jun 19, 2014 at 06:18:47PM +0200, Bernd Edlinger wrote:
>>> Hi,
>>>
>>> from a recent discussion on gcc@gcc.gnu.org I have learned that the default of
>>> --param allow-store-data-races is still 1, and it is causing problems.
>>> Therefore I would like to suggest to change the default of this option to 0.
>>
>> I was about to propose a similar patch but I intended to leave the
>> parameter set to one when -Ofast is specified so that benchmarks are
>> not hurt by this and as a nice pointer for people exploring our
>> options to really squeeze out 100% performance (which would of course
>> mean documenting it too).
>>
>
> Well actually, I am not sure if we ever wanted to have a race condition here.
> Have you seen any impact of --param allow-store-data-races on any benchmark?

It's trivially to write one.   The only pass that checks the param is
tree loop invariant motion and it does that when it applies store-motion.
Register pressure increase is increased by a factor of two.

So I'd agree that we might want to disable this again for -Ofast.

As nothing tests for the PACKED variants nor for the LOAD variant
I'd rather remove those.  Claiming we don't create races for those
when you disable it via the param is simply not true.

Thanks,
Richard.

>
> Thanks
> Bernd.
>
>> Thanks,
>>
>> Martin
>>
>>>
>>> Boot-strapped and regression tested on x86_64-linux-gnu.
>>> Ok for trunk?
>>>
>>>
>>> Thanks
>>> Bernd.
>>>
>>
>>> gcc/ChangeLog:
>>> 2014-06-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
>>>
>>> Set default for --param allow-...-data-races to off.
>>> * params.def (PARAM_ALLOW_LOAD_DATA_RACES,
>>> PARAM_ALLOW_STORE_DATA_RACES, PARAM_ALLOW_PACKED_LOAD_DATA_RACES,
>>> PARAM_ALLOW_PACKED_STORE_DATA_RACES): Set default to off.
>>>
>>> testsuite/ChangeLog:
>>> 2014-06-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
>>>
>>> Adjust to new default for --param allow-...-data-races.
>>> * c-c++-common/cxxbitfields-3.c: Adjust.
>>> * c-c++-common/cxxbitfields-6.c: Adjust.
>>> * c-c++-common/simulate-thread/bitfields-1.c: Adjust.
>>> * c-c++-common/simulate-thread/bitfields-2.c: Adjust.
>>> * c-c++-common/simulate-thread/bitfields-3.c: Adjust.
>>> * c-c++-common/simulate-thread/bitfields-4.c: Adjust.
>>> * g++.dg/simulate-thread/bitfields.C: Adjust.
>>> * g++.dg/simulate-thread/bitfields-2.C: Adjust.
>>> * gcc.dg/lto/pr52097_0.c: Adjust.
>>> * gcc.dg/simulate-thread/speculative-store.c: Adjust.
>>> * gcc.dg/simulate-thread/speculative-store-2.c: Adjust.
>>> * gcc.dg/simulate-thread/speculative-store-3.c: Adjust.
>>> * gcc.dg/simulate-thread/speculative-store-4.c: Adjust.
>>> * gcc.dg/simulate-thread/strict-align-global.c: Adjust.
>>> * gcc.dg/simulate-thread/subfields.c: Adjust.
>>> * gcc.dg/tree-ssa/20050314-1.c: Adjust.
>>>
>>
>>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]