[llvm] [AMDGPU][TTI] Add target hook for the custom instruction uniformity (PR #137639)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 02:45:53 PDT 2025
jayfoad wrote:
> We believe it will be expensive because there's a virtual function call happening every time the UA (re)visits an intrinsic call. The approach we are exploring now is more static ... the target hook can return an enum encoding the "uniformity policy" of the intrinsic, which will be cached. Then the UA can interpret the policy every time it visits an intrinsic. That way, all the queries and decisions taken for uniformity stay within the UA implementation, and the virtual function is called only once when initializing the UA.
Well, OK, but I think it needs to be at least flexible enough to handle cases like ""result is uniform if either of the first two operands are uniform", for intrinsics like llvm.amdgcn.permlane16.
https://github.com/llvm/llvm-project/pull/137639
More information about the llvm-commits
mailing list