[Bug middle-end/53081] memcpy/memset loop recognition
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53081 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek 2012-04-23 08:18:42 UTC --- Note that -ftree-loop-distribution for some weird reason only handles clearing, but not initialization by arbitrary constants that are convertible to memset (i.e. all bytes have the same constant stored, such as 0x0a0a0a0a etc.).
[Bug middle-end/53081] memcpy/memset loop recognition
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53081 --- Comment #6 from Andrew Pinski 2012-04-23 06:54:43 UTC --- (In reply to comment #4) > LLVM's version also tries to merge smaller memsets into a larger one. That is filed as PR 49872. And the original issue is related to PR 30442.
[Bug middle-end/53081] memcpy/memset loop recognition
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53081 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org --- Comment #5 from Alexander Monakov 2012-04-23 06:53:11 UTC --- The memset part can be handled by -ftree-loop-distribution (not enabled at -O3)
[Bug middle-end/53081] memcpy/memset loop recognition
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53081 --- Comment #4 from davidxl 2012-04-23 05:34:55 UTC --- (In reply to comment #2) > I should mention I made one patch before based on the vectorizer code which > did > detection of at least memset; it was while I was an intern at Apple. I posted > it and there was some review. And a few years back there was a paper at the > GCC summit about it and expanding it to memcpy. I don't know what happened to > that code though. Some simple analysis using scev to identify loads and stores with linear address should be good enough. LLVM's version also tries to merge smaller memsets into a larger one.
[Bug middle-end/53081] memcpy/memset loop recognition
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53081 --- Comment #3 from davidxl 2012-04-23 05:34:24 UTC --- (In reply to comment #2) > I should mention I made one patch before based on the vectorizer code which > did > detection of at least memset; it was while I was an intern at Apple. I posted > it and there was some review. And a few years back there was a paper at the > GCC summit about it and expanding it to memcpy. I don't know what happened to > that code though. Some simple analysis using scev to identify loads and stores with linear address should be good enough. LLVM's version also tries to merge smaller memsets into a larger one.
[Bug middle-end/53081] memcpy/memset loop recognition
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53081 --- Comment #2 from Andrew Pinski 2012-04-23 05:07:30 UTC --- I should mention I made one patch before based on the vectorizer code which did detection of at least memset; it was while I was an intern at Apple. I posted it and there was some review. And a few years back there was a paper at the GCC summit about it and expanding it to memcpy. I don't know what happened to that code though.
[Bug middle-end/53081] memcpy/memset loop recognition
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53081 --- Comment #1 from Andrew Pinski 2012-04-23 05:03:28 UTC --- I thought there is already one part of graphite.