public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/102646] New: large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading)
@ 2021-10-08 11:01 hubicka at gcc dot gnu.org
  2021-10-11 10:06 ` [Bug tree-optimization/102646] " marxin at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-10-08 11:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102646

            Bug ID: 102646
           Summary: large performance changes between
                    1932e1169a236849f5e7f1cd386da100d9af470f and
                    9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably
                    jump threading)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hubicka at gcc dot gnu.org
  Target Milestone: ---

There are many regressions and also some improvements especialy in -O2 tsvc
(which is simple benchmark) in this range
See
https://lnt.opensuse.org/db_default/v4/CPP/latest_runs_report?younger_in_days=14&older_in_days=0&min_percentage_change=0.02&revisions=1932e1169a236849f5e7f1cd386da100d9af470f%2C9cfb95f9b92326e86e99b50350ebf04fa9cd2477

and also
https://lnt.opensuse.org/db_default/v4/SPEC/latest_runs_report?younger_in_days=14&older_in_days=0&min_percentage_change=0.02&revisions=1932e1169a236849f5e7f1cd386da100d9af470f%2C9cfb95f9b92326e86e99b50350ebf04fa9cd2477

We get:

+2021-09-27  Aldy Hernandez  <aldyh@redhat.com>
+
+       * gimple-range-path.cc
+       (path_range_query::precompute_ranges_in_block): Rename to...
+       (path_range_query::compute_ranges_in_block): ...this.
+       (path_range_query::precompute_ranges): Rename to...
+       (path_range_query::compute_ranges): ...this.
+       (path_range_query::precompute_relations): Rename to...
+       (path_range_query::compute_relations): ...this.
+       (path_range_query::precompute_phi_relations): Rename to...
+       (path_range_query::compute_phi_relations): ...this.
+       * gimple-range-path.h: Rename precompute* to compute*.
+       * tree-ssa-threadbackward.c
+       (back_threader::find_taken_edge_switch): Same.
+       (back_threader::find_taken_edge_cond): Same.
+       * tree-ssa-threadedge.c
+       (hybrid_jt_simplifier::compute_ranges_from_state): Same.
+       (hybrid_jt_state::register_equivs_stmt): Inline...
+       * tree-ssa-threadedge.h: ...here.
+
+2021-09-27  Aldy Hernandez  <aldyh@redhat.com>
+
+       * tree-vrp.c (lhs_of_dominating_assert): Remove.
+       (class vrp_jt_state): Remove.
+       (class vrp_jt_simplifier): Remove.
+       (vrp_jt_simplifier::simplify): Remove.
+       (class vrp_jump_threader): Remove.
+       (vrp_jump_threader::vrp_jump_threader): Remove.
+       (vrp_jump_threader::~vrp_jump_threader): Remove.
+       (vrp_jump_threader::before_dom_children): Remove.
+       (vrp_jump_threader::after_dom_children): Remove.
+
+2021-09-27  Aldy Hernandez  <aldyh@redhat.com>
+
+       * passes.def (pass_vrp_threader): New.
+       * tree-pass.h (make_pass_vrp_threader): Add make_pass_vrp_threader.
+       * tree-ssa-threadedge.c (hybrid_jt_state::register_equivs_stmt): New.
+       (hybrid_jt_simplifier::hybrid_jt_simplifier): New.
+       (hybrid_jt_simplifier::simplify): New.
+       (hybrid_jt_simplifier::compute_ranges_from_state): New.
+       * tree-ssa-threadedge.h (class hybrid_jt_state): New.
+       (class hybrid_jt_simplifier): New.
+       * tree-vrp.c (execute_vrp): Remove ASSERT_EXPR based jump
+       threader.
+       (class hybrid_threader): New.
+       (hybrid_threader::hybrid_threader): New.
+       (hybrid_threader::~hybrid_threader): New.
+       (hybrid_threader::before_dom_children): New.
+       (hybrid_threader::after_dom_children): New.
+       (execute_vrp_threader): New.
+       (class pass_vrp_threader): New.
+       (make_pass_vrp_threader): New.
+
+2021-09-27  Martin Liska  <mliska@suse.cz>
+
+       * output.h (enum section_flag): New.
+       (SECTION_FORGET): Remove.
+       (SECTION_ENTSIZE): Make it (1UL << 8) - 1.
+       (SECTION_STYLE_MASK): Define it based on other enum
+       values.
+       * varasm.c (switch_to_section): Remove unused handling of
+       SECTION_FORGET.
+
+2021-09-27  Martin Liska  <mliska@suse.cz>
+
+       * common.opt: Add new variable flag_default_complex_method.
+       * opts.c (finish_options): Handle flags related to
+         x_flag_complex_method.
+       * toplev.c (process_options): Remove option handling related
+       to flag_complex_method.
+
+2021-09-27  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/102450
+       * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid using
+       type_for_size, instead use int_mode_for_size.
+
+2021-09-27  Andrew Pinski  <apinski@marvell.com>
+
+       PR c/94726
+       * gimplify.c (gimplify_save_expr): Return early
+       if the type of val is error_mark_node.
+
+2021-09-27  Aldy Hernandez  <aldyh@redhat.com>
+
+       * tree-ssanames.c (ssa_name_has_boolean_range): Use
+       get_range_query.
+
+2021-09-27  Aldy Hernandez  <aldyh@redhat.com>
+
+       * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Remove
+       vrp_visit_cond_stmt.
+       * tree-ssa-dom.c (cprop_operand): Convert to range_query API.
+       (cprop_into_stmt): Same.
+       (dom_opt_dom_walker::optimize_stmt): Same.
+
+2021-09-27  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/97351
+       PR tree-optimization/97352
+       PR tree-optimization/82426
+       * tree-vectorizer.h (dr_misalignment): Add vector type
+       argument.
+       (aligned_access_p): Likewise.
+       (known_alignment_for_access_p): Likewise.
+       (vect_supportable_dr_alignment): Likewise.
+       (vect_known_alignment_in_bytes): Likewise.  Refactor.
+       (DR_MISALIGNMENT): Remove.
+       (vect_update_shared_vectype): Likewise.
+       * tree-vect-data-refs.c (dr_misalignment): Refactor, handle
+       a vector type with larger alignment requirement and apply
+       the negative step adjustment here.
+       (vect_calculate_target_alignment): Remove.
+       * tree-vect-stmts.c (vect_analyze_stmt): Push/pop the
+       vector type of an SLP node to the representative stmt-info.
+       (vect_transform_stmt): Likewise.
+
+2021-09-27  liuhongt  <hongtao.liu@intel.com>
+
+       Revert:
+       2021-09-09  liuhongt  <hongtao.liu@intel.com>
+
+       PR target/101059
+       * config/i386/sse.md (reduc_plus_scal_<mode>): Split to ..
+       (reduc_plus_scal_v4sf): .. this, New define_expand.
+       (reduc_plus_scal_v2df): .. and this, New define_expand.
+

>From which (since it reproduces at -O2 and thus is not vectorization related)
it seems that it can be attributed to the new threader.

Honza

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/102646] large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading)
  2021-10-08 11:01 [Bug tree-optimization/102646] New: large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading) hubicka at gcc dot gnu.org
@ 2021-10-11 10:06 ` marxin at gcc dot gnu.org
  2021-10-11 14:59 ` hubicka at kam dot mff.cuni.cz
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-11 10:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102646

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |marxin at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
I think most of the regressions are fixed, we get even better numbers now.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/102646] large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading)
  2021-10-08 11:01 [Bug tree-optimization/102646] New: large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading) hubicka at gcc dot gnu.org
  2021-10-11 10:06 ` [Bug tree-optimization/102646] " marxin at gcc dot gnu.org
@ 2021-10-11 14:59 ` hubicka at kam dot mff.cuni.cz
  2021-10-11 15:24 ` aldyh at redhat dot com
  2021-10-16  8:24 ` [Bug tree-optimization/102646] [12 Regression] " pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: hubicka at kam dot mff.cuni.cz @ 2021-10-11 14:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102646

--- Comment #2 from hubicka at kam dot mff.cuni.cz ---
> I think most of the regressions are fixed, we get even better numbers now.
Because we enabled vectorization. I would say they should still
reproduce with -fno-tree-vectorize, right?

Honza

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/102646] large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading)
  2021-10-08 11:01 [Bug tree-optimization/102646] New: large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading) hubicka at gcc dot gnu.org
  2021-10-11 10:06 ` [Bug tree-optimization/102646] " marxin at gcc dot gnu.org
  2021-10-11 14:59 ` hubicka at kam dot mff.cuni.cz
@ 2021-10-11 15:24 ` aldyh at redhat dot com
  2021-10-16  8:24 ` [Bug tree-optimization/102646] [12 Regression] " pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: aldyh at redhat dot com @ 2021-10-11 15:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102646

--- Comment #3 from Aldy Hernandez <aldyh at redhat dot com> ---
Most if not all the performance changes I've seen so far have been,
not due to the jump threader changes, but to the restrictions we've
put into place for jump threadable paths.  Before, we used to thread
paths that destroyed loop form.  We are much more cautious now.  In
theory, the vectorizer should be able to do an even better job with
loops preserved longer.

That being said, this has been a bit of a moving target, with the
thread validity model changing a few times in the past month.

A good exercise would be to compare the old and new threaders, with
the vectorizer kept constant (whether -fno-tree-vectorize or
-ftree-vectorize), but without the loop threading restrictions.  That
is, with something like this patch:

diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 32ce1e3af40..1a49cb61ca3 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -2853,9 +2853,6 @@ jt_path_registry::register_jump_thread
(vec<jump_thread_edge *> *path)
       return false;
     }

-  if (cancel_invalid_paths (*path))
-    return false;
-
   if (dump_file && (dump_flags & TDF_DETAILS))
     dump_jump_thread_path (dump_file, *path, true);

On Mon, Oct 11, 2021 at 4:59 PM hubicka at kam dot mff.cuni.cz
<gcc-bugzilla@gcc.gnu.org> wrote:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102646
>
> --- Comment #2 from hubicka at kam dot mff.cuni.cz ---
> > I think most of the regressions are fixed, we get even better numbers now.
> Because we enabled vectorization. I would say they should still
> reproduce with -fno-tree-vectorize, right?
>
> Honza
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/102646] [12 Regression] large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading)
  2021-10-08 11:01 [Bug tree-optimization/102646] New: large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading) hubicka at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-10-11 15:24 ` aldyh at redhat dot com
@ 2021-10-16  8:24 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-16  8:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102646

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|large performance changes   |[12 Regression] large
                   |between                     |performance changes between
                   |1932e1169a236849f5e7f1cd386 |1932e1169a236849f5e7f1cd386
                   |da100d9af470f and           |da100d9af470f and
                   |9cfb95f9b92326e86e99b50350e |9cfb95f9b92326e86e99b50350e
                   |bf04fa9cd2477 (probably     |bf04fa9cd2477 (probably
                   |jump threading)             |jump threading)
   Target Milestone|---                         |12.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-16  8:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 11:01 [Bug tree-optimization/102646] New: large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading) hubicka at gcc dot gnu.org
2021-10-11 10:06 ` [Bug tree-optimization/102646] " marxin at gcc dot gnu.org
2021-10-11 14:59 ` hubicka at kam dot mff.cuni.cz
2021-10-11 15:24 ` aldyh at redhat dot com
2021-10-16  8:24 ` [Bug tree-optimization/102646] [12 Regression] " pinskia at gcc dot gnu.org

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).