[all-commits] [llvm/llvm-project] 6e25b1: [CIR] Correctly pass func self-comdat & alignment ...
Erich Keane via All-commits
all-commits at lists.llvm.org
Fri Sep 18 08:13:24 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6e25b1ca84812cffd3e373e91a619272d3d2a324
https://github.com/llvm/llvm-project/commit/6e25b1ca84812cffd3e373e91a619272d3d2a324
Author: Erich Keane <ekeane at nvidia.com>
Date: 2026-09-18 (Fri, 18 Sep 2026)
Changed paths:
M clang/include/clang/CIR/Dialect/IR/CIROps.td
M clang/include/clang/CIR/MissingFeatures.h
M clang/lib/CIR/CodeGen/CIRGenModule.cpp
M clang/lib/CIR/Dialect/IR/CIRDialect.cpp
M clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
M clang/test/CIR/CodeGen/array-init-loop-exprs.cpp
M clang/test/CIR/CodeGen/cxx-conversion-operators.cpp
A clang/test/CIR/CodeGen/func-member-attrs.cpp
M clang/test/CIR/CodeGen/global-tls-dyn-init.cpp
M clang/test/CIR/CodeGen/global-tls-simple-init.cpp
M clang/test/CIR/CodeGen/global-tls-templates.cpp
M clang/test/CIR/CodeGen/inherited-ctors.cpp
M clang/test/CIR/CodeGen/lambda-generic-in-cxx11abi-lambda.cpp
M clang/test/CIR/CodeGen/lambda-static-invoker-agg-return.cpp
M clang/test/CIR/CodeGen/lambda-static-invoker.cpp
M clang/test/CIR/CodeGen/lambda.cpp
M clang/test/CIR/CodeGen/static-local.cpp
M clang/test/CIR/CodeGen/vtable-emission.cpp
M clang/test/CIR/CodeGen/vtable-thunk-undefined-callee.cpp
M clang/test/CIR/IR/func.cir
M clang/test/CIR/IR/invalid-func.cir
M clang/test/CIR/func-linkage.cpp
Log Message:
-----------
[CIR] Correctly pass func self-comdat & alignment (#223773)
Classic codegen does these, and it is important for when these end up
being stored as function pointers, as we discovered on a benchmark.
This patch does 2 things:
1- Properly passes the 'self' 'comdat' feature (that is, when the symbol
reference is 'self', not when it is a different name, which isn't
implemented anywhere). This mirrors what was done for GlobalOp.
2- Properly calculate and pass the 'alignment'/'preferred alignment' for
a function. Only the 'alignment' is passed to LLVM-IR, as the dialect
doesn't support preferred alignment, so a 'missing feature' is left in
place. That functionality isn't important to this patch, but was 'next
to' the alignment work in CodeGenModule.cpp, so it seemed like something
we should handle if at all possible.
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