Re: Best way to compute cost of a sequence of gimple stmt

2014-06-11 Thread Richard Biener
On Wed, Jun 11, 2014 at 10:27 AM, Thomas Preud'homme wrote: >> From: Richard Biener [mailto:richard.guent...@gmail.com] >> Sent: Wednesday, June 11, 2014 4:09 PM > >> > >> > Oh I see. Doing it there would mean instead of two independent >> > operations you'd do the best combination possible, is th

RE: Best way to compute cost of a sequence of gimple stmt

2014-06-11 Thread Thomas Preud'homme
> From: Richard Biener [mailto:richard.guent...@gmail.com] > Sent: Wednesday, June 11, 2014 4:09 PM > > > > Oh I see. Doing it there would mean instead of two independent > > operations you'd do the best combination possible, is that right? > > Yes (but probably it's not worth the trouble). I un

Re: Best way to compute cost of a sequence of gimple stmt

2014-06-11 Thread Richard Biener
On Wed, Jun 11, 2014 at 7:45 AM, Thomas Preud'homme wrote: >> From: Richard Biener [mailto:richard.guent...@gmail.com] >> Sent: Tuesday, June 10, 2014 5:16 PM >> > >> In general this is impossible to do. I don't have a good answer on >> how to determine whether (unaligned) load + bswap is faster

RE: Best way to compute cost of a sequence of gimple stmt

2014-06-10 Thread Thomas Preud'homme
> From: Richard Biener [mailto:richard.guent...@gmail.com] > Sent: Tuesday, June 10, 2014 5:16 PM > > In general this is impossible to do. I don't have a good answer on > how to determine whether (unaligned) load + bswap is faster than > doing sth else - but there is a very good chance that the

Re: Best way to compute cost of a sequence of gimple stmt

2014-06-10 Thread Richard Biener
On Tue, Jun 10, 2014 at 10:32 AM, Thomas Preud'homme wrote: > Hi there, > > With recent changes to it, the bswap pass can now replace a series of > (probably aligned) load + bitwise operation (AND, OR and shifts) + casts > by a (potentially unaligned) load and a bswap. I was rightfully pointed > o

Best way to compute cost of a sequence of gimple stmt

2014-06-10 Thread Thomas Preud'homme
Hi there, With recent changes to it, the bswap pass can now replace a series of (probably aligned) load + bitwise operation (AND, OR and shifts) + casts by a (potentially unaligned) load and a bswap. I was rightfully pointed out that this might be more expensive than the original sequence of gimpl