[all-commits] [llvm/llvm-project] 07b5df: [clang] Integrate LLVMABI for function call ABI l...
Narayan via All-commits
all-commits at lists.llvm.org
Thu May 7 03:58:33 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 07b5dfe9473c6f864027855b68fa5775d0adf2d9
https://github.com/llvm/llvm-project/commit/07b5dfe9473c6f864027855b68fa5775d0adf2d9
Author: Narayan <nsreekumar6 at gmail.com>
Date: 2026-05-07 (Thu, 07 May 2026)
Changed paths:
M clang/include/clang/Basic/CodeGenOptions.def
M clang/include/clang/Options/Options.td
M clang/lib/CodeGen/CGCall.cpp
M clang/lib/CodeGen/CMakeLists.txt
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/lib/CodeGen/CodeGenModule.h
M clang/lib/CodeGen/QualTypeMapper.h
M clang/test/CodeGen/bpf-abiinfo.c
M clang/test/CodeGen/bpf-struct-argument.c
M clang/test/CodeGen/bpf-union-argument.c
A llvm/include/llvm/ABI/IRTypeMapper.h
M llvm/lib/ABI/CMakeLists.txt
A llvm/lib/ABI/IRTypeMapper.cpp
Log Message:
-----------
[clang] Integrate LLVMABI for function call ABI lowering (#194460)
This PR wires the LLVM ABI library (prototyped in
https://github.com/llvm/llvm-project/pull/140112) into Clang's function
call ABI lowering pipeline, behind a new `-fexperimental-abi-lowering`
cc1 flag.
When the flag is enabled and the active target has an LLVMABI
implementation, `CodeGenTypes::arrangeLLVMFunctionInfo` constructs an
`llvm::abi::FunctionInfo` from the call's argument and result types
(using QualTypeMapper(https://github.com/llvm/llvm-project/pull/174634)
to translate Clang QualTypes into ABI types).
Asks the target's `llvm::abi::TargetInfo` to classify it, and then
translates each `llvm::abi::ArgInfo` back into the ABIArgInfo consumed
by the rest of CodeGen. The translation is handled by a new
`convertABIArgInfo` helper covering the Direct, Extend, Indirect, and
Ignore kinds, with coerce-to types lifted back into LLVM IR via a new
IRTypeMapper.
The integration is intentionally narrow and existing code paths are
untouched. `CodeGenModule::shouldUseLLVMABILowering` only opts in for
targets explicitly wired to the new library(currently only BPF).
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