[all-commits] [llvm/llvm-project] 17a58b: [clang][RISCV] Fix ABI handling of empty structs w...
Alex Bradbury via All-commits
all-commits at lists.llvm.org
Mon Jul 24 02:25:20 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 17a58b3ca7ec18585e9ea8ed8b39d72fe36fb6cb
https://github.com/llvm/llvm-project/commit/17a58b3ca7ec18585e9ea8ed8b39d72fe36fb6cb
Author: Alex Bradbury <asb at igalia.com>
Date: 2023-07-24 (Mon, 24 Jul 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/CodeGen/ABIInfoImpl.cpp
M clang/lib/CodeGen/ABIInfoImpl.h
M clang/lib/CodeGen/Targets/RISCV.cpp
M clang/test/CodeGen/RISCV/abi-empty-structs.c
Log Message:
-----------
[clang][RISCV] Fix ABI handling of empty structs with hard FP calling conventions in C++
As reported in <https://github.com/llvm/llvm-project/issues/58929>,
Clang's handling of empty structs in the case of small structs that may
be eligible to be passed using the hard FP calling convention doesn't
match g++. In general, C++ record fields are never empty unless
[[no_unique_address]] is used, but the RISC-V FP ABI overrides this.
After this patch, fields of structs that contain empty records will be
ignored, even in C++, when considering eligibility for the FP calling
convention ('flattening'). See also the relevant psABI issue
<https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/358> which
seeks to clarify the documentation.
Fixes https://github.com/llvm/llvm-project/issues/58929
Differential Revision: https://reviews.llvm.org/D142327
More information about the All-commits
mailing list