[all-commits] [llvm/llvm-project] 2dbcd7: [CIR] Add x86_64 scalar calling-convention lowerin...

adams381 via All-commits all-commits at lists.llvm.org
Fri Jul 17 15:02:31 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2dbcd7d10f9462bdc30a169730919fc7da321905
      https://github.com/llvm/llvm-project/commit/2dbcd7d10f9462bdc30a169730919fc7da321905
  Author: adams381 <adams at nvidia.com>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M clang/include/clang/CIR/Dialect/IR/CIRTypes.h
    M clang/include/clang/CIR/Dialect/Passes.h
    M clang/include/clang/CIR/Dialect/Passes.td
    M clang/lib/CIR/Dialect/IR/CIRTypes.cpp
    M clang/lib/CIR/Dialect/Transforms/CMakeLists.txt
    M clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
    M clang/lib/CIR/Dialect/Transforms/PassDetail.h
    A clang/test/CIR/Transforms/abi-lowering/x86_64-lang-addrspace-nyi.cir
    A clang/test/CIR/Transforms/abi-lowering/x86_64-scalars.cir
    M clang/unittests/CIR/CMakeLists.txt
    A clang/unittests/CIR/GetFloatingPointTypeTest.cpp

  Log Message:
  -----------
  [CIR] Add x86_64 scalar calling-convention lowering (#209636)

CallConvLowering can already classify a function through the MLIR test
target or through a classification injected as an attribute, but it has
no
path to a real target ABI. This adds a `target=x86_64` mode that runs
the
LLVM ABI Lowering Library's System V x86_64 classifier: it maps CIR
types to
`llvm::abi` types, calls the classifier, and converts the result back
into
the `mlir::abi::FunctionClassification` that `CIRABIRewriteContext`
already
consumes.

To keep the first step small this handles scalar signatures only --
integer
up to 64 bits, pointer, bool, `f32`, and `f64`.  Anything else (records,
arrays, vectors, `_Complex`, wide or uncommon floats, `_BitInt`,
`__int128`,
member pointers) is reported as not-yet-implemented through
`emitOpError`, so
an unsupported signature fails the pass instead of being silently
misclassified. Those types come in stacked follow-ups. The pass is still
only reachable from `cir-opt`; wiring it into the `-fclangir` pipeline
is a
later change.

Assisted-by: Cursor / claude-opus-4.8



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