diff options
| author | Craig Topper <craig.topper@sifive.com> | 2025-11-22 17:00:56 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-22 17:00:56 -0800 |
| commit | 0ef522ff68fff4266bf85e7b7a507a16a8fd34ee (patch) | |
| tree | afc7839155ed8580ff234b0d93d4c5383be841c7 /llvm/utils/TableGen/DAGISelMatcherOpt.cpp | |
| parent | 0619292195ecd47ac05b0c7759992b400abec52c (diff) | |
[TableGen] Use MVT instead of MVT::SimpleValueType. NFC (#169180)
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>
Diffstat (limited to 'llvm/utils/TableGen/DAGISelMatcherOpt.cpp')
| -rw-r--r-- | llvm/utils/TableGen/DAGISelMatcherOpt.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/DAGISelMatcherOpt.cpp b/llvm/utils/TableGen/DAGISelMatcherOpt.cpp index 268e6bbc4eee..af73eb216041 100644 --- a/llvm/utils/TableGen/DAGISelMatcherOpt.cpp +++ b/llvm/utils/TableGen/DAGISelMatcherOpt.cpp @@ -282,7 +282,7 @@ static void ContractNodes(std::unique_ptr<Matcher> &InputMatcherPtr, #endif if (ResultsMatch) { - ArrayRef<MVT::SimpleValueType> VTs = EN->getVTList(); + ArrayRef<MVT> VTs = EN->getVTList(); ArrayRef<unsigned> Operands = EN->getOperandList(); MatcherPtr->reset(new MorphNodeToMatcher( EN->getInstruction(), VTs, Operands, EN->hasChain(), @@ -556,17 +556,17 @@ static void FactorScope(std::unique_ptr<Matcher> &MatcherPtr) { // If all the options are CheckType's, we can form the SwitchType, woot. if (AllTypeChecks) { DenseMap<unsigned, unsigned> TypeEntry; - SmallVector<std::pair<MVT::SimpleValueType, Matcher *>, 8> Cases; + SmallVector<std::pair<MVT, Matcher *>, 8> Cases; for (Matcher *Optn : OptionsToMatch) { Matcher *M = FindNodeWithKind(Optn, Matcher::CheckType); assert(M && isa<CheckTypeMatcher>(M) && "Unknown Matcher type"); auto *CTM = cast<CheckTypeMatcher>(M); Matcher *MatcherWithoutCTM = Optn->unlinkNode(CTM); - MVT::SimpleValueType CTMTy = CTM->getType(); + MVT CTMTy = CTM->getType(); delete CTM; - unsigned &Entry = TypeEntry[CTMTy]; + unsigned &Entry = TypeEntry[CTMTy.SimpleTy]; if (Entry != 0) { // If we have unfactored duplicate types, then we should factor them. Matcher *PrevMatcher = Cases[Entry - 1].second; |
