> I think this behavior makes sense. If the size is variable, it could > be arbitrarily large. We should assume that memcpy (the library > implementation) is tuned as best as possible for handling the unknown > size case.
Yes, we know that libc memcpy is better for big values and that inline is better for small values. When the value is not know at compile time, we can only guess. If we guess that it will be small, we get it wrong for any size bigger then an small arch specific limit (128 for x86-64 I think). If we guess that it will be large, we add it small overhead for small values, but a big saving for big ones. This might be a good case for profiling based optimization ..... > -Chris Cheers, -- Rafael Avila de Espindola Google Ireland Ltd. Gordon House Barrow Street Dublin 4 Ireland Registered in Dublin, Ireland Registration Number: 368047 _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits