This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: [PATCH] Builtin strcpy/strncpy/memcpy/strcmp/fputs fixes and optimizations


On Wed, Nov 29, 2000 at 08:50:56AM +0100, Jakub Jelinek wrote:
> So that strncpy can be handled by that code, I had to split it into a test
> phase (can_store_by_pieces) which does not emit any instructions and actual
> action function (store_by_pieces), because at the moment we want to return 0
> and fallback to strncpy call if that fails.

I don't see that such duplication of code is required.  You could simply
have store_by_pieces call start_sequence, and if the constant generator
fails, abandon the sequence without emitting it.

Am I missing something here?

Also, it seems like it would make more sense for store_by_pieces_2 to
check the legitimacy of the constant rather than having each separate
generator be responsible for doing that.



r~

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