This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/30442] Expanded array initialization can use memset builtin function
- From: "irar at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2008 06:51:14 -0000
- Subject: [Bug middle-end/30442] Expanded array initialization can use memset builtin function
- References: <bug-30442-1649@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from irar at il dot ibm dot com 2008-03-13 06:51 -------
(In reply to comment #4)
> This still happens on mainline.
>
> I wonder if vectorizer infrastructure can be re-used here to detect unrolled
> and looped version of memset. In addition to loop that can be "vectorized", we
> have something resembling "vectorization" of straight code.
This code can be vectorized with basic block SLP, which is not implemented yet
(currently only SLP in loops is implemented).
> And looking at comment #3, the rewards from real-world code look really
> promising.
>
However, in comment #3 there is a loop:
: MALLOC(visited, int, d->tindex);
48796 16.2440 : for (i = 0; i < d->tindex; ++i)
94442 31.4394 : visited[i] = 0;
There was an effort to replace such loops with calls to builtins -
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00054.html.
Ira
--
irar at il dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |irar at il dot ibm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30442