This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: profiling on sh
- From: mike stump <mrs at windriver dot com>
- To: aoliva at redhat dot com, mark at codesourcery dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 16 Mar 2002 11:58:17 -0800 (PST)
- Subject: Re: profiling on sh
> To: "Kris Warkentin" <kewarken@qnx.com>
> Cc: <gcc@gcc.gnu.org>
> From: Alexandre Oliva <aoliva@redhat.com>
> Date: 16 Mar 2002 16:00:27 -0300
> /* In C++, we never create builtin functions whose name does not
> begin with `__'. Users should be using headers to get prototypes
> in C++. It would be nice if we could warn when `-fbuiltin' is
> used explicitly, but we do not have that information. */
> flag_no_builtin = 1;
I disagree fundamentally with this change. The main thing I don't
like about it, is that it kills performance:
#include <memory.h>
int a, b;
int main() {
memcpy(&a, &b, sizeof(a));
}
main:
sethi %hi(a), %g1
or %g1, %lo(a), %o0
sethi %hi(b), %g1
or %g1, %lo(b), %o1
call memcpy, 0
mov 4, %o2
v:
sethi %hi(b), %g1
ld [%g1+%lo(b)], %i2
sethi %hi(a), %g1
st %i2, [%g1+%lo(a)]
This is unacceptable. Remove non-standard builtins, if you must with
-ansi -pendantic. Heck, even remove specific unwanted builtins as you
want. Removing memcpy, in a normal compile, isn't what we want. That
should only be removed with -fno-builtin, or with -freestanding, or
whatever they call it this week.
What issue were you trying to resolve with this change Mark? Did you
mean to kill performance of some apps? :-(
Also, I don't think we should remove alloca from being a builtin with
a normal compile.