[all-commits] [llvm/llvm-project] 0f6105: [clang][HLSL][SPRI-V] Add convergence intrinsics (...

Nathan Gauër via All-commits all-commits at lists.llvm.org
Thu Mar 28 09:18:28 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f61051f541a5b8cfce25c84262dfdbadb9ca688
      https://github.com/llvm/llvm-project/commit/0f61051f541a5b8cfce25c84262dfdbadb9ca688
  Author: Nathan Gauër <brioche at google.com>
  Date:   2024-03-28 (Thu, 28 Mar 2024)

  Changed paths:
    M clang/include/clang/Basic/Builtins.td
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CGLoopInfo.h
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/Headers/hlsl/hlsl_intrinsics.h
    A clang/test/CodeGenHLSL/builtins/wave_get_lane_index_do_while.hlsl
    A clang/test/CodeGenHLSL/builtins/wave_get_lane_index_simple.hlsl
    A clang/test/CodeGenHLSL/builtins/wave_get_lane_index_subcall.hlsl
    M llvm/include/llvm/IR/IntrinsicInst.h

  Log Message:
  -----------
  [clang][HLSL][SPRI-V] Add convergence intrinsics (#80680)

HLSL has wave operations and other kind of function which required the
control flow to either be converged, or respect certain constraints as
where and how to re-converge.

At the HLSL level, the convergence are mostly obvious: the control flow
is expected to re-converge at the end of a scope.
Once translated to IR, HLSL scopes disapear. This means we need a way to
communicate convergence restrictions down to the backend.

For this, the SPIR-V backend uses convergence intrinsics. So this commit
adds some code to generate convergence intrinsics when required.

---------

Signed-off-by: Nathan Gauër <brioche at google.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list