Use-and-clobber insns and some ancient combine.c code
Ulrich Weigand
weigand@i1.informatik.uni-erlangen.de
Thu Jun 17 16:08:00 GMT 2004
Richard Earnshaw wrote:
> CLOBBER is used to indicate that a value is destroyed by the insn, but
> it doesn't say precisely when this happens. In the case of hard
> registers we have to be conservative, because there is no way to convey
> the equivalent of an early-clobber operand (a value that is destroyed
> before all the other inputs have been processed).
I had not been aware of this interpretation of CLOBBER. This is
unfortunate, as it appears to make the use of use-and-clobber
type patterns unfeasible ...
Has it always been that way? The documentation appears a bit ambiguous
on that point, e.g.:
When a @code{clobber} expression for a register appears inside a
@code{parallel} with other side effects, the register allocator
guarantees that the register is unoccupied both before and after that
insn. However, the reload phase may allocate a register used for one of
the inputs unless the @samp{&} constraint is specified for the selected
alternative (@pxref{Modifiers}).
These two sentences appear to directly contradict each other.
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de
More information about the Gcc
mailing list