[llvm] [NVPTX] Improve device function byval parameter lowering (PR #129188)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 27 21:31:04 PST 2025


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 9f28621fae33ecaab2c99af66303d40830182c25 e880f61eb8678b63edf2fd281dd104b7e981bb67 --extensions cpp,h -- llvm/lib/Target/NVPTX/NVPTXForwardParams.cpp llvm/lib/Target/NVPTX/NVPTX.h llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp b/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
index 6cef245e2d..5161a682fb 100644
--- a/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
@@ -639,8 +639,7 @@ static void markPointerAsAS(Value *Ptr, const unsigned AS) {
   }
 
   Instruction *PtrInGlobal = new AddrSpaceCastInst(
-      Ptr, PointerType::get(Ptr->getContext(), AS),
-      Ptr->getName(), InsertPt);
+      Ptr, PointerType::get(Ptr->getContext(), AS), Ptr->getName(), InsertPt);
   Value *PtrInGeneric = new AddrSpaceCastInst(PtrInGlobal, Ptr->getType(),
                                               Ptr->getName(), InsertPt);
   // Replace with PtrInGeneric all uses of Ptr except PtrInGlobal.

``````````

</details>


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


More information about the llvm-commits mailing list