[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-18 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng accepted this revision. kito-cheng added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139995/new/ https://reviews.llvm.org/D139995 ___

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-20 Thread Piyou Chen via Phabricator via cfe-commits
BeMg updated this revision to Diff 484180. BeMg added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139995/new/ https://reviews.llvm.org/D139995 Files: clang/include/clang/Support/RISCVVIntrinsicUtils.h clang/lib/Sema/SemaRIS

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-20 Thread Piyou Chen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0d4c6506100b: [RISCV] Refactor RVV Policy by structure (authored by BeMg). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-13 Thread Piyou Chen via Phabricator via cfe-commits
BeMg created this revision. Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabu

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper 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), -

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-14 Thread Piyou Chen via Phabricator via cfe-commits
BeMg updated this revision to Diff 483068. BeMg added a comment. 1. Update policy constructor 2. use emplace_back 3. Fix miss WithoutIntrinsicMU in policy equal check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139995/new/ https://reviews.llvm.or

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-14 Thread Piyou Chen via Phabricator via cfe-commits
BeMg added inline comments. Comment at: clang/include/clang/Support/RISCVVIntrinsicUtils.h:140 +// Just for maintain the old order for quick test. +return std::tie(this->MU, this->MA, this->TA, this->TU) < + std::tie(Other.MU, Other.MA, Other.TA, Other.TU);

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-14 Thread Piyou Chen via Phabricator via cfe-commits
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),

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/include/clang/Support/RISCVVIntrinsicUtils.h:141 +// Just for maintain the old order for quick test. +return std::tie(this->MU, this->MA, this->TA, this->TU) < + std::tie(Other.MU, Other.MA, Other.TA, Other.T

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/include/clang/Support/RISCVVIntrinsicUtils.h:131 + bool operator==(const Policy &Other) const { +return this->PolicyNone == Other.PolicyNone && this->TU == Other.TU && + this->TA == Other.TA && this->MU == Other

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-15 Thread Piyou Chen via Phabricator via cfe-commits
BeMg updated this revision to Diff 483414. BeMg added a comment. 1. Remove this-> 2. Remove Policy() in struct declarationx Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139995/new/ https://reviews.llvm.org/D139995 Files: clang/include/clang/Sup

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-16 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added inline comments. Comment at: clang/include/clang/Support/RISCVVIntrinsicUtils.h:100 + bool MU = false; + bool MA = false; + bool IntrinsicWithoutMU = false; Maybe use enum value for tail/mask policy? *U and *A are mutually exclusive, so I fee

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-16 Thread Piyou Chen via Phabricator via cfe-commits
BeMg updated this revision to Diff 483707. BeMg added a comment. 1. Use Undisturbed, Agnostic and Omit to represent Tail and Mask 2. Replace getDefaultPolicyBits != 0 with !RVVI->isTUPolicy() && !RVVI->isTUMUPolicy() 3. Use llvm_unreachable Repository: rG LLVM Github Monorepo CHANGES SINCE L