[Bug tree-optimization/102646] large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading)

2021-10-11 Thread aldyh at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102646

--- Comment #3 from Aldy Hernandez  ---
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 *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
 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.
>

[Bug tree-optimization/102646] large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading)

2021-10-11 Thread hubicka at kam dot mff.cuni.cz via 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

[Bug tree-optimization/102646] large performance changes between 1932e1169a236849f5e7f1cd386da100d9af470f and 9cfb95f9b92326e86e99b50350ebf04fa9cd2477 (probably jump threading)

2021-10-11 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102646

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #1 from Martin Liška  ---
I think most of the regressions are fixed, we get even better numbers now.