[llvm] [SLP] Simplify buildTree() (NFC) (PR #138833)
Gaƫtan Bossu via llvm-commits
llvm-commits at lists.llvm.org
Wed May 7 03:27:21 PDT 2025
gbossu wrote:
> LGTM. Could we consider using a different name for `ScalarsVectorizationLegality`? The abbreviation `SVL` might be misleading, as it sounds related to `ArrayRef<Value *> VL`, even though it isn't. This could cause confusion for users.
I chose the names to be similar to the `LoopVectorizer`, where `LoopVectorizationLegality` is often abbreviated as `LVL`. But I agree it be misleading.
Do you have any suggestion to remove the ambiguity? Maybe I could just name the variable `Legality`, i.e.
```
ScalarsVectorizationLegality Legality =
getScalarsVectorizationLegality(VL, Depth, UserTreeIdx);
const InstructionsState &S = SVL.getInstructionsState();
if (!Legality.isLegal()) {
...
}
```
https://github.com/llvm/llvm-project/pull/138833
More information about the llvm-commits
mailing list