[PATCH] D141573: [1/15][Clang][RISCV][NFC] Extract common utility to RISCVVIntrinsicUtils

Yueh-Ting (eop) Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 18 02:46:41 PST 2023


eopXD added inline comments.


================
Comment at: clang/lib/Support/RISCVVIntrinsicUtils.cpp:977
 
+llvm::SmallVector<Policy> RVVIntrinsic::getSupportedUnMaskedPolicies() {
+  return {
----------------
craig.topper wrote:
> Possible improvement for a different patch:
> 
> Could these policy lists be static const arrays and this function could returned an ArrayRef pointing to the appropriate list instead constructing a SmallVector?
Yes. I will use a flyweight pattern to simplify things here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141573/new/

https://reviews.llvm.org/D141573



More information about the cfe-commits mailing list