[PATCH] D139995: [RISCV] Refactor RVV Policy by structure
Piyou Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 14 19:06:09 PST 2022
BeMg added inline comments.
================
Comment at: clang/include/clang/Support/RISCVVIntrinsicUtils.h:105
+ : TU(_TU), TA(_TA), MU(_MU), MA(_MA) {}
+ Policy(bool _TU, bool _TA, bool _MU, bool _MA, bool _IntrinsicWithoutMU)
+ : TU(_TU), TA(_TA), MU(_MU), MA(_MA),
----------------
craig.topper wrote:
> You can unify the two constructors by adding `= false` after `_IntrinsicWithoutMU`
Done
================
Comment at: clang/include/clang/Support/RISCVVIntrinsicUtils.h:133
+ return this->PolicyNone == Other.PolicyNone && this->TU == Other.TU &&
+ this->TA == Other.TA && this->MU == Other.MU && this->MA == Other.MA;
+ }
----------------
craig.topper wrote:
> This is missing `IntrinsicWithoutMU`
Done.
================
Comment at: clang/lib/Sema/SemaRISCVVectorLookup.cpp:211
+ llvm::SmallVector<Policy> SupportedUnMaskedPolicies;
+ SupportedUnMaskedPolicies.push_back(
+ Policy(true, false, false, false)); // TU
----------------
craig.topper wrote:
> Use emplace_back
Done
================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:530
+ llvm::SmallVector<Policy> SupportedUnMaskedPolicies;
+ SupportedUnMaskedPolicies.push_back(
+ Policy(true, false, false, false)); // TU
----------------
craig.topper wrote:
> emplace_back
Done
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139995/new/
https://reviews.llvm.org/D139995
More information about the cfe-commits
mailing list