Le 21/09/2022 à 11:57, Thomas Koenig a écrit :

Hi Harald,

I think I understand much of what is said, but I feel that I do
not really understand what *clobber* means for the different
beasts we are discussing (although I have an impression of what
it means for a scalar object).

Obviously, "clobber" means taking a big stick and hitting the beast
in question over the head with it :-)

More seriously: My understanding of a clobber it is a hint to
the middle end that the value in question will not be used,
and that operations leading to this value can be removed,
unless they are used otherwise.

My understanding is that "clobber" means "overwrite with garbage" for all the beasts we have been discussing, which translates to nothing in the final code, but can be used by the optimizers as Thomas said.

This is a bit off-topic but clobbers model registers having their values changed unpredictably or by ways unknown to the compiler, in the backend code, or in inline assembly statements.
Here is an excerpt from rtl.texi:
@item (clobber @var{x})
Represents the storing or possible storing of an unpredictable,
undescribed value into @var{x}

I Hope it helps.

Reply via email to