[llvm] [SPIRV] Add type inference of function parameters by call instances (PR #85077)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 06:48:12 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 0a443f13b49b3f392461a0bb60b0146cfc4607c7 5b064779c3b8ac60faf7791ecdec1d54baa1a3b1 -- llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp llvm/lib/Target/SPIRV/SPIRVUtils.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
index e9099fac1c..486da698f9 100644
--- a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
@@ -825,7 +825,8 @@ void SPIRVEmitIntrinsics::processParamTypes(Function *F, IRBuilder<> &B) {
         continue;
       // maybe we already know the operand's element type
       auto DeducedIt = DeducedElTys.find(OpArg);
-      Type *ElemTy = DeducedIt == DeducedElTys.end() ? nullptr : DeducedIt->second;
+      Type *ElemTy =
+          DeducedIt == DeducedElTys.end() ? nullptr : DeducedIt->second;
       if (!ElemTy) {
         for (User *OpU : OpArg->users()) {
           if (Instruction *Inst = dyn_cast<Instruction>(OpU)) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/85077


More information about the llvm-commits mailing list