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/Common/CodeGenInstruction.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/Common/CodeGenInstruction.cpp')
| -rw-r--r-- | llvm/utils/TableGen/Common/CodeGenInstruction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/Common/CodeGenInstruction.cpp b/llvm/utils/TableGen/Common/CodeGenInstruction.cpp index 93d4f4bfe5d2..62a7b54d86e7 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; } |
