PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]
Segher Boessenkool
segher@kernel.crashing.org
Thu Sep 17 22:26:39 GMT 2020
On Thu, Sep 17, 2020 at 05:27:59PM +0100, Richard Sandiford wrote:
> Qing Zhao <QING.ZHAO@ORACLE.COM> writes:
> > The following is what I see from i386.md: (I didn’t look at how “UNSPEC_volatile” is used in data flow analysis in GCC yet)
> >
> > ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and
> > ;; all of memory. This blocks insns from being moved across this point.
>
> Heh, it looks like that comment dates back to 1994. :-)
>
> The comment is no longer correct though. I wasn't around at the time,
> but I assume the comment was only locally true even then.
I think it was never true at all, even.
An unspec_volatile is just an unspec that is volatile, i.e. it needs to
be executed in the real machine exactly like in the abstract C machine
(wrt sequence points). It typically does something the compiler does
not model (say, to resources it does not know about), but you can use it
for anything you want executed approximately as written.
> UNSPEC_VOLATILEs can't be deleted.
(If they are executed at all, anyway ;-) )
Segher
More information about the Gcc-patches
mailing list