forked from OSchip/llvm-project
[NFC][RISCV] Bundle up ISAInfo updates and checks
Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D118334
This commit is contained in:
parent
0ebbf3435f
commit
5f856c5b30
|
@ -92,6 +92,9 @@ private:
|
|||
void updateFLen();
|
||||
void updateMinVLen();
|
||||
void updateMaxELen();
|
||||
|
||||
static llvm::Expected<std::unique_ptr<RISCVISAInfo>>
|
||||
postProcessAndChecking(std::unique_ptr<RISCVISAInfo> &&ISAInfo);
|
||||
};
|
||||
|
||||
} // namespace llvm
|
||||
|
|
|
@ -461,15 +461,7 @@ RISCVISAInfo::parseFeatures(unsigned XLen,
|
|||
ISAInfo->Exts.erase(ExtName.str());
|
||||
}
|
||||
|
||||
ISAInfo->updateImplication();
|
||||
ISAInfo->updateFLen();
|
||||
ISAInfo->updateMinVLen();
|
||||
ISAInfo->updateMaxELen();
|
||||
|
||||
if (Error Result = ISAInfo->checkDependency())
|
||||
return std::move(Result);
|
||||
|
||||
return std::move(ISAInfo);
|
||||
return RISCVISAInfo::postProcessAndChecking(std::move(ISAInfo));
|
||||
}
|
||||
|
||||
llvm::Expected<std::unique_ptr<RISCVISAInfo>>
|
||||
|
@ -686,15 +678,7 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
|
|||
}
|
||||
}
|
||||
|
||||
ISAInfo->updateImplication();
|
||||
ISAInfo->updateFLen();
|
||||
ISAInfo->updateMinVLen();
|
||||
ISAInfo->updateMaxELen();
|
||||
|
||||
if (Error Result = ISAInfo->checkDependency())
|
||||
return std::move(Result);
|
||||
|
||||
return std::move(ISAInfo);
|
||||
return RISCVISAInfo::postProcessAndChecking(std::move(ISAInfo));
|
||||
}
|
||||
|
||||
Error RISCVISAInfo::checkDependency() {
|
||||
|
@ -919,3 +903,15 @@ std::vector<std::string> RISCVISAInfo::toFeatureVector() const {
|
|||
}
|
||||
return FeatureVector;
|
||||
}
|
||||
|
||||
llvm::Expected<std::unique_ptr<RISCVISAInfo>>
|
||||
RISCVISAInfo::postProcessAndChecking(std::unique_ptr<RISCVISAInfo> &&ISAInfo) {
|
||||
ISAInfo->updateImplication();
|
||||
ISAInfo->updateFLen();
|
||||
ISAInfo->updateMinVLen();
|
||||
ISAInfo->updateMaxELen();
|
||||
|
||||
if (Error Result = ISAInfo->checkDependency())
|
||||
return std::move(Result);
|
||||
return std::move(ISAInfo);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue