[clang] 6b28229 - [7/7][Clang][RISCV][NFC] Remove attribute `IsPrototypeDefaultTU`
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 23 23:57:09 PST 2023
Author: eopXD
Date: 2023-01-23T23:57:04-08:00
New Revision: 6b28229412dc9760b3fab33763f3347761876227
URL: https://github.com/llvm/llvm-project/commit/6b28229412dc9760b3fab33763f3347761876227
DIFF: https://github.com/llvm/llvm-project/commit/6b28229412dc9760b3fab33763f3347761876227.diff
LOG: [7/7][Clang][RISCV][NFC] Remove attribute `IsPrototypeDefaultTU`
This is the 7th commit of a patch-set that aims to remove the
IsPrototypeDefaultTU special case for the rvv-intrinsics.
This is the final commit of the patch-set. Now that no intrinsics is
using the attribute, we are safe to remove it.
Please refer to the cover letter in the 1st commit (D140895) for an
overview.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D140954
Added:
Modified:
clang/include/clang/Basic/riscv_vector.td
clang/include/clang/Support/RISCVVIntrinsicUtils.h
clang/lib/Sema/SemaRISCVVectorLookup.cpp
clang/lib/Support/RISCVVIntrinsicUtils.cpp
clang/utils/TableGen/RISCVVEmitter.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/riscv_vector.td b/clang/include/clang/Basic/riscv_vector.td
index 6c6515b2f245c..b72eee6ccd18e 100644
--- a/clang/include/clang/Basic/riscv_vector.td
+++ b/clang/include/clang/Basic/riscv_vector.td
@@ -201,10 +201,6 @@ class RVVBuiltin<string suffix, string prototype, string type_range,
// This builtin support mask agnostic and undisturbed policy.
bit HasMaskPolicy = true;
- // This builtin prototype is tail undisturbed policy. It also means the
- // default polcy without suffix is tail undisturbed.
- bit IsPrototypeDefaultTU = false;
-
// This builtin prototype with TA or TAMA policy could not support overloading
// API. Other policy intrinsic functions would support overloading API with
// suffix `_tu`, `tumu`, `tuma`, `tamu` and `tama`.
@@ -458,8 +454,7 @@ class RVVMaskOp0Builtin<string prototype> : RVVOp0Builtin<"m", prototype, "c"> {
}
let UnMaskedPolicyScheme = HasPolicyOperand,
- HasMaskedOffOperand = false,
- IsPrototypeDefaultTU = false in {
+ HasMaskedOffOperand = false in {
multiclass RVVSlideUpBuiltinSet {
defm "" : RVVOutBuiltinSet<NAME, "csilxfd",
[["vx","v", "vvvz"]]>;
@@ -469,7 +464,6 @@ let UnMaskedPolicyScheme = HasPolicyOperand,
}
let UnMaskedPolicyScheme = HasPassthruOperand,
- IsPrototypeDefaultTU = false,
ManualCodegen = [{
if (IsMasked) {
std::rotate(Ops.begin(), Ops.begin() + 1, Ops.end() - 1);
@@ -1877,8 +1871,7 @@ defm vwmulsu : RVVOutOp0Op1BuiltinSet<"vwmulsu", "csi",
}
// 12.13. Vector Single-Width Integer Multiply-Add Instructions
-let UnMaskedPolicyScheme = HasPolicyOperand,
- IsPrototypeDefaultTU = false in {
+let UnMaskedPolicyScheme = HasPolicyOperand in {
defm vmacc : RVVIntTerBuiltinSet;
defm vnmsac : RVVIntTerBuiltinSet;
defm vmadd : RVVIntTerBuiltinSet;
@@ -1989,8 +1982,7 @@ let Log2LMUL = [-2, -1, 0, 1, 2] in {
}
// 14.6. Vector Single-Width Floating-Point Fused Multiply-Add Instructions
-let UnMaskedPolicyScheme = HasPolicyOperand,
- IsPrototypeDefaultTU = false in {
+let UnMaskedPolicyScheme = HasPolicyOperand in {
defm vfmacc : RVVFloatingTerBuiltinSet;
defm vfnmacc : RVVFloatingTerBuiltinSet;
defm vfmsac : RVVFloatingTerBuiltinSet;
@@ -2107,7 +2099,6 @@ let Log2LMUL = [-3, -2, -1, 0, 1, 2] in {
// 15.1. Vector Single-Width Integer Reduction Instructions
let UnMaskedPolicyScheme = HasPassthruOperand,
MaskedPolicyScheme = HasPassthruOperand,
- IsPrototypeDefaultTU = false,
HasMaskPolicy = false in {
defm vredsum : RVVIntReductionBuiltinSet;
defm vredmaxu : RVVUnsignedReductionBuiltin;
@@ -2190,7 +2181,7 @@ let HasMasked = false, MaskedPolicyScheme = NonePolicy in {
defm vmv_x : RVVOp0BuiltinSet<"vmv_x_s", "csil",
[["s", "ve", "ev"],
["s", "UvUe", "UeUv"]]>;
- let OverloadedName = "vmv_s", IsPrototypeDefaultTU = false,
+ let OverloadedName = "vmv_s",
UnMaskedPolicyScheme = HasPassthruOperand,
SupportOverloading = false in
defm vmv_s : RVVOutBuiltinSet<"vmv_s_x", "csil",
@@ -2203,7 +2194,7 @@ let HasMasked = false, MaskedPolicyScheme = NonePolicy in {
let HasVL = false, OverloadedName = "vfmv_f" in
defm vfmv_f : RVVOp0BuiltinSet<"vfmv_f_s", "xfd",
[["s", "ve", "ev"]]>;
- let OverloadedName = "vfmv_s", IsPrototypeDefaultTU = false,
+ let OverloadedName = "vfmv_s",
UnMaskedPolicyScheme = HasPassthruOperand,
SupportOverloading = false in
defm vfmv_s : RVVOutBuiltinSet<"vfmv_s_f", "xfd",
@@ -2244,8 +2235,7 @@ defm vrgatherei16 : RVVOutBuiltinSet<"vrgatherei16_vv", "csil",
}
// 17.5. Vector Compress Instruction
-let IsPrototypeDefaultTU = false,
- HasMasked = false,
+let HasMasked = false,
UnMaskedPolicyScheme = HasPassthruOperand,
MaskedPolicyScheme = NonePolicy,
ManualCodegen = [{
diff --git a/clang/include/clang/Support/RISCVVIntrinsicUtils.h b/clang/include/clang/Support/RISCVVIntrinsicUtils.h
index 68c8c48999e46..85323c02cdc72 100644
--- a/clang/include/clang/Support/RISCVVIntrinsicUtils.h
+++ b/clang/include/clang/Support/RISCVVIntrinsicUtils.h
@@ -402,7 +402,7 @@ class RVVIntrinsic {
const RVVTypes &Types,
const std::vector<int64_t> &IntrinsicTypes,
const std::vector<llvm::StringRef> &RequiredFeatures,
- unsigned NF, Policy PolicyAttrs, bool IsPrototypeDefaultTU);
+ unsigned NF, Policy PolicyAttrs);
~RVVIntrinsic() = default;
RVVTypePtr getOutputType() const { return OutputType; }
@@ -470,14 +470,13 @@ class RVVIntrinsic {
static llvm::SmallVector<PrototypeDescriptor>
computeBuiltinTypes(llvm::ArrayRef<PrototypeDescriptor> Prototype,
bool IsMasked, bool HasMaskedOffOperand, bool HasVL,
- unsigned NF, bool IsPrototypeDefaultTU,
- PolicyScheme DefaultScheme, Policy PolicyAttrs);
+ unsigned NF, PolicyScheme DefaultScheme,
+ Policy PolicyAttrs);
static llvm::SmallVector<Policy>
getSupportedMaskedPolicies(bool HasTailPolicy, bool HasMaskPolicy);
static void updateNamesAndPolicy(bool IsMasked, bool HasPolicy,
- bool IsPrototypeDefaultTU, std::string &Name,
- std::string &BuiltinName,
+ std::string &Name, std::string &BuiltinName,
std::string &OverloadedName,
Policy &PolicyAttrs);
};
@@ -535,7 +534,6 @@ struct RVVIntrinsicRecord {
bool HasMasked : 1;
bool HasVL : 1;
bool HasMaskedOffOperand : 1;
- bool IsPrototypeDefaultTU : 1;
bool HasTailPolicy : 1;
bool HasMaskPolicy : 1;
uint8_t UnMaskedPolicyScheme : 2;
diff --git a/clang/lib/Sema/SemaRISCVVectorLookup.cpp b/clang/lib/Sema/SemaRISCVVectorLookup.cpp
index b85d24721657e..3f6ea67867f39 100644
--- a/clang/lib/Sema/SemaRISCVVectorLookup.cpp
+++ b/clang/lib/Sema/SemaRISCVVectorLookup.cpp
@@ -148,8 +148,7 @@ class RISCVIntrinsicManagerImpl : public sema::RISCVIntrinsicManager {
// Create RVVIntrinsicDef.
void InitRVVIntrinsic(const RVVIntrinsicRecord &Record, StringRef SuffixStr,
StringRef OverloadedSuffixStr, bool IsMask,
- RVVTypes &Types, bool HasPolicy, Policy PolicyAttrs,
- bool IsPrototypeDefaultTU);
+ RVVTypes &Types, bool HasPolicy, Policy PolicyAttrs);
// Create FunctionDecl for a vector intrinsic.
void CreateRVVIntrinsicDecl(LookupResult &LR, IdentifierInfo *II,
@@ -194,16 +193,15 @@ void RISCVIntrinsicManagerImpl::InitIntrinsicList() {
static_cast<PolicyScheme>(Record.MaskedPolicyScheme);
llvm::SmallVector<PrototypeDescriptor> ProtoSeq =
- RVVIntrinsic::computeBuiltinTypes(
- BasicProtoSeq, /*IsMasked=*/false,
- /*HasMaskedOffOperand=*/false, Record.HasVL, Record.NF,
- Record.IsPrototypeDefaultTU, UnMaskedPolicyScheme, Policy());
+ RVVIntrinsic::computeBuiltinTypes(BasicProtoSeq, /*IsMasked=*/false,
+ /*HasMaskedOffOperand=*/false,
+ Record.HasVL, Record.NF,
+ UnMaskedPolicyScheme, Policy());
llvm::SmallVector<PrototypeDescriptor> ProtoMaskSeq =
RVVIntrinsic::computeBuiltinTypes(
BasicProtoSeq, /*IsMasked=*/true, Record.HasMaskedOffOperand,
- Record.HasVL, Record.NF, Record.IsPrototypeDefaultTU,
- MaskedPolicyScheme, Policy());
+ Record.HasVL, Record.NF, MaskedPolicyScheme, Policy());
bool UnMaskedHasPolicy = UnMaskedPolicyScheme != PolicyScheme::SchemeNone;
bool MaskedHasPolicy = MaskedPolicyScheme != PolicyScheme::SchemeNone;
@@ -265,8 +263,7 @@ void RISCVIntrinsicManagerImpl::InitIntrinsicList() {
// Create non-masked intrinsic.
InitRVVIntrinsic(Record, SuffixStr, OverloadedSuffixStr, false, *Types,
- UnMaskedHasPolicy, Policy(),
- Record.IsPrototypeDefaultTU);
+ UnMaskedHasPolicy, Policy());
// Create non-masked policy intrinsic.
if (Record.UnMaskedPolicyScheme != PolicyScheme::SchemeNone) {
@@ -275,12 +272,12 @@ void RISCVIntrinsicManagerImpl::InitIntrinsicList() {
RVVIntrinsic::computeBuiltinTypes(
BasicProtoSeq, /*IsMasked=*/false,
/*HasMaskedOffOperand=*/false, Record.HasVL, Record.NF,
- Record.IsPrototypeDefaultTU, UnMaskedPolicyScheme, P);
+ UnMaskedPolicyScheme, P);
std::optional<RVVTypes> PolicyTypes = TypeCache.computeTypes(
BaseType, Log2LMUL, Record.NF, PolicyPrototype);
InitRVVIntrinsic(Record, SuffixStr, OverloadedSuffixStr,
/*IsMask=*/false, *PolicyTypes, UnMaskedHasPolicy,
- P, Record.IsPrototypeDefaultTU);
+ P);
}
}
if (!Record.HasMasked)
@@ -289,8 +286,7 @@ void RISCVIntrinsicManagerImpl::InitIntrinsicList() {
std::optional<RVVTypes> MaskTypes =
TypeCache.computeTypes(BaseType, Log2LMUL, Record.NF, ProtoMaskSeq);
InitRVVIntrinsic(Record, SuffixStr, OverloadedSuffixStr, true,
- *MaskTypes, MaskedHasPolicy, Policy(),
- Record.IsPrototypeDefaultTU);
+ *MaskTypes, MaskedHasPolicy, Policy());
if (Record.MaskedPolicyScheme == PolicyScheme::SchemeNone)
continue;
// Create masked policy intrinsic.
@@ -298,13 +294,11 @@ void RISCVIntrinsicManagerImpl::InitIntrinsicList() {
llvm::SmallVector<PrototypeDescriptor> PolicyPrototype =
RVVIntrinsic::computeBuiltinTypes(
BasicProtoSeq, /*IsMasked=*/true, Record.HasMaskedOffOperand,
- Record.HasVL, Record.NF, Record.IsPrototypeDefaultTU,
- MaskedPolicyScheme, P);
+ Record.HasVL, Record.NF, MaskedPolicyScheme, P);
std::optional<RVVTypes> PolicyTypes = TypeCache.computeTypes(
BaseType, Log2LMUL, Record.NF, PolicyPrototype);
InitRVVIntrinsic(Record, SuffixStr, OverloadedSuffixStr,
- /*IsMask=*/true, *PolicyTypes, MaskedHasPolicy, P,
- Record.IsPrototypeDefaultTU);
+ /*IsMask=*/true, *PolicyTypes, MaskedHasPolicy, P);
}
} // End for
diff erent LMUL
} // End for
diff erent TypeRange
@@ -315,7 +309,7 @@ void RISCVIntrinsicManagerImpl::InitIntrinsicList() {
void RISCVIntrinsicManagerImpl::InitRVVIntrinsic(
const RVVIntrinsicRecord &Record, StringRef SuffixStr,
StringRef OverloadedSuffixStr, bool IsMasked, RVVTypes &Signature,
- bool HasPolicy, Policy PolicyAttrs, bool IsPrototypeDefaultTU) {
+ bool HasPolicy, Policy PolicyAttrs) {
// Function name, e.g. vadd_vv_i32m1.
std::string Name = Record.Name;
if (!SuffixStr.empty())
@@ -333,9 +327,8 @@ void RISCVIntrinsicManagerImpl::InitRVVIntrinsic(
// clang built-in function name, e.g. __builtin_rvv_vadd.
std::string BuiltinName = "__builtin_rvv_" + std::string(Record.Name);
- RVVIntrinsic::updateNamesAndPolicy(IsMasked, HasPolicy, IsPrototypeDefaultTU,
- Name, BuiltinName, OverloadedName,
- PolicyAttrs);
+ RVVIntrinsic::updateNamesAndPolicy(IsMasked, HasPolicy, Name, BuiltinName,
+ OverloadedName, PolicyAttrs);
// Put into IntrinsicList.
size_t Index = IntrinsicList.size();
diff --git a/clang/lib/Support/RISCVVIntrinsicUtils.cpp b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
index 2fbd5622991ce..e15dd898b0b5f 100644
--- a/clang/lib/Support/RISCVVIntrinsicUtils.cpp
+++ b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
@@ -842,14 +842,16 @@ std::optional<RVVTypePtr> RVVTypeCache::computeType(BasicType BT, int Log2LMUL,
//===----------------------------------------------------------------------===//
// RVVIntrinsic implementation
//===----------------------------------------------------------------------===//
-RVVIntrinsic::RVVIntrinsic(
- StringRef NewName, StringRef Suffix, StringRef NewOverloadedName,
- StringRef OverloadedSuffix, StringRef IRName, bool IsMasked,
- bool HasMaskedOffOperand, bool HasVL, PolicyScheme Scheme,
- bool SupportOverloading, bool HasBuiltinAlias, StringRef ManualCodegen,
- const RVVTypes &OutInTypes, const std::vector<int64_t> &NewIntrinsicTypes,
- const std::vector<StringRef> &RequiredFeatures, unsigned NF,
- Policy NewPolicyAttrs, bool IsPrototypeDefaultTU)
+RVVIntrinsic::RVVIntrinsic(StringRef NewName, StringRef Suffix,
+ StringRef NewOverloadedName,
+ StringRef OverloadedSuffix, StringRef IRName,
+ bool IsMasked, bool HasMaskedOffOperand, bool HasVL,
+ PolicyScheme Scheme, bool SupportOverloading,
+ bool HasBuiltinAlias, StringRef ManualCodegen,
+ const RVVTypes &OutInTypes,
+ const std::vector<int64_t> &NewIntrinsicTypes,
+ const std::vector<StringRef> &RequiredFeatures,
+ unsigned NF, Policy NewPolicyAttrs)
: IRName(IRName), IsMasked(IsMasked),
HasMaskedOffOperand(HasMaskedOffOperand), HasVL(HasVL), Scheme(Scheme),
SupportOverloading(SupportOverloading), HasBuiltinAlias(HasBuiltinAlias),
@@ -867,8 +869,8 @@ RVVIntrinsic::RVVIntrinsic(
if (!OverloadedSuffix.empty())
OverloadedName += "_" + OverloadedSuffix.str();
- updateNamesAndPolicy(IsMasked, hasPolicy(), IsPrototypeDefaultTU, Name,
- BuiltinName, OverloadedName, PolicyAttrs);
+ updateNamesAndPolicy(IsMasked, hasPolicy(), Name, BuiltinName, OverloadedName,
+ PolicyAttrs);
// Init OutputType and InputTypes
OutputType = OutInTypes[0];
@@ -878,7 +880,7 @@ RVVIntrinsic::RVVIntrinsic(
// if there is merge operand (It is always in first operand).
IntrinsicTypes = NewIntrinsicTypes;
if ((IsMasked && hasMaskedOffOperand()) ||
- (!IsMasked && hasPassthruOperand() && !IsPrototypeDefaultTU)) {
+ (!IsMasked && hasPassthruOperand())) {
for (auto &I : IntrinsicTypes) {
if (I >= 0)
I += NF;
@@ -909,7 +911,7 @@ std::string RVVIntrinsic::getSuffixStr(
llvm::SmallVector<PrototypeDescriptor> RVVIntrinsic::computeBuiltinTypes(
llvm::ArrayRef<PrototypeDescriptor> Prototype, bool IsMasked,
bool HasMaskedOffOperand, bool HasVL, unsigned NF,
- bool IsPrototypeDefaultTU, PolicyScheme DefaultScheme, Policy PolicyAttrs) {
+ PolicyScheme DefaultScheme, Policy PolicyAttrs) {
SmallVector<PrototypeDescriptor> NewPrototype(Prototype.begin(),
Prototype.end());
// Update PolicyAttrs if need (TA or TAMA) for compute builtin types.
@@ -918,10 +920,7 @@ llvm::SmallVector<PrototypeDescriptor> RVVIntrinsic::computeBuiltinTypes(
if (PolicyAttrs.isPolicyNonePolicy()) {
if (!IsMasked) {
PolicyAttrs.PolicyNone = false;
- if (IsPrototypeDefaultTU)
- PolicyAttrs.TailPolicy = Policy::PolicyType::Undisturbed; // TU
- else
- PolicyAttrs.TailPolicy = Policy::PolicyType::Agnostic; // TA
+ PolicyAttrs.TailPolicy = Policy::PolicyType::Agnostic; // TA
}
}
bool HasPassthruOp = DefaultScheme == PolicyScheme::HasPassthruOperand;
@@ -941,10 +940,6 @@ llvm::SmallVector<PrototypeDescriptor> RVVIntrinsic::computeBuiltinTypes(
NewPrototype.insert(NewPrototype.begin() + NF + 1, NF, MaskoffType);
}
}
- // Erase passthru operand for TAM
- if (NF == 1 && IsPrototypeDefaultTU && PolicyAttrs.isTAMAPolicy() &&
- HasPassthruOp && !HasMaskedOffOperand)
- NewPrototype.erase(NewPrototype.begin() + 1);
if (HasMaskedOffOperand && NF > 1) {
// Convert
// (void, op0 address, op1 address, ..., maskedoff0, maskedoff1, ...)
@@ -959,11 +954,8 @@ llvm::SmallVector<PrototypeDescriptor> RVVIntrinsic::computeBuiltinTypes(
}
} else {
if (NF == 1) {
- if (PolicyAttrs.isTUPolicy() && HasPassthruOp && !IsPrototypeDefaultTU)
+ if (PolicyAttrs.isTUPolicy() && HasPassthruOp)
NewPrototype.insert(NewPrototype.begin(), NewPrototype[0]);
- else if (PolicyAttrs.isTAPolicy() && HasPassthruOp &&
- IsPrototypeDefaultTU)
- NewPrototype.erase(NewPrototype.begin() + 1);
} else if (PolicyAttrs.isTUPolicy() && HasPassthruOp) {
// NF > 1 cases for segment load operations.
// Convert
@@ -1007,7 +999,6 @@ RVVIntrinsic::getSupportedMaskedPolicies(bool HasTailPolicy,
}
void RVVIntrinsic::updateNamesAndPolicy(bool IsMasked, bool HasPolicy,
- bool IsPrototypeDefaultTU,
std::string &Name,
std::string &BuiltinName,
std::string &OverloadedName,
@@ -1031,10 +1022,6 @@ void RVVIntrinsic::updateNamesAndPolicy(bool IsMasked, bool HasPolicy,
BuiltinName += "_tumu";
else
BuiltinName += "_m";
- } else if (IsPrototypeDefaultTU) {
- PolicyAttrs.TailPolicy = Policy::PolicyType::Undisturbed;
- if (HasPolicy)
- BuiltinName += "_tu";
} else {
PolicyAttrs.TailPolicy = Policy::PolicyType::Agnostic;
if (HasPolicy)
@@ -1109,7 +1096,6 @@ raw_ostream &operator<<(raw_ostream &OS, const RVVIntrinsicRecord &Record) {
OS << (int)Record.HasMasked << ",";
OS << (int)Record.HasVL << ",";
OS << (int)Record.HasMaskedOffOperand << ",";
- OS << (int)Record.IsPrototypeDefaultTU << ",";
OS << (int)Record.HasTailPolicy << ",";
OS << (int)Record.HasMaskPolicy << ",";
OS << (int)Record.UnMaskedPolicyScheme << ",";
diff --git a/clang/utils/TableGen/RISCVVEmitter.cpp b/clang/utils/TableGen/RISCVVEmitter.cpp
index d9caafeec8c42..7c58b7daf5840 100644
--- a/clang/utils/TableGen/RISCVVEmitter.cpp
+++ b/clang/utils/TableGen/RISCVVEmitter.cpp
@@ -66,7 +66,6 @@ struct SemaRecord {
bool HasMasked :1;
bool HasVL :1;
bool HasMaskedOffOperand :1;
- bool IsPrototypeDefaultTU : 1;
bool HasTailPolicy : 1;
bool HasMaskPolicy : 1;
uint8_t UnMaskedPolicyScheme : 2;
@@ -518,7 +517,6 @@ void RVVEmitter::createRVVIntrinsics(
std::vector<int64_t> Log2LMULList = R->getValueAsListOfInts("Log2LMUL");
bool HasTailPolicy = R->getValueAsBit("HasTailPolicy");
bool HasMaskPolicy = R->getValueAsBit("HasMaskPolicy");
- bool IsPrototypeDefaultTU = R->getValueAsBit("IsPrototypeDefaultTU");
bool SupportOverloading = R->getValueAsBit("SupportOverloading");
bool HasBuiltinAlias = R->getValueAsBit("HasBuiltinAlias");
StringRef ManualCodegen = R->getValueAsString("ManualCodegen");
@@ -549,13 +547,13 @@ void RVVEmitter::createRVVIntrinsics(
parsePrototypes(OverloadedSuffixProto);
// Compute Builtin types
- auto Prototype = RVVIntrinsic::computeBuiltinTypes(
- BasicPrototype, /*IsMasked=*/false,
- /*HasMaskedOffOperand=*/false, HasVL, NF, IsPrototypeDefaultTU,
- UnMaskedPolicyScheme, Policy());
+ auto Prototype =
+ RVVIntrinsic::computeBuiltinTypes(BasicPrototype, /*IsMasked=*/false,
+ /*HasMaskedOffOperand=*/false, HasVL,
+ NF, UnMaskedPolicyScheme, Policy());
auto MaskedPrototype = RVVIntrinsic::computeBuiltinTypes(
BasicPrototype, /*IsMasked=*/true, HasMaskedOffOperand, HasVL, NF,
- IsPrototypeDefaultTU, MaskedPolicyScheme, Policy());
+ MaskedPolicyScheme, Policy());
// Create Intrinsics for each type and LMUL.
for (char I : TypeRange) {
@@ -577,22 +575,22 @@ void RVVEmitter::createRVVIntrinsics(
/*IsMasked=*/false, /*HasMaskedOffOperand=*/false, HasVL,
UnMaskedPolicyScheme, SupportOverloading, HasBuiltinAlias,
ManualCodegen, *Types, IntrinsicTypes, RequiredFeatures, NF,
- Policy(), IsPrototypeDefaultTU));
+ Policy()));
if (UnMaskedPolicyScheme != PolicyScheme::SchemeNone)
for (auto P : SupportedUnMaskedPolicies) {
SmallVector<PrototypeDescriptor> PolicyPrototype =
RVVIntrinsic::computeBuiltinTypes(
BasicPrototype, /*IsMasked=*/false,
/*HasMaskedOffOperand=*/false, HasVL, NF,
- IsPrototypeDefaultTU, UnMaskedPolicyScheme, P);
+ UnMaskedPolicyScheme, P);
std::optional<RVVTypes> PolicyTypes =
TypeCache.computeTypes(BT, Log2LMUL, NF, PolicyPrototype);
Out.push_back(std::make_unique<RVVIntrinsic>(
Name, SuffixStr, OverloadedName, OverloadedSuffixStr, IRName,
/*IsMask=*/false, /*HasMaskedOffOperand=*/false, HasVL,
UnMaskedPolicyScheme, SupportOverloading, HasBuiltinAlias,
- ManualCodegen, *PolicyTypes, IntrinsicTypes,
- RequiredFeatures, NF, P, IsPrototypeDefaultTU));
+ ManualCodegen, *PolicyTypes, IntrinsicTypes, RequiredFeatures,
+ NF, P));
}
if (!HasMasked)
continue;
@@ -602,24 +600,23 @@ void RVVEmitter::createRVVIntrinsics(
Out.push_back(std::make_unique<RVVIntrinsic>(
Name, SuffixStr, OverloadedName, OverloadedSuffixStr, MaskedIRName,
/*IsMasked=*/true, HasMaskedOffOperand, HasVL, MaskedPolicyScheme,
- SupportOverloading, HasBuiltinAlias, ManualCodegen,
- *MaskTypes, IntrinsicTypes, RequiredFeatures, NF,
- Policy(), IsPrototypeDefaultTU));
+ SupportOverloading, HasBuiltinAlias, ManualCodegen, *MaskTypes,
+ IntrinsicTypes, RequiredFeatures, NF, Policy()));
if (MaskedPolicyScheme == PolicyScheme::SchemeNone)
continue;
for (auto P : SupportedMaskedPolicies) {
SmallVector<PrototypeDescriptor> PolicyPrototype =
RVVIntrinsic::computeBuiltinTypes(
BasicPrototype, /*IsMasked=*/true, HasMaskedOffOperand, HasVL,
- NF, IsPrototypeDefaultTU, MaskedPolicyScheme, P);
+ NF, MaskedPolicyScheme, P);
std::optional<RVVTypes> PolicyTypes =
TypeCache.computeTypes(BT, Log2LMUL, NF, PolicyPrototype);
Out.push_back(std::make_unique<RVVIntrinsic>(
Name, SuffixStr, OverloadedName, OverloadedSuffixStr,
MaskedIRName, /*IsMasked=*/true, HasMaskedOffOperand, HasVL,
MaskedPolicyScheme, SupportOverloading, HasBuiltinAlias,
- ManualCodegen, *PolicyTypes, IntrinsicTypes,
- RequiredFeatures, NF, P, IsPrototypeDefaultTU));
+ ManualCodegen, *PolicyTypes, IntrinsicTypes, RequiredFeatures, NF,
+ P));
}
} // End for Log2LMULList
} // End for TypeRange
@@ -663,7 +660,6 @@ void RVVEmitter::createRVVIntrinsics(
SR.HasMasked = HasMasked;
SR.HasVL = HasVL;
SR.HasMaskedOffOperand = HasMaskedOffOperand;
- SR.IsPrototypeDefaultTU = IsPrototypeDefaultTU;
SR.HasTailPolicy = HasTailPolicy;
SR.HasMaskPolicy = HasMaskPolicy;
SR.UnMaskedPolicyScheme = static_cast<uint8_t>(UnMaskedPolicyScheme);
@@ -708,7 +704,6 @@ void RVVEmitter::createRVVIntrinsicRecords(std::vector<RVVIntrinsicRecord> &Out,
R.HasMasked = SR.HasMasked;
R.HasVL = SR.HasVL;
R.HasMaskedOffOperand = SR.HasMaskedOffOperand;
- R.IsPrototypeDefaultTU = SR.IsPrototypeDefaultTU;
R.HasTailPolicy = SR.HasTailPolicy;
R.HasMaskPolicy = SR.HasMaskPolicy;
R.UnMaskedPolicyScheme = SR.UnMaskedPolicyScheme;
More information about the cfe-commits
mailing list