This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Preventing scheduling of normal operations across calls to built-ins
Mohamed Shafi <shafitvm@gmail.com> writes:
> When you say UNSPEC_VOLATILE doesn't prevent instructions from moving,
> do you mean to say that such patterns will get reordered by the
> scheduler?
In general the instruction scheduler will not move instructions across
UNSPEC_VOLATILE instructions. But the combiner will. And the scheduler
implements scheduling barriers by inserting dependencies. An
instruction which does not refer to registers or memory and is not
itself UNSPEC_VOLATILe does not have any dependencies, and I'm not sure
what the scheduler will do with it.
Ian