[llvm] [SLP] NFC. Use Value instead of template. (PR #115440)
Han-Kuan Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 11 18:12:45 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) {
----------------
HanKuanChen wrote:
I think it cannot analyze in compilation phase.
We pass `Value *` for the most of `getValueType` usage.
Only here is `Instruction *`
```
for (Instruction *V : CmpInsts)
if (!R.isDeleted(V) && isValidElementType(getValueType(V)))
Vals.push_back(V);
```
https://github.com/llvm/llvm-project/pull/115440
More information about the llvm-commits
mailing list