[all-commits] [llvm/llvm-project] 8cf99c: [CIR] Implement lowering for 'no-builtins' attribu...

Erich Keane via All-commits all-commits at lists.llvm.org
Mon Feb 2 07:05:17 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8cf99c263ef9099e58c7143de3c611190cb556ed
      https://github.com/llvm/llvm-project/commit/8cf99c263ef9099e58c7143de3c611190cb556ed
  Author: Erich Keane <ekeane at nvidia.com>
  Date:   2026-02-02 (Mon, 02 Feb 2026)

  Changed paths:
    M clang/include/clang/CIR/Dialect/IR/CIRDialect.td
    M clang/lib/CIR/CodeGen/CIRGenCall.cpp
    A clang/test/CIR/CodeGen/no-builtin-attr.cpp
    M clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceIntrin.c
    M clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceMinMaxIntrin.c
    M clang/test/CIR/CodeGenBuiltins/X86/avx512fp16-builtins.c
    M clang/test/CIR/CodeGenBuiltins/X86/avx512vlbf16-builtins.c
    M clang/test/CIR/CodeGenBuiltins/X86/avx512vlfp16-builtins.c
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
    M mlir/lib/Target/LLVMIR/ModuleImport.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Dialect/LLVMIR/func.mlir
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir
    M mlir/test/Target/LLVMIR/Import/function-attributes.ll
    M mlir/test/Target/LLVMIR/Import/instructions.ll
    M mlir/test/Target/LLVMIR/llvmir.mlir

  Log Message:
  -----------
  [CIR] Implement lowering for 'no-builtins' attributes (#178899)

This patch adds the 'no-builtins' and 'no-builtin-XXX' attributes from
LLVM-IR to both LLVMIR-MLIR and Clang lowering. However, I've done a
slightly different implementation of them.

LLVM-IR represents them as 'no-builtins' and 'no-builtin-NAME', where
the latter can be multiple names. This is problematic for the MLIR for a
variety of reasons, most particularly is our preference for explicit
attribute (of which the latter is an infinite list). Additionally of
course, our inability to have dashes in attribute names is troublesome.

Therefore, I've lowered them instead as `nobuiltins` for both, which is
an array attribute.

IF the array attribute is empty, it is intended to mean 'all functions'
(ie, the same as `no-builtins`), else it is a list of StringAttrs that
contain the variants of `NAME`.

I considered using nobuiltins=['*'] for the 'all functions', but that
seemed like a differentiation without purpose.



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