[llvm] [SLP] NFC. Use Value instead of template. (PR #115440)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 02:40:58 PST 2024


================
@@ -239,7 +239,7 @@ static bool isValidElementType(Type *Ty) {
 /// returns the type of its value operand, for Cmp - the types of the compare
 /// operands and for insertelement - the type os the inserted operand.
 /// Otherwise, just the type of the value is returned.
-template <typename T> static Type *getValueType(T *V) {
+static Type *getValueType(Value *V) {
----------------
alexey-bataev wrote:

Better to keep it as is, it may help to optimize the code better (compile-time dispatching instead of runtime dispatching)

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


More information about the llvm-commits mailing list