public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/19652] New: should always optimize constant second argument to strspn & Co. at compile time
@ 2005-01-27 7:18 melkov at comptek dot ru
2005-01-27 9:03 ` [Bug middle-end/19652] " falk at debian dot org
2005-01-27 13:31 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: melkov at comptek dot ru @ 2005-01-27 7:18 UTC (permalink / raw)
To: gcc-bugs
strspn, strcspn, strpbrk functions make a bitmap out of their second argument
and then process their first argument using that bitmap.
If the second argument is a constant string, that bitmap should be built at the
compile time, and strspn call be replaced with some intrinsic function that can
use that bitmap.
--
Summary: should always optimize constant second argument to
strspn & Co. at compile time
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: melkov at comptek dot ru
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19652
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug middle-end/19652] should always optimize constant second argument to strspn & Co. at compile time
2005-01-27 7:18 [Bug middle-end/19652] New: should always optimize constant second argument to strspn & Co. at compile time melkov at comptek dot ru
@ 2005-01-27 9:03 ` falk at debian dot org
2005-01-27 13:31 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: falk at debian dot org @ 2005-01-27 9:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2005-01-27 09:02 -------
(In reply to comment #0)
> strspn, strcspn, strpbrk functions make a bitmap out of their second argument
> and then process their first argument using that bitmap.
> If the second argument is a constant string, that bitmap should be built at the
> compile time, and strspn call be replaced with some intrinsic function that can
> use that bitmap.
Well, with that we'd be wandering off far into libc land. While this kind of
optimization is nice, I wouldn't really want to have strspn code for 40
platforms in gcc to maintain (and if you're that desperate for speed, you
want platform-specific code). Alternatively, you could try to convince your
libc providers to include such functions in their libc, and then we might
implement calling them.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19652
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug middle-end/19652] should always optimize constant second argument to strspn & Co. at compile time
2005-01-27 7:18 [Bug middle-end/19652] New: should always optimize constant second argument to strspn & Co. at compile time melkov at comptek dot ru
2005-01-27 9:03 ` [Bug middle-end/19652] " falk at debian dot org
@ 2005-01-27 13:31 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-27 13:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-27 13:31 -------
I am going to agree with Falk here, this is a hard problem to solve inside gcc. Again talk with you libc
provider.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19652
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-01-27 13:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-27 7:18 [Bug middle-end/19652] New: should always optimize constant second argument to strspn & Co. at compile time melkov at comptek dot ru
2005-01-27 9:03 ` [Bug middle-end/19652] " falk at debian dot org
2005-01-27 13:31 ` 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).