[llvm] llvm/include/llvm/CodeGenTypes/LowLevelType.h: 2 * pointless copy (#94378) (PR #94412)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 4 16:19:19 PDT 2024
https://github.com/akshaykumars614 created https://github.com/llvm/llvm-project/pull/94412
modified parameter for code quality
>From e210656c68a2a91c6fa4facd0286066b2bc6ee3e Mon Sep 17 00:00:00 2001
From: akshaykumars614 <akshaykumars614 at gmail.com>
Date: Tue, 4 Jun 2024 19:17:26 -0400
Subject: [PATCH] llvm/include/llvm/CodeGenTypes/LowLevelType.h: 2 * pointless
copy (#94378)
modified parameter for code quality
---
llvm/include/llvm/CodeGenTypes/LowLevelType.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/include/llvm/CodeGenTypes/LowLevelType.h b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
index 62ee28cfac99c..c66b98dceae5f 100644
--- a/llvm/include/llvm/CodeGenTypes/LowLevelType.h
+++ b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
@@ -68,7 +68,7 @@ class LLT {
}
/// Get a low-level vector of some number of elements and element type.
- static constexpr LLT vector(ElementCount EC, LLT ScalarTy) {
+ static constexpr LLT vector(ElementCount EC, const LLT &ScalarTy) {
assert(!EC.isScalar() && "invalid number of vector elements");
assert(!ScalarTy.isVector() && "invalid vector element type");
return LLT{ScalarTy.isPointer(),
@@ -121,7 +121,7 @@ class LLT {
return vector(ElementCount::getScalable(MinNumElements), ScalarTy);
}
- static constexpr LLT scalarOrVector(ElementCount EC, LLT ScalarTy) {
+ static constexpr LLT scalarOrVector(ElementCount EC, const LLT &ScalarTy) {
return EC.isScalar() ? ScalarTy : LLT::vector(EC, ScalarTy);
}
More information about the llvm-commits
mailing list