[PATCH] D73286: [llvm][VectorUtils] Tweak VFShape for scalable vector functions.
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 10:00:36 PST 2020
andwar added a comment.
A few nits. Also, in the commit msg:
- `patche` -> `patch`
- `which always set a positive value` -> `which is always set to a positive value`?
- `mame` ?
Maybe it would be good to add negative tests too? E.g. for when the module is missing.
================
Comment at: llvm/lib/Analysis/VFABIDemangling.cpp:303
+ Container VecTys;
+ auto RetTy = dyn_cast<VectorType>(Signature->getReturnType());
+ if (RetTy)
----------------
Why not `if (auto RetTy = dyn_cast<VectorType>(Signature->getReturnType()))`
================
Comment at: llvm/lib/Analysis/VFABIDemangling.cpp:332
+ auto RetTy = dyn_cast<VectorType>(Signature->getReturnType());
+ if (RetTy)
+ return RetTy->getElementCount();
----------------
Why not `if (auto RetTy = dyn_cast<VectorType>(Signature->getReturnType())`?
================
Comment at: llvm/lib/Analysis/VFABIDemangling.cpp:340
+
+ return {1 /*Min*/, false /*Scalable*/};
+}
----------------
As per https://llvm.org/docs/CodingStandards.html#comment-formatting:
`return {1 /*Min*/, false /*Scalable*/};` --> `return {/*Min=*/1, /*Scalable=*/false};`
================
Comment at: llvm/tools/vfabi-demangle-fuzzer/vfabi-demangler-fuzzer.cpp:19
const StringRef MangledName((const char *)Data, Size);
- const auto Info = VFABI::tryDemangleForVFABI(MangledName);
+ const auto Info = VFABI::tryDemangleForVFABI(MangledName, nullptr /*M*/);
----------------
As per https://llvm.org/docs/CodingStandards.html#comment-formatting:
`nullptr /*M*/` --> `/*M=*/nullptr`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73286/new/
https://reviews.llvm.org/D73286
More information about the llvm-commits
mailing list