This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]