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]
Other format: [Raw text]

Re: New prologue/epilogue code for i386 string functions


> Jan Hubicka <hubicka@ucw.cz> writes:
> 
> > +static void
> > +expand_set_or_movmem_prologue_epilogue_by_misaligned_moves (rtx destmem, rtx srcmem,
> > +							    rtx *destptr, rtx *srcptr,
> > +							    enum machine_mode mode,
> > +							    rtx value, rtx vec_value,
> > +							    rtx *count,
> > +							    rtx *done_label,
> > +							    int size,
> > +							    int desired_align,
> > +							    int align,
> > +							    unsigned HOST_WIDE_INT *min_size,
> > +							    bool dynamic_check,
> > +							    bool
> > issetmem)
> 
> That's a scary prototype. Could you refactor this somehow to not need
> that many parameters? Perhaps this should be multiple functions.

Well, it became worse with merging memcpy and memset code (but not by that much).
The problem here is that the prologue/epilogue code does really quite a lot of things
at once.

It sort of naturally split into the code handling small memcpy and the branchless code
copying first and last N bytes.  I can split the function this way, but I think the
first one will take pretty much all the existing parameters...
I will try to look into this...

Honza
> 
> -Andi
> 
> -- 
> ak@linux.intel.com -- Speaking for myself only


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