public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/13876] loop not fully optimized
[not found] <bug-13876-6528@http.gcc.gnu.org/bugzilla/>
@ 2006-02-27 13:53 ` steven at gcc dot gnu dot org
2006-02-27 14:22 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-02-27 13:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from steven at gcc dot gnu dot org 2006-02-27 13:48 -------
Could it be that this is now fixed?
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |steven at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13876
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/13876] loop not fully optimized
[not found] <bug-13876-6528@http.gcc.gnu.org/bugzilla/>
2006-02-27 13:53 ` [Bug tree-optimization/13876] loop not fully optimized steven at gcc dot gnu dot org
@ 2006-02-27 14:22 ` pinskia at gcc dot gnu dot org
2006-03-21 15:08 ` law at redhat dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-27 14:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-02-27 14:14 -------
(In reply to comment #5)
> Could it be that this is now fixed?
Nope, the second testcase in comment #2 is still very obvious missing an
optimization with respect with jump threading:
cmpw cr7,r31,r30
li r3,0
cmpwi cr6,r3,0
bne+ cr7,L6
L6:
beq- cr6,L4
That is only time I have seen an missed optimization that is so obvious.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13876
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/13876] loop not fully optimized
[not found] <bug-13876-6528@http.gcc.gnu.org/bugzilla/>
2006-02-27 13:53 ` [Bug tree-optimization/13876] loop not fully optimized steven at gcc dot gnu dot org
2006-02-27 14:22 ` pinskia at gcc dot gnu dot org
@ 2006-03-21 15:08 ` law at redhat dot com
2007-04-22 11:49 ` rguenth at gcc dot gnu dot org
2007-04-22 17:39 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 8+ messages in thread
From: law at redhat dot com @ 2006-03-21 15:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from law at redhat dot com 2006-03-21 15:08 -------
This is a loop optimization issue, not a jump threading bug. To really
optimize this loop well we will likely need the kinds of analysis found
in "Beyond Induction Variables", the classic paper describing loop flip-flops
and other interesting loop variables that are not simple induction variables.
Anyway, I'm removing this from the set of bugs related to jump threading.
Jeff
--
law at redhat dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|law at gcc dot gnu dot org |
OtherBugsDependingO|19794 |
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13876
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/13876] loop not fully optimized
[not found] <bug-13876-6528@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-03-21 15:08 ` law at redhat dot com
@ 2007-04-22 11:49 ` rguenth at gcc dot gnu dot org
2007-04-22 17:39 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-04-22 11:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2007-04-22 12:49 -------
Loop header copying allows dom to duplicate the latch and thus we can now
eliminate the NotFound check:
;; Function t (t)
t (l, y)
{
int i;
<bb 2>:
o ();
if (l > 0) goto <L15>; else goto <L4>;
<L15>:;
i = 0;
Invalid sum of incoming frequencies 7098, should be 9100
<L0>:;
if (MEM[base: y, index: (unsigned int) i, step: 4] != 0) goto <L1>; else goto
<L2>;
<L1>:;
g ();
goto <bb 7> (<L4>);
<L2>:;
i = i + 1;
if (l > i) goto <L0>; else goto <L4>;
Invalid sum of incoming frequencies 2902, should be 900
<L4>:;
h () [tail call];
return;
}
So, fixed. Since 4.1 actually.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13876
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/13876] loop not fully optimized
[not found] <bug-13876-6528@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2007-04-22 11:49 ` rguenth at gcc dot gnu dot org
@ 2007-04-22 17:39 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-22 17:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2007-04-22 18:39 -------
> So, fixed. Since 4.1 actually.
No, the example in comment #2 is not fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
Target Milestone|4.1.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13876
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <bug-13876-4@http.gcc.gnu.org/bugzilla/>]
* [Bug optimization/13876] New: loop not fully optimized
@ 2004-01-27 6:06 pinskia at gcc dot gnu dot org
2004-05-24 15:19 ` [Bug tree-optimization/13876] " pinskia at gcc dot gnu dot org
2005-05-07 18:53 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-27 6:06 UTC (permalink / raw)
To: gcc-bugs
Basically these two functions should produce the same code, the check for NotFound is not needed
at all.
void g(); void h(); void o();
void t(int l, int *y)
{
int i;
int NotFound;
o();
for(i = 0, NotFound = 1;NotFound && i<l;i++)
{ if (y[i]) { NotFound = 0; g(); } }
h();
}
void t1(int l, int *y)
{
int i;
int NotFound;
o();
for(i = 0, NotFound = 1;NotFound && i<l;i++)
{ if (y[i]) { NotFound = 0; g(); break; } }
h();
}
--
Summary: loop not fully optimized
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: pessimizes-code
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: dann at godzilla dot ics dot uci dot edu,gcc-bugs at gcc
dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13876
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-12-01 5:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-13876-6528@http.gcc.gnu.org/bugzilla/>
2006-02-27 13:53 ` [Bug tree-optimization/13876] loop not fully optimized steven at gcc dot gnu dot org
2006-02-27 14:22 ` pinskia at gcc dot gnu dot org
2006-03-21 15:08 ` law at redhat dot com
2007-04-22 11:49 ` rguenth at gcc dot gnu dot org
2007-04-22 17:39 ` pinskia at gcc dot gnu dot org
[not found] <bug-13876-4@http.gcc.gnu.org/bugzilla/>
2014-12-01 5:20 ` pinskia at gcc dot gnu.org
2004-01-27 6:06 [Bug optimization/13876] New: " pinskia at gcc dot gnu dot org
2004-05-24 15:19 ` [Bug tree-optimization/13876] " pinskia at gcc dot gnu dot org
2005-05-07 18:53 ` 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).