[PATCH] D105836: [AMDGPU] Add TII::isAmbientPhysRegUse() to allow VOP rematerialization

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 14 09:56:14 PDT 2021


rampitec added a comment.

In D105836#2877339 <https://reviews.llvm.org/D105836#2877339>, @kparzysz wrote:

> The definition of "ambient" is so vague that I have no idea what it's trying to convey.
>
> There is already a concept of "pristine" registers, which sounds similar.  How is this different?

It is not the same as pristine registers. For pristine registers the idea is that value in a register must be preserved but actually unused in a function. In this case value is not preserved and actually may be used, it is just not directly used in an instruction. The EXEC register holds "execution mask", essentially a mask of active threads. We add it as an implicit operand to all VALU instructions to model the dependency on this mask. However, these instructions do not really read EXEC, it is just a predicate. This implicit use is more or less an "environment" thing.

I agree that "ambient" sounds vague and would appreciate any suggestion.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105836/new/

https://reviews.llvm.org/D105836



More information about the llvm-commits mailing list