This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
memcpy
- From: Richard Henderson <rth at redhat dot com>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 19 Feb 2003 16:47:28 -0800
- Subject: memcpy
[ re: http://gcc.gnu.org/ml/libstdc++/2003-02/msg00056.html ]
The problem here is the lameness of both our inliner and the
code that expands builtins. Most of the builtins want to see
constants in one form or another, and if they don't, they
don't expand.
Now, this can be combated in specific situations. Namely, our
inliner is happy to do constant propagation, but *only* if the
argument itself is marked constant. I.e.
inline void foo(void * const x, const void * const y, size_t const s)
{
memcpy(x, y, s);
}
instead of
inline void foo(void * x, const void * y, size_t s)
{
memcpy(x, y, s);
}
I don't know if you're allowed to make this change at will
though, since it probably affects name mangling?
It is my fervent hope that this will eventually Just Work
with tree-ssa.
r~