public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14736] New: [tree-ssa] code quality regression
@ 2004-03-25 23:20 dann at godzilla dot ics dot uci dot edu
2004-03-25 23:34 ` [Bug optimization/14736] " pinskia at gcc dot gnu dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-03-25 23:20 UTC (permalink / raw)
To: gcc-bugs
There seems to be a code quality regression in tree-ssa between
2004/03/08 and 2004/03/20
The .vars dump for generate-3.4.ii from PR8361 generated by
gcc version 3.5-tree-ssa 20040308 (merged 20040305)
has 100840 lines
the one generated by
gcc version 3.5-tree-ssa 20040320 (merged 20040307)
has 85811 lines.
Granted the number of lines in .vars is not the best measure of code
quality, but given the 15% size difference something seems wrong.
Looking at the diff between the 2 I saw the following type of
difference in a few places:
<L5>:;
- if (__result == __first) goto <L6>; else goto <L7>;
+ se = (struct ELEMENT &)__first;
+ if (__result == (struct ELEMENT * const)se) goto <L6>; else goto <L7>;
Given that this code is from std::vector::iterator it appears in quite a
few places. Look for example at:
typename std::vector<_Tp, _Alloc>::iterator std::vector<_Tp,
_Alloc>::erase(__gnu_cxx::__normal_iterator<_Tp*, std::vector<_Tp, _Alloc> >,
__gnu_cxx::__normal_iterator<_Tp*, std::vector<_Tp, _Alloc> >) [with _Tp =
STACK<int>::ELEMENT, _Alloc = std::allocator<STACK<int>::ELEMENT>] (this,
__first, __last)
Another oddity is code like:
<L38>:;
__first = __first;
__result = __result;
--
Summary: [tree-ssa] code quality regression
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dann at godzilla dot ics dot uci dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/14736] [tree-ssa] code quality regression
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
@ 2004-03-25 23:34 ` pinskia at gcc dot gnu dot org
2004-04-06 19:15 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-25 23:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-25 23:34 -------
Assigning to Diego.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dnovillo at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-03-25 23:34:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/14736] [tree-ssa] code quality regression
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
2004-03-25 23:34 ` [Bug optimization/14736] " pinskia at gcc dot gnu dot org
@ 2004-04-06 19:15 ` pinskia at gcc dot gnu dot org
2004-05-17 0:14 ` [Bug tree-optimization/14736] " pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-06 19:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-06 19:14 -------
I think this is better now but I might be looking into the wrong .vars the one with my cast
pass included.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |compile-time-hog, memory-
| |hog, pessimizes-code
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/14736] [tree-ssa] code quality regression
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
2004-03-25 23:34 ` [Bug optimization/14736] " pinskia at gcc dot gnu dot org
2004-04-06 19:15 ` pinskia at gcc dot gnu dot org
@ 2004-05-17 0:14 ` pinskia at gcc dot gnu dot org
2004-05-17 13:41 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-17 0:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-16 01:25 -------
I think these regressions come from the movement away from convert to fold_convert in
the middle-end. I think I have a fix which also gets rid of most of the usefulness of my
cast pass.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/14736] [tree-ssa] code quality regression
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
` (2 preceding siblings ...)
2004-05-17 0:14 ` [Bug tree-optimization/14736] " pinskia at gcc dot gnu dot org
@ 2004-05-17 13:41 ` pinskia at gcc dot gnu dot org
2004-06-02 4:32 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-17 13:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-17 00:01 -------
And no my patch did not fix this part but another some more work in fold_convert can
help.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/14736] [tree-ssa] code quality regression
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
` (3 preceding siblings ...)
2004-05-17 13:41 ` pinskia at gcc dot gnu dot org
@ 2004-06-02 4:32 ` pinskia at gcc dot gnu dot org
2004-06-02 4:33 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 4:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-02 04:32 -------
Mine caused by Dale's patch to use the language hooks. I have a patch.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dnovillo at gcc dot gnu dot
| |org
AssignedTo|dnovillo at gcc dot gnu dot |pinskia at gcc dot gnu dot
|org |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/14736] [tree-ssa] code quality regression
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
` (4 preceding siblings ...)
2004-06-02 4:32 ` pinskia at gcc dot gnu dot org
@ 2004-06-02 4:33 ` pinskia at gcc dot gnu dot org
2004-06-02 4:41 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 4:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-02 04:33 -------
Here is the patch:
Index: tree-ssa.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/tree-ssa.c,v
retrieving revision 2.3
diff -u -p -r2.3 tree-ssa.c
--- tree-ssa.c 14 May 2004 02:29:23 -0000 2.3
+++ tree-ssa.c 2 Jun 2004 04:32:50 -0000
@@ -555,7 +555,8 @@ tree_ssa_useless_type_conversion_1 (tree
so strip conversions that just switch between them. */
else if (POINTER_TYPE_P (inner_type)
&& POINTER_TYPE_P (outer_type)
- && lang_hooks.types_compatible_p (inner_type, outer_type))
+ && lang_hooks.types_compatible_p (TREE_TYPE (inner_type),
+ TREE_TYPE (outer_type)))
return true;
/* If both the inner and outer types are integral types, then the
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/14736] [tree-ssa] code quality regression
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
` (5 preceding siblings ...)
2004-06-02 4:33 ` pinskia at gcc dot gnu dot org
@ 2004-06-02 4:41 ` pinskia at gcc dot gnu dot org
2004-06-02 17:38 ` dann at godzilla dot ics dot uci dot edu
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 4:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-02 04:41 -------
Much newer and simpler patch: <http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00087.html>.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/14736] [tree-ssa] code quality regression
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
` (6 preceding siblings ...)
2004-06-02 4:41 ` pinskia at gcc dot gnu dot org
@ 2004-06-02 17:38 ` dann at godzilla dot ics dot uci dot edu
2004-06-02 18:57 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-06-02 17:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dann at godzilla dot ics dot uci dot edu 2004-06-02 17:38 -------
(In reply to comment #7)
> Much newer and simpler patch:
<http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00087.html>.
Great! Thanks for taking care of this!
Could you also post some before and after numbers? They should be very interesting.
Like the number of lines in the dump files, or the number of temp variables
created.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/14736] [tree-ssa] code quality regression
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
` (7 preceding siblings ...)
2004-06-02 17:38 ` dann at godzilla dot ics dot uci dot edu
@ 2004-06-02 18:57 ` cvs-commit at gcc dot gnu dot org
2004-06-02 19:00 ` pinskia at gcc dot gnu dot org
2004-06-02 19:58 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-02 18:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-06-02 18:56 -------
Subject: Bug 14736
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-06-02 18:56:54
Modified files:
gcc : ChangeLog tree-ssa.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/tree-ssa: ssa-cast-1.C ssa-sra-1.C
ssa-sra-2.C
Log message:
2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-optimization/14736
* g++.dg/tree-ssa/ssa-cast-1.C: New Test.
PR tree-optimization/14042
* g++.dg/tree-ssa/ssa-sra-1.C: New Test.
PR tree-optimization/14729
* g++.dg/tree-ssa/ssa-sra-2.C: New Test.
2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-optimization/14042
PR tree-optimization/14729
PR tree-optimization/14736
* tree-ssa.c: Check the type which the pointer points to
instead of the pointer types.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3822&r2=2.3823
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa.c.diff?cvsroot=gcc&r1=2.3&r2=2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3804&r2=1.3805
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/tree-ssa/ssa-cast-1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/tree-ssa/ssa-sra-1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/tree-ssa/ssa-sra-2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/14736] [tree-ssa] code quality regression
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
` (8 preceding siblings ...)
2004-06-02 18:57 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-02 19:00 ` pinskia at gcc dot gnu dot org
2004-06-02 19:58 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 19:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-02 19:00 -------
Dann, sorry I did not do any timings or any other numbers because I was to lazy to do any and I
wantted to get this in and fixed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/14736] [tree-ssa] code quality regression
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
` (9 preceding siblings ...)
2004-06-02 19:00 ` pinskia at gcc dot gnu dot org
@ 2004-06-02 19:58 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 19:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-02 19:58 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14736
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2004-06-02 19:58 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-25 23:20 [Bug optimization/14736] New: [tree-ssa] code quality regression dann at godzilla dot ics dot uci dot edu
2004-03-25 23:34 ` [Bug optimization/14736] " pinskia at gcc dot gnu dot org
2004-04-06 19:15 ` pinskia at gcc dot gnu dot org
2004-05-17 0:14 ` [Bug tree-optimization/14736] " pinskia at gcc dot gnu dot org
2004-05-17 13:41 ` pinskia at gcc dot gnu dot org
2004-06-02 4:32 ` pinskia at gcc dot gnu dot org
2004-06-02 4:33 ` pinskia at gcc dot gnu dot org
2004-06-02 4:41 ` pinskia at gcc dot gnu dot org
2004-06-02 17:38 ` dann at godzilla dot ics dot uci dot edu
2004-06-02 18:57 ` cvs-commit at gcc dot gnu dot org
2004-06-02 19:00 ` pinskia at gcc dot gnu dot org
2004-06-02 19:58 ` pinskia 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).