Hi! On Wed, Sep 23, 2020 at 12:05:22PM +0100, Richard Sandiford wrote: > Qing Zhao <qing.z...@oracle.com> writes: > > (But I do feel that the design for UNSPEC_volatile is not clean) > > Agreed. But I think that's partly because what it's trying to achieve > isn't clean either. It's a catch-all for “something is happening, > but we're not saying what”. And not saying what is itself unclean. ;-)
It shares all those same issues with just unspec, there is nothing that unspec_volatile adds that is weird like this. But yes, that is a very good reason to not use unspecs unless you have to: they hinder optimisation much, and if that was your actual *goal*, you will often find that they do not prevent every optimisation you wanted them to. Segher