[all-commits] [llvm/llvm-project] 65a421: [IR] Make @llvm.memset prototype byte width dependent

Sergei Barannikov via All-commits all-commits at lists.llvm.org
Tue Feb 4 06:00:44 PST 2025


  Branch: refs/heads/users/s-barannikov/byte/2-memset-intrinsic
  Home:   https://github.com/llvm/llvm-project
  Commit: 65a421f56e7e7bb9a72d0b5cc70f8cc7b4348c9b
      https://github.com/llvm/llvm-project/commit/65a421f56e7e7bb9a72d0b5cc70f8cc7b4348c9b
  Author: Sergei Barannikov <barannikov88 at gmail.com>
  Date:   2025-02-04 (Tue, 04 Feb 2025)

  Changed paths:
    M llvm/include/llvm-c/Core.h
    M llvm/include/llvm/IR/Intrinsics.h
    M llvm/include/llvm/IR/Intrinsics.td
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/IR/Core.cpp
    M llvm/lib/IR/IRBuilder.cpp
    M llvm/lib/IR/Intrinsics.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/lib/Transforms/IPO/ExpandVariadics.cpp
    M llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp
    M mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp

  Log Message:
  -----------
  [IR] Make @llvm.memset prototype byte width dependent

This patch changes the type of the value argument of @llvm.memset and
similar intrinsics from i8 to iN, where N is the byte width specified
in data layout string.
Note that the argument still has fixed type (not overloaded), but type
checker will complain if the type does not match the byte width.

Ideally, the type of the argument would be dependent on the address
space of the pointer argument. It is easy to do this (and I did it
downstream as a PoC), but since data layout string doesn't currently
allow different byte widths for different address spaces, I refrained
from doing it now.



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