[PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie
Segher Boessenkool
segher@kernel.crashing.org
Wed Jun 14 16:32:36 GMT 2023
On Wed, Jun 14, 2023 at 09:22:09AM +0000, Richard Biener wrote:
> How can a clobber be validly dropped?
Same as any other set: if no code executed after it can read whatever is
written. This typically means a stack frame goes away, or simply no
more code is executed *at all* after this.
> For the case of stack
> memory if there's no stack use after it it could be elided
> and I suppose the clobber itself can be moved. But then
> the function return is a stack use as well.
A function return does not access the stack at all on most
architectures, including PowerPC. Some epilogue insns can do, of
course, but we expand to separate insns during expand already.
Segher
More information about the Gcc-patches
mailing list