[llvm] [NVPTX] Improve copy avoidance during lowering. (PR #106423)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 10:46:57 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 1bde8e0b80860743fcd55da28f0ba9acb7a26a9c a8835f7c339c4f973eba977361dac54e405f1d9f --extensions cpp,h -- llvm/include/llvm/Analysis/PtrUseVisitor.h llvm/lib/Analysis/PtrUseVisitor.cpp llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp llvm/lib/Target/NVPTX/NVPTXSubtarget.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Analysis/PtrUseVisitor.h b/llvm/include/llvm/Analysis/PtrUseVisitor.h
index 539d302bb7..7ae03b4a77 100644
--- a/llvm/include/llvm/Analysis/PtrUseVisitor.h
+++ b/llvm/include/llvm/Analysis/PtrUseVisitor.h
@@ -208,7 +208,7 @@ public:
/// Recursively visit the uses of the given pointer.
/// \returns An info struct about the pointer. See \c PtrInfo for details.
- /// We may also need to process Argument pointers, so the input uses is
+ /// We may also need to process Argument pointers, so the input uses is
/// a common Value type.
PtrInfo visitPtr(Value &I) {
// This must be a pointer type. Get an integer type suitable to hold
diff --git a/llvm/lib/Target/NVPTX/NVPTXSubtarget.h b/llvm/lib/Target/NVPTX/NVPTXSubtarget.h
index 38b5ee63f4..ed5d120902 100644
--- a/llvm/lib/Target/NVPTX/NVPTXSubtarget.h
+++ b/llvm/lib/Target/NVPTX/NVPTXSubtarget.h
@@ -93,9 +93,7 @@ public:
bool hasDotInstructions() const {
return SmVersion >= 61 && PTXVersion >= 50;
}
- bool hasCvtaParam() const {
- return SmVersion >= 70 && PTXVersion >= 77;
- }
+ bool hasCvtaParam() const { return SmVersion >= 70 && PTXVersion >= 77; }
unsigned int getFullSmVersion() const { return FullSmVersion; }
unsigned int getSmVersion() const { return getFullSmVersion() / 10; }
// GPUs with "a" suffix have include architecture-accelerated features that
``````````
</details>
https://github.com/llvm/llvm-project/pull/106423
More information about the llvm-commits
mailing list