[Bug middle-end/92046] Command line options (that are per-functions) are affecting --params which are global.

2020-03-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92046

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Martin Liška  ---
I'm recommending to close it, let's continue in PR92860.

[Bug middle-end/92046] Command line options (that are per-functions) are affecting --params which are global.

2020-03-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92046

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #8 from Martin Liška  ---
@Richi: Can you please mention the new option -fallow-store-data-races at
https://gcc.gnu.org/gcc-10/changes.html?

[Bug middle-end/92046] Command line options (that are per-functions) are affecting --params which are global.

2020-02-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92046

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
   Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot 
gnu.org

[Bug middle-end/92046] Command line options (that are per-functions) are affecting --params which are global.

2019-10-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92046

--- Comment #7 from Richard Biener  ---
Author: rguenth
Date: Tue Oct 15 07:28:26 2019
New Revision: 276985

URL: https://gcc.gnu.org/viewcvs?rev=276985&root=gcc&view=rev
Log:
2019-10-15  Richard Biener  

PR middle-end/92046
* common.opt (fallow-store-data-races): New.
* params.def (PARAM_ALLOW_STORE_DATA_RACES): Remove.
* params.h (ALLOW_STORE_DATA_RACES): Likewise.
* doc/invoke.texi (fallow-store-data-races): Document.
(--param allow-store-data-races): Remove docs.
* opts.c (default_options_table): Enable -fallow-store-data-races
at -Ofast.
(default_options_optimization): Do not enable --param
allow-store-data-races at -Ofast.
* tree-if-conv.c (ifcvt_memrefs_wont_trap): Use flag_store_data_races
instead of PARAM_ALLOW_STORE_DATA_RACES.
* tree-ssa-loop-im.c (execute_sm): Likewise.

* c-c++-common/cxxbitfields-3.c: Adjust.
* c-c++-common/cxxbitfields-6.c: Likewise.
* c-c++-common/simulate-thread/bitfields-1.c: Likewise.
* c-c++-common/simulate-thread/bitfields-2.c: Likewise.
* c-c++-common/simulate-thread/bitfields-3.c: Likewise.
* c-c++-common/simulate-thread/bitfields-4.c: Likewise.
* g++.dg/simulate-thread/bitfields-2.C: Likewise.
* g++.dg/simulate-thread/bitfields.C: Likewise.
* gcc.dg/lto/pr52097_0.c: Likewise.
* gcc.dg/simulate-thread/speculative-store-2.c: Likewise.
* gcc.dg/simulate-thread/speculative-store-3.c: Likewise.
* gcc.dg/simulate-thread/speculative-store-4.c: Likewise.
* gcc.dg/simulate-thread/speculative-store.c: Likewise.
* gcc.dg/tree-ssa/20050314-1.c: Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/common.opt
trunk/gcc/doc/invoke.texi
trunk/gcc/opts.c
trunk/gcc/params.def
trunk/gcc/params.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/cxxbitfields-3.c
trunk/gcc/testsuite/c-c++-common/cxxbitfields-6.c
trunk/gcc/testsuite/c-c++-common/simulate-thread/bitfields-1.c
trunk/gcc/testsuite/c-c++-common/simulate-thread/bitfields-2.c
trunk/gcc/testsuite/c-c++-common/simulate-thread/bitfields-3.c
trunk/gcc/testsuite/c-c++-common/simulate-thread/bitfields-4.c
trunk/gcc/testsuite/g++.dg/simulate-thread/bitfields-2.C
trunk/gcc/testsuite/g++.dg/simulate-thread/bitfields.C
trunk/gcc/testsuite/gcc.dg/lto/pr52097_0.c
trunk/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-2.c
trunk/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-3.c
trunk/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-4.c
trunk/gcc/testsuite/gcc.dg/simulate-thread/speculative-store.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/20050314-1.c
trunk/gcc/tree-if-conv.c
trunk/gcc/tree-ssa-loop-im.c

[Bug middle-end/92046] Command line options (that are per-functions) are affecting --params which are global.

2019-10-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92046

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Mon Oct 14 14:03:35 2019
New Revision: 276963

URL: https://gcc.gnu.org/viewcvs?rev=276963&root=gcc&view=rev
Log:
2019-10-14  Richard Biener  

PR middle-end/92046
* dse.c (scan_insn): Use param max_active_local_stores.
(dse_step1): Get PARAM_MAX_DSE_ACTIVE_LOCAL_STORES and adjust
based on optimization level.
* loop-invariant.c (move_loop_invariants): Adjust
LOOP_INVARIANT_MAX_BBS_IN_LOOP based on optimization level.
* opts.c (default_options_optimization): Do not adjust
PARAM_MAX_DSE_ACTIVE_LOCAL_STORES and
LOOP_INVARIANT_MAX_BBS_IN_LOOP here.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/dse.c
trunk/gcc/loop-invariant.c
trunk/gcc/opts.c

[Bug middle-end/92046] Command line options (that are per-functions) are affecting --params which are global.

2019-10-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92046

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Fri Oct 11 10:45:48 2019
New Revision: 276876

URL: https://gcc.gnu.org/viewcvs?rev=276876&root=gcc&view=rev
Log:
2019-10-11  Richard Biener  

PR tree-optimization/92066
PR tree-optimization/92046
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
Fix bogus cost model check.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-data-refs.c

[Bug middle-end/92046] Command line options (that are per-functions) are affecting --params which are global.

2019-10-10 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92046

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Thu Oct 10 14:02:25 2019
New Revision: 276807

URL: https://gcc.gnu.org/viewcvs?rev=276807&root=gcc&view=rev
Log:
2019-10-10  Richard Biener  

PR middle-end/92046
* opts.c (finish_options): Do not influence global --params
from options that are adjustable per function.
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
Apply --param adjustment based on active cost-model.
* tree-ssa-phiopt.c (cond_if_else_store_replacement): Disable
further store-sinking when vectorization or if-conversion
are not enabled.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/opts.c
trunk/gcc/tree-ssa-phiopt.c
trunk/gcc/tree-vect-data-refs.c

[Bug middle-end/92046] Command line options (that are per-functions) are affecting --params which are global.

2019-10-10 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92046

Richard Biener  changed:

   What|Removed |Added

Version|unknown |10.0

--- Comment #3 from Richard Biener  ---
Some tackled, will try to tackle those depending on -On as well.

[Bug middle-end/92046] Command line options (that are per-functions) are affecting --params which are global.

2019-10-10 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92046

--- Comment #2 from Richard Biener  ---
Created attachment 47014
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47014&action=edit
prototype

Something like this.  Note the behavior changes if the user manually specifies
any of the parameters.  We'd need to add a maybe_get_and_adjust_param_value
that gets the unaltered value if the user specified it.  But for that we'd
have to hard pass-in global_options and global_options_set (or hardcode it
in params.c).  But then the behavior between -O2 and -O2 --param
max-stores-to-sink=2 would be different (even though that's the documented
default of the
--param) - which is btw the current behavior.  We could check against the
default value but that means the behavior is different if targets change the
param and the behavior differs between --param X=default and X=default-1
(drastically in the case of dropping to zero).

I think for the vectorizer the only problematic case is
PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS, the others are documented to be
turned off.  Likewise max-stores-to-sink.  So I made
vect-maxversion-for-alias-checks adjusted relatively with
-fvect-cost-model=cheap so a global changed
--param still has an effect.

[Bug middle-end/92046] Command line options (that are per-functions) are affecting --params which are global.

2019-10-10 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92046

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-10-10
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
I'll pick some.