-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[TableGen] Use MVT instead of MVT::SimpleValueType. NFC #169180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This improves types safety and is less verbose. Use SimpleTy only where an integer is needed like switches or emitting a VBR.
|
@llvm/pr-subscribers-llvm-globalisel @llvm/pr-subscribers-tablegen Author: Craig Topper (topperc) ChangesThis improves type safety and is less verbose. Use SimpleTy only where an integer is needed like switches or emitting a VBR. Patch is 40.22 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/169180.diff 18 Files Affected:
diff --git a/llvm/utils/TableGen/CallingConvEmitter.cpp b/llvm/utils/TableGen/CallingConvEmitter.cpp
index 2b20b854a9b1a..369238dd70f7c 100644
--- a/llvm/utils/TableGen/CallingConvEmitter.cpp
+++ b/llvm/utils/TableGen/CallingConvEmitter.cpp
@@ -271,9 +271,9 @@ void CallingConvEmitter::emitAction(const Record *Action, indent Indent,
O << Indent << "return false;\n";
} else if (Action->isSubClassOf("CCPromoteToType")) {
const Record *DestTy = Action->getValueAsDef("DestTy");
- MVT::SimpleValueType DestVT = getValueType(DestTy);
+ MVT DestVT = getValueType(DestTy);
O << Indent << "LocVT = " << getEnumName(DestVT) << ";\n";
- if (MVT(DestVT).isFloatingPoint()) {
+ if (DestVT.isFloatingPoint()) {
O << Indent << "LocInfo = CCValAssign::FPExt;\n";
} else {
O << Indent << "if (ArgFlags.isSExt())\n"
@@ -285,9 +285,9 @@ void CallingConvEmitter::emitAction(const Record *Action, indent Indent,
}
} else if (Action->isSubClassOf("CCPromoteToUpperBitsInType")) {
const Record *DestTy = Action->getValueAsDef("DestTy");
- MVT::SimpleValueType DestVT = getValueType(DestTy);
+ MVT DestVT = getValueType(DestTy);
O << Indent << "LocVT = " << getEnumName(DestVT) << ";\n";
- if (MVT(DestVT).isFloatingPoint()) {
+ if (DestVT.isFloatingPoint()) {
PrintFatalError(Action->getLoc(),
"CCPromoteToUpperBitsInType does not handle floating "
"point");
diff --git a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
index 34355d5d6b743..3faa9cb869d36 100644
--- a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
@@ -1921,8 +1921,8 @@ SDNodeInfo::SDNodeInfo(const Record *R, const CodeGenHwModes &CGH) : Def(R) {
/// getKnownType - If the type constraints on this node imply a fixed type
/// (e.g. all stores return void, etc), then return it as an
-/// MVT::SimpleValueType. Otherwise, return EEVT::Other.
-MVT::SimpleValueType SDNodeInfo::getKnownType(unsigned ResNo) const {
+/// MVT. Otherwise, return EEVT::Other.
+MVT SDNodeInfo::getKnownType(unsigned ResNo) const {
unsigned NumResults = getNumResults();
assert(NumResults <= 1 &&
"We only work with nodes with zero or one result so far!");
@@ -2585,14 +2585,14 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
ValueTypeByHwMode VVT = TP.getInfer().getConcrete(Types[0], false);
for (auto &P : VVT) {
- MVT::SimpleValueType VT = P.second.SimpleTy;
+ MVT VT = P.second;
// Can only check for types of a known size
if (VT == MVT::iPTR)
continue;
// Check that the value doesn't use more bits than we have. It must
// either be a sign- or zero-extended equivalent of the original.
- unsigned Width = MVT(VT).getFixedSizeInBits();
+ unsigned Width = VT.getFixedSizeInBits();
int64_t Val = II->getValue();
if (!isIntN(Width, Val) && !isUIntN(Width, Val)) {
TP.error("Integer value '" + Twine(Val) +
@@ -2629,8 +2629,7 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
for (unsigned i = 0, e = getNumChildren() - 1; i != e; ++i) {
MadeChange |= getChild(i + 1).ApplyTypeConstraints(TP, NotRegisters);
- MVT::SimpleValueType OpVT =
- getValueType(Int->IS.ParamTys[i]->getValueAsDef("VT"));
+ MVT OpVT = getValueType(Int->IS.ParamTys[i]->getValueAsDef("VT"));
assert(getChild(i + 1).getNumTypes() == 1 && "Unhandled case");
MadeChange |= getChild(i + 1).UpdateNodeType(0, OpVT, TP);
}
@@ -2676,8 +2675,7 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
// FIXME: Generalize to multiple possible types and multiple possible
// ImplicitDefs.
- MVT::SimpleValueType VT =
- InstInfo.HasOneImplicitDefWithKnownVT(CDP.getTargetInfo());
+ MVT VT = InstInfo.HasOneImplicitDefWithKnownVT(CDP.getTargetInfo());
if (VT != MVT::Other)
MadeChange |= UpdateNodeType(ResNo, VT, TP);
diff --git a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h
index aa9a0a442424d..22a9d3e145b74 100644
--- a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h
+++ b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h
@@ -191,8 +191,7 @@ struct TypeSetByHwMode : public InfoByHwMode<MachineValueTypeSet> {
TypeSetByHwMode() = default;
TypeSetByHwMode(const TypeSetByHwMode &VTS) = default;
TypeSetByHwMode &operator=(const TypeSetByHwMode &) = default;
- TypeSetByHwMode(MVT::SimpleValueType VT)
- : TypeSetByHwMode(ValueTypeByHwMode(VT)) {}
+ TypeSetByHwMode(MVT VT) : TypeSetByHwMode(ValueTypeByHwMode(VT)) {}
TypeSetByHwMode(ArrayRef<ValueTypeByHwMode> VTList);
SetType &getOrCreate(unsigned Mode) { return Map[Mode]; }
@@ -259,7 +258,7 @@ struct TypeInfer {
/// otherwise.
bool MergeInTypeInfo(TypeSetByHwMode &Out, const TypeSetByHwMode &In) const;
- bool MergeInTypeInfo(TypeSetByHwMode &Out, MVT::SimpleValueType InVT) const {
+ bool MergeInTypeInfo(TypeSetByHwMode &Out, MVT InVT) const {
return MergeInTypeInfo(Out, TypeSetByHwMode(InVT));
}
bool MergeInTypeInfo(TypeSetByHwMode &Out,
@@ -451,8 +450,8 @@ class SDNodeInfo {
/// getKnownType - If the type constraints on this node imply a fixed type
/// (e.g. all stores return void, etc), then return it as an
- /// MVT::SimpleValueType. Otherwise, return MVT::Other.
- MVT::SimpleValueType getKnownType(unsigned ResNo) const;
+ /// MVT. Otherwise, return MVT::Other.
+ MVT getKnownType(unsigned ResNo) const;
unsigned getProperties() const { return Properties; }
@@ -698,8 +697,8 @@ class TreePatternNode : public RefCountedBase<TreePatternNode> {
}
TypeSetByHwMode &getExtType(unsigned ResNo) { return Types[ResNo]; }
void setType(unsigned ResNo, const TypeSetByHwMode &T) { Types[ResNo] = T; }
- MVT::SimpleValueType getSimpleType(unsigned ResNo) const {
- return Types[ResNo].getMachineValueType().SimpleTy;
+ MVT getSimpleType(unsigned ResNo) const {
+ return Types[ResNo].getMachineValueType();
}
bool hasConcreteType(unsigned ResNo) const {
@@ -850,8 +849,7 @@ class TreePatternNode : public RefCountedBase<TreePatternNode> {
///
bool UpdateNodeType(unsigned ResNo, const TypeSetByHwMode &InTy,
TreePattern &TP);
- bool UpdateNodeType(unsigned ResNo, MVT::SimpleValueType InTy,
- TreePattern &TP);
+ bool UpdateNodeType(unsigned ResNo, MVT InTy, TreePattern &TP);
bool UpdateNodeType(unsigned ResNo, const ValueTypeByHwMode &InTy,
TreePattern &TP);
@@ -1001,8 +999,7 @@ inline bool TreePatternNode::UpdateNodeType(unsigned ResNo,
return TP.getInfer().MergeInTypeInfo(Types[ResNo], VTS);
}
-inline bool TreePatternNode::UpdateNodeType(unsigned ResNo,
- MVT::SimpleValueType InTy,
+inline bool TreePatternNode::UpdateNodeType(unsigned ResNo, MVT InTy,
TreePattern &TP) {
TypeSetByHwMode VTS(InTy);
TP.getInfer().expandOverloads(VTS);
diff --git a/llvm/utils/TableGen/Common/CodeGenInstruction.cpp b/llvm/utils/TableGen/Common/CodeGenInstruction.cpp
index 93d4f4bfe5d27..62a7b54d86e7b 100644
--- a/llvm/utils/TableGen/Common/CodeGenInstruction.cpp
+++ b/llvm/utils/TableGen/Common/CodeGenInstruction.cpp
@@ -499,7 +499,7 @@ CodeGenInstruction::CodeGenInstruction(const Record *R)
/// HasOneImplicitDefWithKnownVT - If the instruction has at least one
/// implicit def and it has a known VT, return the VT, otherwise return
/// MVT::Other.
-MVT::SimpleValueType CodeGenInstruction::HasOneImplicitDefWithKnownVT(
+MVT CodeGenInstruction::HasOneImplicitDefWithKnownVT(
const CodeGenTarget &TargetInfo) const {
if (ImplicitDefs.empty())
return MVT::Other;
@@ -510,7 +510,7 @@ MVT::SimpleValueType CodeGenInstruction::HasOneImplicitDefWithKnownVT(
const std::vector<ValueTypeByHwMode> &RegVTs =
TargetInfo.getRegisterVTs(FirstImplicitDef);
if (RegVTs.size() == 1 && RegVTs[0].isSimple())
- return RegVTs[0].getSimple().SimpleTy;
+ return RegVTs[0].getSimple();
return MVT::Other;
}
diff --git a/llvm/utils/TableGen/Common/CodeGenInstruction.h b/llvm/utils/TableGen/Common/CodeGenInstruction.h
index 72958375ab298..a50b19099a6de 100644
--- a/llvm/utils/TableGen/Common/CodeGenInstruction.h
+++ b/llvm/utils/TableGen/Common/CodeGenInstruction.h
@@ -289,8 +289,7 @@ class CodeGenInstruction {
/// HasOneImplicitDefWithKnownVT - If the instruction has at least one
/// implicit def and it has a known VT, return the VT, otherwise return
/// MVT::Other.
- MVT::SimpleValueType
- HasOneImplicitDefWithKnownVT(const CodeGenTarget &TargetInfo) const;
+ MVT HasOneImplicitDefWithKnownVT(const CodeGenTarget &TargetInfo) const;
/// FlattenAsmStringVariants - Flatten the specified AsmString to only
/// include text from the specified variant, returning the new string.
diff --git a/llvm/utils/TableGen/Common/CodeGenTarget.cpp b/llvm/utils/TableGen/Common/CodeGenTarget.cpp
index e080ca0aa0b31..3f2d843163acc 100644
--- a/llvm/utils/TableGen/Common/CodeGenTarget.cpp
+++ b/llvm/utils/TableGen/Common/CodeGenTarget.cpp
@@ -41,13 +41,13 @@ static cl::opt<unsigned>
/// getValueType - Return the MVT::SimpleValueType that the specified TableGen
/// record corresponds to.
-MVT::SimpleValueType llvm::getValueType(const Record *Rec) {
+MVT llvm::getValueType(const Record *Rec) {
return (MVT::SimpleValueType)Rec->getValueAsInt("Value");
}
-StringRef llvm::getEnumName(MVT::SimpleValueType T) {
+StringRef llvm::getEnumName(MVT T) {
// clang-format off
- switch (T) {
+ switch (T.SimpleTy) {
#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc, Tup, NF, NElem, EltTy) \
case MVT::Ty: return "MVT::" # Ty;
#include "llvm/CodeGen/GenVT.inc"
diff --git a/llvm/utils/TableGen/Common/CodeGenTarget.h b/llvm/utils/TableGen/Common/CodeGenTarget.h
index c1ed70d1739f0..0598e2c556e6e 100644
--- a/llvm/utils/TableGen/Common/CodeGenTarget.h
+++ b/llvm/utils/TableGen/Common/CodeGenTarget.h
@@ -43,9 +43,9 @@ class CodeGenSubRegIndex;
/// getValueType - Return the MVT::SimpleValueType that the specified TableGen
/// record corresponds to.
-MVT::SimpleValueType getValueType(const Record *Rec);
+MVT getValueType(const Record *Rec);
-StringRef getEnumName(MVT::SimpleValueType T);
+StringRef getEnumName(MVT T);
/// getQualifiedName - Return the name of the specified record, with a
/// namespace qualifier if the record contains one.
diff --git a/llvm/utils/TableGen/Common/DAGISelMatcher.cpp b/llvm/utils/TableGen/Common/DAGISelMatcher.cpp
index 4fdb386bf45e7..6f03989a805bf 100644
--- a/llvm/utils/TableGen/Common/DAGISelMatcher.cpp
+++ b/llvm/utils/TableGen/Common/DAGISelMatcher.cpp
@@ -286,7 +286,7 @@ void EmitNodeMatcherCommon::printImpl(raw_ostream &OS, indent Indent) const {
OS << (isa<MorphNodeToMatcher>(this) ? "MorphNodeTo: " : "EmitNode: ")
<< CGI.Namespace << "::" << CGI.getName() << ": <todo flags> ";
- for (MVT::SimpleValueType VT : VTs)
+ for (MVT VT : VTs)
OS << ' ' << getEnumName(VT);
OS << '(';
for (unsigned Operand : Operands)
@@ -321,8 +321,7 @@ void MorphNodeToMatcher::anchor() {}
// isContradictoryImpl Implementations.
-static bool TypesAreContradictory(MVT::SimpleValueType T1,
- MVT::SimpleValueType T2) {
+static bool TypesAreContradictory(MVT T1, MVT T2) {
// If the two types are the same, then they are the same, so they don't
// contradict.
if (T1 == T2)
@@ -339,16 +338,16 @@ static bool TypesAreContradictory(MVT::SimpleValueType T1,
// If either type is about iPtr, then they don't conflict unless the other
// one is not a scalar integer type.
if (T1 == MVT::iPTR)
- return !MVT(T2).isInteger() || MVT(T2).isVector();
+ return !T2.isInteger() || T2.isVector();
if (T2 == MVT::iPTR)
- return !MVT(T1).isInteger() || MVT(T1).isVector();
+ return !T1.isInteger() || T1.isVector();
if (T1 == MVT::cPTR)
- return !MVT(T2).isCheriCapability() || MVT(T2).isVector();
+ return !T2.isCheriCapability() || T2.isVector();
if (T2 == MVT::cPTR)
- return !MVT(T1).isCheriCapability() || MVT(T1).isVector();
+ return !T1.isCheriCapability() || T1.isVector();
// Otherwise, they are two different non-iPTR/cPTR types, they conflict.
return true;
@@ -370,7 +369,7 @@ bool CheckOpcodeMatcher::isContradictoryImpl(const Matcher *M) const {
if (CT->getResNo() >= getOpcode().getNumResults())
return true;
- MVT::SimpleValueType NodeType = getOpcode().getKnownType(CT->getResNo());
+ MVT NodeType = getOpcode().getKnownType(CT->getResNo());
if (NodeType != MVT::Other)
return TypesAreContradictory(NodeType, CT->getType());
}
diff --git a/llvm/utils/TableGen/Common/DAGISelMatcher.h b/llvm/utils/TableGen/Common/DAGISelMatcher.h
index a19f4442f5f4d..e947dac3e6482 100644
--- a/llvm/utils/TableGen/Common/DAGISelMatcher.h
+++ b/llvm/utils/TableGen/Common/DAGISelMatcher.h
@@ -517,14 +517,14 @@ class SwitchOpcodeMatcher : public Matcher {
/// CheckTypeMatcher - This checks to see if the current node has the
/// specified type at the specified result, if not it fails to match.
class CheckTypeMatcher : public Matcher {
- MVT::SimpleValueType Type;
+ MVT Type;
unsigned ResNo;
public:
- CheckTypeMatcher(MVT::SimpleValueType type, unsigned resno)
+ CheckTypeMatcher(MVT type, unsigned resno)
: Matcher(CheckType), Type(type), ResNo(resno) {}
- MVT::SimpleValueType getType() const { return Type; }
+ MVT getType() const { return Type; }
unsigned getResNo() const { return ResNo; }
static bool classof(const Matcher *N) { return N->getKind() == CheckType; }
@@ -542,11 +542,10 @@ class CheckTypeMatcher : public Matcher {
/// then the match fails. This is semantically equivalent to a Scope node where
/// every child does a CheckType, but is much faster.
class SwitchTypeMatcher : public Matcher {
- SmallVector<std::pair<MVT::SimpleValueType, Matcher *>, 8> Cases;
+ SmallVector<std::pair<MVT, Matcher *>, 8> Cases;
public:
- SwitchTypeMatcher(
- SmallVectorImpl<std::pair<MVT::SimpleValueType, Matcher *>> &&cases)
+ SwitchTypeMatcher(SmallVectorImpl<std::pair<MVT, Matcher *>> &&cases)
: Matcher(SwitchType), Cases(std::move(cases)) {}
~SwitchTypeMatcher() override;
@@ -554,7 +553,7 @@ class SwitchTypeMatcher : public Matcher {
unsigned getNumCases() const { return Cases.size(); }
- MVT::SimpleValueType getCaseType(unsigned i) const { return Cases[i].first; }
+ MVT getCaseType(unsigned i) const { return Cases[i].first; }
Matcher *getCaseMatcher(unsigned i) { return Cases[i].second; }
const Matcher *getCaseMatcher(unsigned i) const { return Cases[i].second; }
@@ -567,14 +566,14 @@ class SwitchTypeMatcher : public Matcher {
/// specified type, if not it fails to match.
class CheckChildTypeMatcher : public Matcher {
unsigned ChildNo;
- MVT::SimpleValueType Type;
+ MVT Type;
public:
- CheckChildTypeMatcher(unsigned childno, MVT::SimpleValueType type)
+ CheckChildTypeMatcher(unsigned childno, MVT type)
: Matcher(CheckChildType), ChildNo(childno), Type(type) {}
unsigned getChildNo() const { return ChildNo; }
- MVT::SimpleValueType getType() const { return Type; }
+ MVT getType() const { return Type; }
static bool classof(const Matcher *N) {
return N->getKind() == CheckChildType;
@@ -684,13 +683,12 @@ class CheckChild2CondCodeMatcher : public Matcher {
/// CheckValueTypeMatcher - This checks to see if the current node is a
/// VTSDNode with the specified type, if not it fails to match.
class CheckValueTypeMatcher : public Matcher {
- MVT::SimpleValueType VT;
+ MVT VT;
public:
- CheckValueTypeMatcher(MVT::SimpleValueType SimpleVT)
- : Matcher(CheckValueType), VT(SimpleVT) {}
+ CheckValueTypeMatcher(MVT SimpleVT) : Matcher(CheckValueType), VT(SimpleVT) {}
- MVT::SimpleValueType getVT() const { return VT; }
+ MVT getVT() const { return VT; }
static bool classof(const Matcher *N) {
return N->getKind() == CheckValueType;
@@ -832,18 +830,18 @@ class CheckFoldableChainNodeMatcher : public Matcher {
/// EmitIntegerMatcher - This creates a new TargetConstant.
class EmitIntegerMatcher : public Matcher {
int64_t Val;
- MVT::SimpleValueType VT;
+ MVT VT;
unsigned ResultNo;
public:
- EmitIntegerMatcher(int64_t val, MVT::SimpleValueType vt, unsigned resultNo)
+ EmitIntegerMatcher(int64_t val, MVT vt, unsigned resultNo)
: Matcher(EmitInteger),
Val(SignExtend64(val, MVT(vt).getFixedSizeInBits())), VT(vt),
ResultNo(resultNo) {}
int64_t getValue() const { return Val; }
- MVT::SimpleValueType getVT() const { return VT; }
+ MVT getVT() const { return VT; }
unsigned getResultNo() const { return ResultNo; }
static bool classof(const Matcher *N) { return N->getKind() == EmitInteger; }
@@ -860,17 +858,16 @@ class EmitIntegerMatcher : public Matcher {
/// by a string.
class EmitStringIntegerMatcher : public Matcher {
std::string Val;
- MVT::SimpleValueType VT;
+ MVT VT;
unsigned ResultNo;
public:
- EmitStringIntegerMatcher(const std::string &val, MVT::SimpleValueType vt,
- unsigned resultNo)
+ EmitStringIntegerMatcher(const std::string &val, MVT vt, unsigned resultNo)
: Matcher(EmitStringInteger), Val(val), VT(vt), ResultNo(resultNo) {}
const std::string &getValue() const { return Val; }
- MVT::SimpleValueType getVT() const { return VT; }
+ MVT getVT() const { return VT; }
unsigned getResultNo() const { return ResultNo; }
static bool classof(const Matcher *N) {
@@ -890,17 +887,16 @@ class EmitRegisterMatcher : public Matcher {
/// Reg - The def for the register that we're emitting. If this is null, then
/// this is a reference to zero_reg.
const CodeGenRegister *Reg;
- MVT::SimpleValueType VT;
+ MVT VT;
unsigned ResultNo;
public:
- EmitRegisterMatcher(const CodeGenRegister *reg, MVT::SimpleValueType vt,
- unsigned resultNo)
+ EmitRegisterMatcher(const CodeGenRegister *reg, MVT vt, unsigned resultNo)
: Matcher(EmitRegister), Reg(reg), VT(vt), ResultNo(resultNo) {}
const CodeGenRegister *getReg() const { return Reg; }
- MVT::SimpleValueType getVT() const { return VT; }
+ MVT getVT() const { return VT; }
unsigned getResultNo() const { return ResultNo; }
static bool classof(const Matcher *N) { return N->getKind() == EmitRegister; }
@@ -1028,7 +1024,7 @@ class EmitNodeXFormMatcher : public Matcher {
/// MorphNodeTo.
class EmitNodeMatcherCommon : public Matcher {
const CodeGenInstruction &CGI;
- const SmallVector<MVT::SimpleValueType, 3> VTs;
+ const SmallVector<MVT, 3> VTs;
const SmallVector<unsigned, 6> Operands;
bool HasChain, HasInGlue, HasOutGlue, HasMemRefs;
@@ -1038,8 +1034,7 @@ class EmitNodeMatcherCommon : public Matcher {
int NumFixedArityOperands;
public:
- EmitNodeMatcherCommon(const CodeGenInstruction &cgi,
- ArrayRef<MVT::SimpleValueType> vts,
+ EmitNodeMatcherCommon(const CodeGenInstruction &cgi, ArrayRef<MVT> vts,
ArrayRef<unsigned> operands, bool hasChain,
bool hasInGlue, bool hasOutGlue, bool hasmemrefs,
int numfixedarityoperands, bool isMorphNodeTo)
@@ -1051,7 +1046,7 @@ class EmitNodeMatcherCommon : public Matcher {
const CodeGenInstruction &getInstruction() const { return CGI; }
unsigned getNumVTs() const { return VTs.size(); }
- MVT::SimpleValueType getVT(unsigned i) const {
+ MVT getVT(unsigned i) const {
assert(i < VTs.size());
return VTs[i];
}
@@ -1062,7 +1057,7 @@ class EmitNodeMatcherCommon : public Matcher {
return Operands[i];
}
- const SmallVectorImpl<MVT::SimpleValueType> &getVTList() const { return VTs; }
+ const SmallVectorImpl<MVT> &getVTList() const { return VTs; }
const SmallVectorImpl<unsigned> &getOperandList() const { return Operands; }
bool hasChain() const { return HasChain; }
@@ -1086,8 +1081,7 @@ class EmitNodeMatcher : public EmitNodeMatcherCommo...
[truncated]
|
s-barannikov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Sergei Barannikov <barannikov88@gmail.com>
Co-authored-by: Sergei Barannikov <barannikov88@gmail.com>
This improves type safety and is less verbose. Use SimpleTy only where an integer is needed like switches or emitting a VBR. --------- Co-authored-by: Sergei Barannikov <barannikov88@gmail.com>
This improves type safety and is less verbose. Use SimpleTy only where an integer is needed like switches or emitting a VBR. --------- Co-authored-by: Sergei Barannikov <barannikov88@gmail.com>
This improves type safety and is less verbose. Use SimpleTy only where an integer is needed like switches or emitting a VBR.