[all-commits] [llvm/llvm-project] 7ce4e9: [RISCV] Implement prefetch locality by NTLH

Piyou Chen via All-commits all-commits at lists.llvm.org
Sun Jul 16 20:33:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ce4e933eab28d7a6b7a54ef96bee8853cc30bbc
      https://github.com/llvm/llvm-project/commit/7ce4e933eab28d7a6b7a54ef96bee8853cc30bbc
  Author: Piyou Chen <piyou.chen at sifive.com>
  Date:   2023-07-16 (Sun, 16 Jul 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
    M llvm/test/CodeGen/RISCV/prefetch.ll

  Log Message:
  -----------
  [RISCV] Implement prefetch locality by NTLH

We add the MemOperand then backend will generate NTLH automatically.

```
__builtin_prefetch(ptr,  0 /* rw==read */, 0 /* locality */); => ntl.all + prefetch.r (ptr)
__builtin_prefetch(ptr,  0 /* rw==read */, 1 /* locality */); => ntl.pall + prefetch.r (ptr)
__builtin_prefetch(ptr,  0 /* rw==read */, 2 /* locality */); => ntl.p1 + prefetch.r (ptr)
__builtin_prefetch(ptr,  0 /* rw==read */, 3 /* locality */); => prefetch.r (ptr)
```

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D154691




More information about the All-commits mailing list