[clang] Run ObjCContractPass in Distributed Thin-LTO Pipeline (PR #92331)

2024-05-16 Thread Nuri Amari via cfe-commits
@@ -0,0 +1,19 @@ +; RUN: opt -thinlto-bc -o %t.o %s + +; RUN: llvm-lto2 run -thinlto-distributed-indexes %t.o \ +; RUN: -o %t2.index \ +; RUN: -r=%t.o,_use_arc,px + +; RUN: %clang_cc1 -triple x86_64-apple-darwin \ +; RUN: -emit-obj -fthinlto-index=%t.o.thinlto.bc \ +; RUN:

[clang] Run ObjCContractPass in Distributed Thin-LTO Pipeline (PR #92331)

2024-05-16 Thread Nuri Amari via cfe-commits
NuriAmari wrote: > Shouldn't this be added to the LTO code generator? In `libLTO` (used by > Apple's linker) it is added here `llvm/lib/LTO/ThinLTOCodeGenerator.cpp` Presumably because the pass is likely not useful unless targeting MachO, LLD does this via configuration hook:

[clang] Run ObjCContractPass in Distributed Thin-LTO Pipeline (PR #92331)

2024-05-16 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com approved this pull request. I think `ObjCARCContractPass` is ideally suited for MachO rather than ELF. There might be a consideration to add it conditionally, however, this could be excessive. Like the (full)LTO pass --

[clang] Run ObjCContractPass in Distributed Thin-LTO Pipeline (PR #92331)

2024-05-16 Thread Florian Hahn via cfe-commits
fhahn wrote: Shouldn't this be added to the LTO code generator? In `libLTO` (used by Apple's linker) it is added here `llvm/lib/LTO/ThinLTOCodeGenerator.cpp` https://github.com/llvm/llvm-project/pull/92331 ___ cfe-commits mailing list

[clang] Run ObjCContractPass in Distributed Thin-LTO Pipeline (PR #92331)

2024-05-16 Thread Nuri Amari via cfe-commits
https://github.com/NuriAmari edited https://github.com/llvm/llvm-project/pull/92331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Run ObjCContractPass in Distributed Thin-LTO Pipeline (PR #92331)

2024-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nuri Amari (NuriAmari) Changes Prior to this patch, when using -fthinlto-index= the ObjCARCContractPass isn't run prior to CodeGen, and instruction selection fails on IR containing arc intrinsics. The pass would normally be added here:

[clang] Run ObjCContractPass in Distributed Thin-LTO Pipeline (PR #92331)

2024-05-16 Thread Nuri Amari via cfe-commits
https://github.com/NuriAmari ready_for_review https://github.com/llvm/llvm-project/pull/92331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Run ObjCContractPass in Distributed Thin-LTO Pipeline (PR #92331)

2024-05-15 Thread Nuri Amari via cfe-commits
https://github.com/NuriAmari edited https://github.com/llvm/llvm-project/pull/92331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Run ObjCContractPass in Distributed Thin-LTO Pipeline (PR #92331)

2024-05-15 Thread Nuri Amari via cfe-commits
https://github.com/NuriAmari created https://github.com/llvm/llvm-project/pull/92331 Prior to this patch, when using -fthinlto-index= the ObjCARCContractPass isn't run prior to CodeGen, and instruction selection fails on IR containing arc intrinstics. The pass would normally be added here: