[all-commits] [llvm/llvm-project] 2ac8e6: [NVPTX] Implement `__builtin_readcyclecounter` on ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Mon Feb 12 05:08:00 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2ac8e6b7f5b8f495f496a55512e5ea452beb0bca
      https://github.com/llvm/llvm-project/commit/2ac8e6b7f5b8f495f496a55512e5ea452beb0bca
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
    M llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
    M llvm/lib/Target/NVPTX/NVPTXIntrinsics.td
    M llvm/test/CodeGen/NVPTX/intrinsics.ll

  Log Message:
  -----------
  [NVPTX] Implement `__builtin_readcyclecounter` on NVPTX (#81344)

Summary:
This patch simply states that `__builtin_readcyclecounter` is legal on
NVPTX and makes it  return the value from the `clock64` sreg. The timer
intrinsics are marked as having side effects, which is desireable for
timing primitives and required to pattern match the instrinic DAG.




More information about the All-commits mailing list