diff --git a/llvm/include/llvm/Support/RISCVISAInfo.h b/llvm/include/llvm/Support/RISCVISAInfo.h --- a/llvm/include/llvm/Support/RISCVISAInfo.h +++ b/llvm/include/llvm/Support/RISCVISAInfo.h @@ -92,6 +92,8 @@ void updateFLen(); void updateMinVLen(); void updateMaxELen(); + + Error postProcessAndChecking(); }; } // namespace llvm diff --git a/llvm/lib/Support/RISCVISAInfo.cpp b/llvm/lib/Support/RISCVISAInfo.cpp --- a/llvm/lib/Support/RISCVISAInfo.cpp +++ b/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(); +}