On Wed, Oct 29, 2014 at 11:42:06AM +0000, Matthew Fortune wrote: > Hi James, > > I think you have a bug in the following hunk where you pass > STORE_MAX_PIECES in place of the optimise for speed flag. I guess you > would need an extra argument to pass a different *_MAX_PIECES value > in.
Yup, good spot and agreed. I think I'll respin this series and get rid of all the *_BY_PIECES_P in one sweep. I'm thinking of something like: use_by_pieces_infrastructure_p (unsigned int size, unsigned int alignment, enum by_pieces_mode mode, bool speed_p) which will take the type of by_pieces operation as the third parameter. Thanks, James > >@@ -192,8 +184,7 @@ static void write_complex_part (rtx, rtx, bool); > > called to "memcpy" storage when the source is a constant string. */ > > #ifndef STORE_BY_PIECES_P > > #define STORE_BY_PIECES_P(SIZE, ALIGN) \ > >- (move_by_pieces_ninsns (SIZE, ALIGN, STORE_MAX_PIECES + 1) \ > >- < (unsigned int) MOVE_RATIO (optimize_insn_for_speed_p ())) > >+ (targetm.move_by_pieces_profitable_p (SIZE, ALIGN, STORE_MAX_PIECES)) > > #endif > > > > > > /* This is run to set up which modes can be use > >