[all-commits] [llvm/llvm-project] 298127: Reapply [IR] Initial introduction of llvm.experime...

Alex Bradbury via All-commits all-commits at lists.llvm.org
Fri Nov 15 07:22:34 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 298127dcbe2ecd1f3c49c2109ac96654778f20be
      https://github.com/llvm/llvm-project/commit/298127dcbe2ecd1f3c49c2109ac96654778f20be
  Author: Alex Bradbury <asb at igalia.com>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/InstVisitor.h
    M llvm/include/llvm/IR/IntrinsicInst.h
    M llvm/include/llvm/IR/Intrinsics.td
    M llvm/include/llvm/Transforms/Utils/LowerMemIntrinsics.h
    M llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp
    A llvm/test/CodeGen/RISCV/memset-pattern.ll
    A llvm/test/Transforms/PreISelIntrinsicLowering/PowerPC/lit.local.cfg
    A llvm/test/Transforms/PreISelIntrinsicLowering/PowerPC/memset-pattern.ll
    A llvm/test/Transforms/PreISelIntrinsicLowering/RISCV/lit.local.cfg
    A llvm/test/Transforms/PreISelIntrinsicLowering/RISCV/memset-pattern.ll
    M llvm/test/Verifier/intrinsic-immarg.ll
    A llvm/test/Verifier/memset-pattern.ll

  Log Message:
  -----------
  Reapply [IR] Initial introduction of llvm.experimental.memset_pattern (#97583)

Relands 7ff3a9acd84654c9ec2939f45ba27f162ae7fbc3 after regenerating the
test case.

Supersedes the draft PR #94992, taking a different approach following
feedback:
* Lower in PreISelIntrinsicLowering
* Don't require that the number of bytes to set is a compile-time
constant
* Define llvm.memset_pattern rather than llvm.memset_pattern.inline

As discussed in the [RFC
thread](https://discourse.llvm.org/t/rfc-introducing-an-llvm-memset-pattern-inline-intrinsic/79496),
the intent is that the intrinsic will be lowered to loops, a sequence of
stores, or libcalls depending on the expected cost and availability of
libcalls on the target. Right now, there's just a single lowering path
that aims to handle all cases. My intent would be to follow up with
additional PRs that add additional optimisations when possible (e.g.
when libcalls are available, when arguments are known to be constant
etc).



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