[all-commits] [llvm/llvm-project] 1e45ea: [CIR] Add support for function linkage and visibil...

Andy Kaylor via All-commits all-commits at lists.llvm.org
Wed Jun 25 10:59:51 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1e45ea12db5e4ce545576270f846aa0bc06c5680
      https://github.com/llvm/llvm-project/commit/1e45ea12db5e4ce545576270f846aa0bc06c5680
  Author: Andy Kaylor <akaylor at nvidia.com>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M clang/include/clang/CIR/Dialect/IR/CIROps.td
    M clang/include/clang/CIR/MissingFeatures.h
    M clang/lib/CIR/CodeGen/CIRGenCXX.cpp
    M clang/lib/CIR/CodeGen/CIRGenModule.cpp
    M clang/lib/CIR/CodeGen/CIRGenModule.h
    M clang/lib/CIR/Dialect/IR/CIRDialect.cpp
    M clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
    M clang/test/CIR/CodeGen/align-load.c
    M clang/test/CIR/CodeGen/align-store.c
    M clang/test/CIR/CodeGen/array.cpp
    M clang/test/CIR/CodeGen/basic.c
    M clang/test/CIR/CodeGen/basic.cpp
    M clang/test/CIR/CodeGen/binassign.c
    M clang/test/CIR/CodeGen/binop.cpp
    M clang/test/CIR/CodeGen/builtin_call.cpp
    M clang/test/CIR/CodeGen/builtin_printf.cpp
    M clang/test/CIR/CodeGen/call.c
    M clang/test/CIR/CodeGen/call.cpp
    M clang/test/CIR/CodeGen/cast.cpp
    M clang/test/CIR/CodeGen/class.cpp
    M clang/test/CIR/CodeGen/cmp.cpp
    M clang/test/CIR/CodeGen/comma.c
    M clang/test/CIR/CodeGen/compound_assign.cpp
    M clang/test/CIR/CodeGen/ctor.cpp
    M clang/test/CIR/CodeGen/dso-local.c
    M clang/test/CIR/CodeGen/forrange.cpp
    M clang/test/CIR/CodeGen/if.cpp
    M clang/test/CIR/CodeGen/inline-cxx-func.cpp
    M clang/test/CIR/CodeGen/int-to-bool.cpp
    M clang/test/CIR/CodeGen/linkage-spec.cpp
    M clang/test/CIR/CodeGen/local-vars.cpp
    M clang/test/CIR/CodeGen/loop.cpp
    M clang/test/CIR/CodeGen/member-functions.cpp
    M clang/test/CIR/CodeGen/namespace.cpp
    M clang/test/CIR/CodeGen/nullptr-init.cpp
    M clang/test/CIR/CodeGen/string-literals.c
    M clang/test/CIR/CodeGen/struct.c
    M clang/test/CIR/CodeGen/struct.cpp
    M clang/test/CIR/CodeGen/switch.cpp
    M clang/test/CIR/CodeGen/switch_flat_op.cpp
    M clang/test/CIR/CodeGen/ternary.cpp
    M clang/test/CIR/CodeGen/typedef.c
    M clang/test/CIR/CodeGen/unary.cpp
    M clang/test/CIR/CodeGen/union.c
    M clang/test/CIR/CodeGenOpenACC/combined-copy.c
    M clang/test/CIR/CodeGenOpenACC/combined.cpp
    M clang/test/CIR/CodeGenOpenACC/compute-copy.c
    M clang/test/CIR/CodeGenOpenACC/data.c
    M clang/test/CIR/CodeGenOpenACC/host_data.c
    M clang/test/CIR/CodeGenOpenACC/init.c
    M clang/test/CIR/CodeGenOpenACC/kernels.c
    M clang/test/CIR/CodeGenOpenACC/loop.cpp
    M clang/test/CIR/CodeGenOpenACC/parallel.c
    M clang/test/CIR/CodeGenOpenACC/serial.c
    M clang/test/CIR/CodeGenOpenACC/set.c
    M clang/test/CIR/CodeGenOpenACC/shutdown.c
    M clang/test/CIR/CodeGenOpenACC/wait.c
    M clang/test/CIR/IR/array.cir
    M clang/test/CIR/IR/binassign.cir
    M clang/test/CIR/IR/call.cir
    M clang/test/CIR/IR/cast.cir
    M clang/test/CIR/IR/cmp.cir
    M clang/test/CIR/IR/func.cir
    M clang/test/CIR/IR/invalid-call.cir
    M clang/test/CIR/IR/ternary.cir
    M clang/test/CIR/IR/unary.cir
    M clang/test/CIR/IR/vector.cir
    M clang/test/CIR/Lowering/array.cpp
    M clang/test/CIR/Transforms/canonicalize.cir
    M clang/test/CIR/Transforms/complex-create-fold.cir
    M clang/test/CIR/Transforms/hoist-allocas.cir
    M clang/test/CIR/Transforms/if.cir
    M clang/test/CIR/Transforms/loop.cir
    M clang/test/CIR/Transforms/scope.cir
    M clang/test/CIR/Transforms/select.cir
    M clang/test/CIR/Transforms/switch.cir
    M clang/test/CIR/Transforms/ternary-fold.cir
    M clang/test/CIR/Transforms/ternary.cir
    M clang/test/CIR/Transforms/vector-cmp-fold.cir
    M clang/test/CIR/Transforms/vector-create-fold.cir
    M clang/test/CIR/Transforms/vector-shuffle-dynamic-fold.cir
    M clang/test/CIR/Transforms/vector-shuffle-fold.cir
    M clang/test/CIR/Transforms/vector-ternary-fold.cir
    A clang/test/CIR/func-linkage.cpp
    M clang/test/CIR/func-simple.cpp
    M clang/test/CIR/mlprint.c

  Log Message:
  -----------
  [CIR] Add support for function linkage and visibility (#145600)

This change adds support for function linkage and visibility and related
attributes. Most of the test changes are generalizations to allow
'dso_local' to be accepted where we aren't specifically testing for it.
Some tests based on CIR inputs have been updated to add 'private' to
function declarations where required by newly supported interfaces.

The dso-local.c test has been updated to add specific tests for
dso_local being set correctly, and a new test, func-linkage.cpp tests
other linkage settings.

This change sets `comdat` correctly in CIR, but it is not yet applied to
functions when lowering to LLVM IR. That will be handled in a later
change.



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