public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables
       [not found] <bug-41488-4@http.gcc.gnu.org/bugzilla/>
@ 2013-10-29 19:22 ` xinliangli at gmail dot com
  2013-12-10  6:31 ` amker at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: xinliangli at gmail dot com @ 2013-10-29 19:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41488

--- Comment #5 from davidxl <xinliangli at gmail dot com> ---
Alternative approach -- introduce a special forward propagation before or after
the ivopt to get rid of the redundant iv. This propagation needs to propagate
through header phi.


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

* [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables
       [not found] <bug-41488-4@http.gcc.gnu.org/bugzilla/>
  2013-10-29 19:22 ` [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables xinliangli at gmail dot com
@ 2013-12-10  6:31 ` amker at gcc dot gnu.org
  2013-12-11  0:58 ` amker at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: amker at gcc dot gnu.org @ 2013-12-10  6:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41488

--- Comment #6 from amker at gcc dot gnu.org ---
Author: amker
Date: Tue Dec 10 06:31:41 2013
New Revision: 205848

URL: http://gcc.gnu.org/viewcvs?rev=205848&root=gcc&view=rev
Log:

    PR tree-optimization/41488
    * tree-ssa-loop-ivopts.c (add_old_iv_candidates): Don't add cand
    for PEELED_CHREC kind IV.
    * tree-scalar-evolution.c: Include necessary header files.
    (peeled_chrec_map, simplify_peeled_chrec): New.
    (analyze_evolution_in_loop): New static variable.
    Call simplify_peeled_chrec.
    (scev_initialize): Initialize peeled_chrec_map.
    (scev_reset, scev_finalize): Reset and release peeled_chrec_map.

    PR tree-optimization/41488
    * gcc.dg/tree-ssa/scev-7.c: New test.
    * gcc.dg/pr41488.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/pr41488.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/scev-7.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-scalar-evolution.c
    trunk/gcc/tree-ssa-loop-ivopts.c


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

* [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables
       [not found] <bug-41488-4@http.gcc.gnu.org/bugzilla/>
  2013-10-29 19:22 ` [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables xinliangli at gmail dot com
  2013-12-10  6:31 ` amker at gcc dot gnu.org
@ 2013-12-11  0:58 ` amker at gcc dot gnu.org
  2013-12-13 11:36 ` amker at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: amker at gcc dot gnu.org @ 2013-12-11  0:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41488

--- Comment #7 from amker at gcc dot gnu.org ---
Author: amker
Date: Wed Dec 11 00:58:35 2013
New Revision: 205880

URL: http://gcc.gnu.org/viewcvs?rev=205880&root=gcc&view=rev
Log:

    Reverted:
    2013-12-10  Bin Cheng  <bin.cheng@arm.com>
    PR tree-optimization/41488
    * tree-ssa-loop-ivopts.c (add_old_iv_candidates): Don't add cand
    for PEELED_CHREC kind IV.
    * tree-scalar-evolution.c: Include necessary header files.
    (peeled_chrec_map, simplify_peeled_chrec): New.
    (analyze_evolution_in_loop): New static variable.
    Call simplify_peeled_chrec.
    (scev_initialize): Initialize peeled_chrec_map.
    (scev_reset, scev_finalize): Reset and release peeled_chrec_map.

    Reverted:
    2013-12-10  Bin Cheng  <bin.cheng@arm.com>
    PR tree-optimization/41488
    * gcc.dg/tree-ssa/scev-7.c: New test.
    * gcc.dg/pr41488.c: New test.


Removed:
    trunk/gcc/testsuite/gcc.dg/pr41488.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/scev-7.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-scalar-evolution.c
    trunk/gcc/tree-ssa-loop-ivopts.c


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

* [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables
       [not found] <bug-41488-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-12-11  0:58 ` amker at gcc dot gnu.org
@ 2013-12-13 11:36 ` amker at gcc dot gnu.org
  2013-12-16  9:59 ` ktkachov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: amker at gcc dot gnu.org @ 2013-12-13 11:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41488

--- Comment #8 from amker at gcc dot gnu.org ---
Author: amker
Date: Fri Dec 13 11:36:22 2013
New Revision: 205959

URL: http://gcc.gnu.org/viewcvs?rev=205959&root=gcc&view=rev
Log:

    PR tree-optimization/58296
    PR tree-optimization/41488
    * tree-scalar-evolution.c: Include necessary header files.
    (simplify_peeled_chrec): New function.
    (analyze_evolution_in_loop): New static variable.
    Call simplify_peeled_chrec.
    * tree-ssa-loop-ivopts.c (mark_bivs): Don't mark peeled IV as biv.
    (add_old_iv_candidates): Don't add candidate for peeled IV.
    * tree-affine.h (aff_combination_zero_p): New function.

    PR tree-optimization/58296
    PR tree-optimization/41488
    * gcc.dg/tree-ssa/scev-7.c: New test.
    * gcc.dg/pr41488.c: New test.
    * g++.dg/pr59445.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/pr59445.C
    trunk/gcc/testsuite/gcc.dg/pr41488.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/scev-7.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-affine.h
    trunk/gcc/tree-scalar-evolution.c
    trunk/gcc/tree-ssa-loop-ivopts.c


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

* [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables
       [not found] <bug-41488-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2013-12-13 11:36 ` amker at gcc dot gnu.org
@ 2013-12-16  9:59 ` ktkachov at gcc dot gnu.org
  2013-12-16 15:03 ` law at redhat dot com
  2013-12-16 16:59 ` ktkachov at gcc dot gnu.org
  6 siblings, 0 replies; 11+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-12-16  9:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41488

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktkachov at gcc dot gnu.org

--- Comment #9 from ktkachov at gcc dot gnu.org ---
Hi Bin,

I'm seeing tree-ssa/scev-7.c failing on arm


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

* [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables
       [not found] <bug-41488-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2013-12-16  9:59 ` ktkachov at gcc dot gnu.org
@ 2013-12-16 15:03 ` law at redhat dot com
  2013-12-16 16:59 ` ktkachov at gcc dot gnu.org
  6 siblings, 0 replies; 11+ messages in thread
From: law at redhat dot com @ 2013-12-16 15:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41488

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |law at redhat dot com
         Resolution|---                         |FIXED

--- Comment #10 from Jeffrey A. Law <law at redhat dot com> ---
ktkachov,

It seems to be working fine for me with my arm-eabi cross compiler.  Perhaps
you could provide some more details:

make check-gcc RUNTESTFLAGS="tree-ssa.exp=scev-7.c"
[ ... ]

In the gcc.sum file I've got:

Running /home/gcc/GIT/gcc/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ...
PASS: gcc.dg/tree-ssa/scev-7.c (test for excess errors)
PASS: gcc.dg/tree-ssa/scev-7.c scan-tree-dump-times sccp "Simplify PEELED_CHREC
into POLYNOMIAL_CHREC" 1

AFAICT, this issue has been resolved.


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

* [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables
       [not found] <bug-41488-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2013-12-16 15:03 ` law at redhat dot com
@ 2013-12-16 16:59 ` ktkachov at gcc dot gnu.org
  6 siblings, 0 replies; 11+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-12-16 16:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41488

--- Comment #11 from ktkachov at gcc dot gnu.org ---
(In reply to Jeffrey A. Law from comment #10)
> ktkachov,
> 
> It seems to be working fine for me with my arm-eabi cross compiler.  Perhaps
> you could provide some more details:
> 
> make check-gcc RUNTESTFLAGS="tree-ssa.exp=scev-7.c"
> [ ... ]
> 
> In the gcc.sum file I've got:
> 
> Running /home/gcc/GIT/gcc/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ...
> PASS: gcc.dg/tree-ssa/scev-7.c (test for excess errors)
> PASS: gcc.dg/tree-ssa/scev-7.c scan-tree-dump-times sccp "Simplify
> PEELED_CHREC into POLYNOMIAL_CHREC" 1
> 
> AFAICT, this issue has been resolved.

You're right, seems I had an inconsistent build tree state. It passes for me
now as well with a clean build. Sorry for the noise.


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

* [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables
  2009-09-28 12:44 [Bug tree-optimization/41488] New: " rahul at icerasemi dot com
                   ` (2 preceding siblings ...)
  2009-09-30 13:18 ` rguenth at gcc dot gnu dot org
@ 2009-11-06 10:05 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-11-06 10:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2009-11-06 10:04 -------
*** Bug 41954 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xinliangli at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41488


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

* [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables
  2009-09-28 12:44 [Bug tree-optimization/41488] New: " rahul at icerasemi dot com
  2009-09-28 12:46 ` [Bug tree-optimization/41488] " rahul at icerasemi dot com
  2009-09-28 15:31 ` rguenth at gcc dot gnu dot org
@ 2009-09-30 13:18 ` rguenth at gcc dot gnu dot org
  2009-11-06 10:05 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-09-30 13:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-09-30 13:17 -------
The issue here is that loop header copying creates a new induction variable
by moving the use before the definition of D.2708_4 = start_3(D) + i_12.

So it just does what we teach PRE not to do ...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41488


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

* [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables
  2009-09-28 12:44 [Bug tree-optimization/41488] New: " rahul at icerasemi dot com
  2009-09-28 12:46 ` [Bug tree-optimization/41488] " rahul at icerasemi dot com
@ 2009-09-28 15:31 ` rguenth at gcc dot gnu dot org
  2009-09-30 13:18 ` rguenth at gcc dot gnu dot org
  2009-11-06 10:05 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-09-28 15:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-09-28 15:30 -------
Confirmed.  Another way is to move loop header copying before FRE.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2009-09-28 15:30:54
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41488


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

* [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables
  2009-09-28 12:44 [Bug tree-optimization/41488] New: " rahul at icerasemi dot com
@ 2009-09-28 12:46 ` rahul at icerasemi dot com
  2009-09-28 15:31 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: rahul at icerasemi dot com @ 2009-09-28 12:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rahul at icerasemi dot com  2009-09-28 12:45 -------
See http://gcc.gnu.org/ml/gcc/2009-09/msg00432.html for some followup.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41488


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

end of thread, other threads:[~2013-12-16 16:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-41488-4@http.gcc.gnu.org/bugzilla/>
2013-10-29 19:22 ` [Bug tree-optimization/41488] IVOpts cannot coalesce multiple induction variables xinliangli at gmail dot com
2013-12-10  6:31 ` amker at gcc dot gnu.org
2013-12-11  0:58 ` amker at gcc dot gnu.org
2013-12-13 11:36 ` amker at gcc dot gnu.org
2013-12-16  9:59 ` ktkachov at gcc dot gnu.org
2013-12-16 15:03 ` law at redhat dot com
2013-12-16 16:59 ` ktkachov at gcc dot gnu.org
2009-09-28 12:44 [Bug tree-optimization/41488] New: " rahul at icerasemi dot com
2009-09-28 12:46 ` [Bug tree-optimization/41488] " rahul at icerasemi dot com
2009-09-28 15:31 ` rguenth at gcc dot gnu dot org
2009-09-30 13:18 ` rguenth at gcc dot gnu dot org
2009-11-06 10:05 ` rguenth at gcc dot gnu dot 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).