[PATCH] D141574: [2/15][Clang][RISCV][NFC] Rename Policy::IsPolicyNone to IsUnspecifed
Yueh-Ting (eop) Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 24 00:05:50 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG74252fb115b4: [2/15][Clang][RISCV][NFC] Rename Policy::IsPolicyNone to IsUnspecifed (authored by eopXD).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141574/new/
https://reviews.llvm.org/D141574
Files:
clang/include/clang/Support/RISCVVIntrinsicUtils.h
clang/lib/Support/RISCVVIntrinsicUtils.cpp
Index: clang/lib/Support/RISCVVIntrinsicUtils.cpp
===================================================================
--- clang/lib/Support/RISCVVIntrinsicUtils.cpp
+++ clang/lib/Support/RISCVVIntrinsicUtils.cpp
@@ -917,9 +917,9 @@
// Update PolicyAttrs if need (TA or TAMA) for compute builtin types.
if (PolicyAttrs.isMAPolicy())
PolicyAttrs.TailPolicy = Policy::PolicyType::Agnostic; // TAMA
- if (PolicyAttrs.isPolicyNonePolicy()) {
+ if (PolicyAttrs.isUnspecified()) {
if (!IsMasked) {
- PolicyAttrs.PolicyNone = false;
+ PolicyAttrs.IsUnspecified = false;
PolicyAttrs.TailPolicy = Policy::PolicyType::Agnostic; // TA
}
}
@@ -1016,8 +1016,8 @@
OverloadedName += suffix;
};
- if (PolicyAttrs.isPolicyNonePolicy()) {
- PolicyAttrs.PolicyNone = false;
+ if (PolicyAttrs.isUnspecified()) {
+ PolicyAttrs.IsUnspecified = false;
if (IsMasked) {
Name += "_m";
// FIXME: Currently _m default policy implementation is different with
Index: clang/include/clang/Support/RISCVVIntrinsicUtils.h
===================================================================
--- clang/include/clang/Support/RISCVVIntrinsicUtils.h
+++ clang/include/clang/Support/RISCVVIntrinsicUtils.h
@@ -93,7 +93,7 @@
};
struct Policy {
- bool PolicyNone = false;
+ bool IsUnspecified = false;
enum PolicyType {
Undisturbed,
Agnostic,
@@ -102,7 +102,7 @@
PolicyType TailPolicy = Omit;
PolicyType MaskPolicy = Omit;
bool IntrinsicWithoutMU = false;
- Policy() : PolicyNone(true) {}
+ Policy() : IsUnspecified(true) {}
Policy(PolicyType _TailPolicy, PolicyType _MaskPolicy,
bool _IntrinsicWithoutMU = false)
: TailPolicy(_TailPolicy), MaskPolicy(_MaskPolicy),
@@ -150,11 +150,11 @@
return MaskPolicy == Undisturbed && TailPolicy == Omit;
}
- bool isPolicyNonePolicy() const { return PolicyNone; }
+ bool isUnspecified() const { return IsUnspecified; }
bool operator==(const Policy &Other) const {
- return PolicyNone == Other.PolicyNone && TailPolicy == Other.TailPolicy &&
- MaskPolicy == Other.MaskPolicy &&
+ return IsUnspecified == Other.IsUnspecified &&
+ TailPolicy == Other.TailPolicy && MaskPolicy == Other.MaskPolicy &&
IntrinsicWithoutMU == Other.IntrinsicWithoutMU;
}
@@ -431,7 +431,7 @@
return IntrinsicTypes;
}
Policy getPolicyAttrs() const {
- assert(PolicyAttrs.PolicyNone == false);
+ assert(PolicyAttrs.IsUnspecified == false);
return PolicyAttrs;
}
unsigned getPolicyAttrsBits() const {
@@ -441,7 +441,7 @@
// constexpr unsigned TAIL_AGNOSTIC_MASK_AGNOSTIC = 3;
// FIXME: how about value 2
// int PolicyAttrs = TAIL_UNDISTURBED;
- assert(PolicyAttrs.PolicyNone == false);
+ assert(PolicyAttrs.IsUnspecified == false);
if (PolicyAttrs.isTUMAPolicy())
return 2;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141574.491623.patch
Type: text/x-patch
Size: 2894 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230124/8e7d142f/attachment.bin>
More information about the cfe-commits
mailing list