public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/15739] Fold strstr at tree level.
2004-05-31 21:24 [Bug tree-optimization/15739] New: Convert strstr into strchr if we are looking for a single character kazu at cs dot umass dot edu
@ 2004-05-31 21:24 ` kazu at cs dot umass dot edu
2004-05-31 21:24 ` kazu at cs dot umass dot edu
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-05-31 21:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-05-30 22:29 -------
char *
bar (void)
{
const char *haystack = "abcd";
const char *needle = "a";
return strstr (haystack, needle);
}
I get:
bar ()
{
const char * needle;
const char * haystack;
char * T.0;
<bb 0>:
T.0_3 = strstr ("abcd", "a") [tail call];
return T.0_3;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords|missed-optimization |
Summary|Convert strstr into strchr |Fold strstr at tree level.
|if we are looking for a |
|single character. |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15739
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/15739] Convert strstr into strchr if we are looking for a single character.
2004-05-31 21:24 [Bug tree-optimization/15739] New: Convert strstr into strchr if we are looking for a single character kazu at cs dot umass dot edu
2004-05-31 21:24 ` [Bug tree-optimization/15739] Fold strstr at tree level kazu at cs dot umass dot edu
2004-05-31 21:24 ` kazu at cs dot umass dot edu
@ 2004-05-31 21:24 ` pinskia at gcc dot gnu dot org
2004-05-31 22:45 ` [Bug tree-optimization/15739] Fold strstr at tree level kazu at cs dot umass dot edu
2004-09-23 14:58 ` kazu at cs dot umass dot edu
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-31 21:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-30 22:29 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2004-05-30 22:29:34
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15739
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/15739] New: Convert strstr into strchr if we are looking for a single character.
@ 2004-05-31 21:24 kazu at cs dot umass dot edu
2004-05-31 21:24 ` [Bug tree-optimization/15739] Fold strstr at tree level kazu at cs dot umass dot edu
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-05-31 21:24 UTC (permalink / raw)
To: gcc-bugs
char *
foo (const char *haystack)
{
const char *needle = "a";
return strstr (haystack, needle);
}
I get:
foo (haystack)
{
const char * needle;
char * T.0;
<bb 0>:
T.0_3 = strstr (haystack_2, "a") [tail call];
return T.0_3;
}
--
Summary: Convert strstr into strchr if we are looking for a
single character.
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15739
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/15739] Fold strstr at tree level.
2004-05-31 21:24 [Bug tree-optimization/15739] New: Convert strstr into strchr if we are looking for a single character kazu at cs dot umass dot edu
2004-05-31 21:24 ` [Bug tree-optimization/15739] Fold strstr at tree level kazu at cs dot umass dot edu
@ 2004-05-31 21:24 ` kazu at cs dot umass dot edu
2004-05-31 21:24 ` [Bug tree-optimization/15739] Convert strstr into strchr if we are looking for a single character pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-05-31 21:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-05-30 22:31 -------
char *
baz (void)
{
const char *haystack = "abcd";
const char *needle = "";
return strstr (haystack, needle);
}
I get:
baz ()
{
const char * needle;
const char * haystack;
char * T.0;
<bb 0>:
T.0_3 = strstr ("abcd", "") [tail call];
return T.0_3;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15739
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/15739] Fold strstr at tree level.
2004-05-31 21:24 [Bug tree-optimization/15739] New: Convert strstr into strchr if we are looking for a single character kazu at cs dot umass dot edu
` (2 preceding siblings ...)
2004-05-31 21:24 ` [Bug tree-optimization/15739] Convert strstr into strchr if we are looking for a single character pinskia at gcc dot gnu dot org
@ 2004-05-31 22:45 ` kazu at cs dot umass dot edu
2004-09-23 14:58 ` kazu at cs dot umass dot edu
4 siblings, 0 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-05-31 22:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-05-31 13:25 -------
I've got a patch in testing.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |kazu at cs dot umass dot edu
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15739
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/15739] Fold strstr at tree level.
2004-05-31 21:24 [Bug tree-optimization/15739] New: Convert strstr into strchr if we are looking for a single character kazu at cs dot umass dot edu
` (3 preceding siblings ...)
2004-05-31 22:45 ` [Bug tree-optimization/15739] Fold strstr at tree level kazu at cs dot umass dot edu
@ 2004-09-23 14:58 ` kazu at cs dot umass dot edu
4 siblings, 0 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-09-23 14:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-09-23 14:58 -------
This got silently fixed.
Most likely due to:
http://gcc.gnu.org/ml/gcc-patches/2004-09/msg00754.html
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15739
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-09-23 14:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-31 21:24 [Bug tree-optimization/15739] New: Convert strstr into strchr if we are looking for a single character kazu at cs dot umass dot edu
2004-05-31 21:24 ` [Bug tree-optimization/15739] Fold strstr at tree level kazu at cs dot umass dot edu
2004-05-31 21:24 ` kazu at cs dot umass dot edu
2004-05-31 21:24 ` [Bug tree-optimization/15739] Convert strstr into strchr if we are looking for a single character pinskia at gcc dot gnu dot org
2004-05-31 22:45 ` [Bug tree-optimization/15739] Fold strstr at tree level kazu at cs dot umass dot edu
2004-09-23 14:58 ` kazu at cs dot umass dot edu
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).