[PATCH] D118334: [NFC][RISCV] Bundle up ISAInfo updates and checks

Yueh-Ting Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 01:20:23 PST 2022


eopXD created this revision.
eopXD added reviewers: kito-cheng, craig.topper.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
eopXD requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, MaskRay.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118334

Files:
  llvm/include/llvm/Support/RISCVISAInfo.h
  llvm/lib/Support/RISCVISAInfo.cpp


Index: llvm/lib/Support/RISCVISAInfo.cpp
===================================================================
--- llvm/lib/Support/RISCVISAInfo.cpp
+++ llvm/lib/Support/RISCVISAInfo.cpp
@@ -461,12 +461,7 @@
       ISAInfo->Exts.erase(ExtName.str());
   }
 
-  ISAInfo->updateImplication();
-  ISAInfo->updateFLen();
-  ISAInfo->updateMinVLen();
-  ISAInfo->updateMaxELen();
-
-  if (Error Result = ISAInfo->checkDependency())
+  if (Error Result = ISAInfo->postProcessAndChecking())
     return std::move(Result);
 
   return std::move(ISAInfo);
@@ -686,12 +681,7 @@
     }
   }
 
-  ISAInfo->updateImplication();
-  ISAInfo->updateFLen();
-  ISAInfo->updateMinVLen();
-  ISAInfo->updateMaxELen();
-
-  if (Error Result = ISAInfo->checkDependency())
+  if (Error Result = ISAInfo->postProcessAndChecking())
     return std::move(Result);
 
   return std::move(ISAInfo);
@@ -919,3 +909,12 @@
   }
   return FeatureVector;
 }
+
+Error RISCVISAInfo::postProcessAndChecking() {
+  updateImplication();
+  updateFLen();
+  updateMinVLen();
+  updateMaxELen();
+
+  return checkDependency();
+}
Index: llvm/include/llvm/Support/RISCVISAInfo.h
===================================================================
--- llvm/include/llvm/Support/RISCVISAInfo.h
+++ llvm/include/llvm/Support/RISCVISAInfo.h
@@ -92,6 +92,8 @@
   void updateFLen();
   void updateMinVLen();
   void updateMaxELen();
+
+  Error postProcessAndChecking();
 };
 
 } // namespace llvm


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118334.403545.patch
Type: text/x-patch
Size: 1448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220127/e77282ac/attachment.bin>


More information about the llvm-commits mailing list