public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/55701] New: Inline some instances of memset for ARM
@ 2012-12-15  1:11 josh.m.conner at gmail dot com
  2014-06-10  7:34 ` [Bug target/55701] " ramana at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: josh.m.conner at gmail dot com @ 2012-12-15  1:11 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55701

             Bug #: 55701
           Summary: Inline some instances of memset for ARM
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: josh.m.conner@gmail.com


memset() is almost never inlined on ARM, even at -O3.  If the target is known
to be 4-byte aligned or greater, it will be inlined for 1, 2, or 4 byte
lengths.  If the target alignment is unknown, it will be inlined only for a
single byte.

I don't see this problem with similar builtins (memcpy, memmove, and memclear
(memset with a target value of zero)) - they all inline small cases.

It probably makes sense for memset to be inlined up to at least 16 bytes or so
in all cases.

When aligned, memcpy and memmove use a ldmia/stmia (load multiple/store
multiple) sequence to create fairly compact inline code.  We could consider
doing the same sort of optimization with memset, using stmia only.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-02-17 11:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-15  1:11 [Bug target/55701] New: Inline some instances of memset for ARM josh.m.conner at gmail dot com
2014-06-10  7:34 ` [Bug target/55701] " ramana at gcc dot gnu.org
2014-07-21 12:24 ` amker at gcc dot gnu.org
2014-07-23 16:02 ` amker at gcc dot gnu.org
2014-07-24 11:05 ` ramana at gcc dot gnu.org
2014-09-05  3:46 ` amker at gcc dot gnu.org
2015-02-16  6:02 ` amker at gcc dot gnu.org
2015-02-17 11:09 ` rearnsha at gcc dot gnu.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).