[PATCH] D141767: [WIP][10/N][Clang][RISCV][NFC] Don't need to check for `MaskPolicy` in `isTAPolicy` and `isTUPolicy`

Yueh-Ting (eop) Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 14 07:56:38 PST 2023


eopXD 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, sabuasal, simoncook, johnrusso, rbar, asb, arichardson.
Herald added a project: All.
eopXD requested review of this revision.
Herald added subscribers: cfe-commits, pcwang-thead, MaskRay.
Herald added a project: clang.

Caller of the two utilities is always companied with a predicate to
check for `!IsMask`, so we don't need to check for the mask policy
here.

This also removes dependency to `Policy::PolicyType::Omit`, which will
be removed.

Depends on D141764 <https://reviews.llvm.org/D141764>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141767

Files:
  clang/include/clang/Support/RISCVVIntrinsicUtils.h


Index: clang/include/clang/Support/RISCVVIntrinsicUtils.h
===================================================================
--- clang/include/clang/Support/RISCVVIntrinsicUtils.h
+++ clang/include/clang/Support/RISCVVIntrinsicUtils.h
@@ -122,11 +122,11 @@
   }
 
   bool isTAPolicy() const {
-    return TailPolicy == Agnostic && MaskPolicy == Omit;
+    return TailPolicy == Agnostic;
   }
 
   bool isTUPolicy() const {
-    return TailPolicy == Undisturbed && MaskPolicy == Omit;
+    return TailPolicy == Undisturbed;
   }
 
   bool isMAPolicy() const {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141767.489256.patch
Type: text/x-patch
Size: 560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230114/1eea3767/attachment.bin>


More information about the cfe-commits mailing list