This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/53081] memcpy/memset loop recognition
- From: "xinliangli at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 Apr 2012 05:34:24 +0000
- Subject: [Bug middle-end/53081] memcpy/memset loop recognition
- Auto-submitted: auto-generated
- References: <bug-53081-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53081
--- Comment #3 from davidxl <xinliangli at gmail dot com> 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.