Author: Konstantinos Parasyris Date: 2026-10-21T00:09:53Z New Revision: 89989e72f2673fb3e307f8cee6712e789917fed5
URL: https://github.com/llvm/llvm-project/commit/89989e72f2673fb3e307f8cee6712e789917fed5 DIFF: https://github.com/llvm/llvm-project/commit/89989e72f2673fb3e307f8cee6712e789917fed5.diff LOG: [clang][SPIR-V][NFC] Remove dead argument classification loop (#233605) I basically delete this part: ```cpp for (auto &&[ArgumentsCount, I] : llvm::enumerate(FI.arguments())) I.info = ArgumentsCount < FI.getNumRequiredArgs() ? classifyArgumentType(I.type) : ABIArgInfo::getDirect(); ``` Cause on SPIR-V it is followed by the kernel/non-kernel loop, which unconditionally reassigns `I.info` for every argument, so the results of the first loop are never observed. Added: Modified: clang/lib/CodeGen/Targets/SPIR.cpp Removed: ################################################################################ diff --git a/clang/lib/CodeGen/Targets/SPIR.cpp b/clang/lib/CodeGen/Targets/SPIR.cpp index 19936d44208dd..75dfb14ace7a8 100644 --- a/clang/lib/CodeGen/Targets/SPIR.cpp +++ b/clang/lib/CodeGen/Targets/SPIR.cpp @@ -186,11 +186,6 @@ void SPIRVABIInfo::computeInfo(CGFunctionInfo &FI) const { // arguments handling. llvm::CallingConv::ID CC = FI.getCallingConvention(); - for (auto &&[ArgumentsCount, I] : llvm::enumerate(FI.arguments())) - I.info = ArgumentsCount < FI.getNumRequiredArgs() - ? classifyArgumentType(I.type) - : ABIArgInfo::getDirect(); - if (!getCXXABI().classifyReturnType(FI)) FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
