public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/45636] Failed to fold simple Fortran string Date: Fri, 10 Sep 2010 15:47:00 -0000 [thread overview] Message-ID: <20100910154730.27483.qmail@sourceware.org> (raw) In-Reply-To: <bug-45636-682@http.gcc.gnu.org/bugzilla/> ------- Comment #5 from jakub at gcc dot gnu dot org 2010-09-10 15:47 ------- For arbitrary lengths (both of the constant string and of the padding) the memmove (which will be optimized to memcpy as the source is read-only) + memset is the best thing to do, replacing say memmove (x, "900 bytes long string", 900); memset (x + 900, ' ', 100); would be very .rodata size unfriendly. So, the question is, do we want to optimize this for very small sizes of both (what sizes? Should we call can_store_by_pieces to determine that from the FE?) in the FE by transforming that say memmove (x, "ABCDE", 5); memset (x + 5, ' ', 3); into memcpy (x, "ABCDE ", 8); or should we do this generically in the middle-end, where we'd do this transformation for such cases even for other languages? -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45636
next prev parent reply other threads:[~2010-09-10 15:47 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-09-10 14:48 [Bug fortran/45636] New: " hjl dot tools at gmail dot com 2010-09-10 15:12 ` [Bug fortran/45636] " kargl at gcc dot gnu dot org 2010-09-10 15:20 ` kargl at gcc dot gnu dot org 2010-09-10 15:33 ` hjl dot tools at gmail dot com 2010-09-10 15:34 ` kargl at gcc dot gnu dot org 2010-09-10 15:47 ` jakub at gcc dot gnu dot org [this message] [not found] <bug-45636-4@http.gcc.gnu.org/bugzilla/> 2010-09-27 11:07 ` tkoenig at gcc dot gnu.org 2010-10-12 22:01 ` jakub at gcc dot gnu.org 2010-10-16 18:59 ` danglin at gcc dot gnu.org 2010-10-17 15:42 ` dave at hiauly1 dot hia.nrc.ca 2010-10-28 17:54 ` ro at gcc dot gnu.org 2010-11-05 21:13 ` sje at cup dot hp.com 2010-11-07 7:46 ` burnus at gcc dot gnu.org 2010-11-07 19:44 ` dave at hiauly1 dot hia.nrc.ca 2010-11-08 16:08 ` sje at cup dot hp.com 2010-11-23 23:53 ` danglin at gcc dot gnu.org 2010-11-24 1:09 ` danglin at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100910154730.27483.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).