[PATCH] D118334: [NFC][RISCV] Bundle up ISAInfo updates and checks
Yueh-Ting Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 28 07:13:44 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5f856c5b308e: [NFC][RISCV] Bundle up ISAInfo updates and checks (authored by eopXD).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118334/new/
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,15 +461,7 @@
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 @@
}
}
- 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 @@
}
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);
+}
Index: llvm/include/llvm/Support/RISCVISAInfo.h
===================================================================
--- llvm/include/llvm/Support/RISCVISAInfo.h
+++ llvm/include/llvm/Support/RISCVISAInfo.h
@@ -92,6 +92,9 @@
void updateFLen();
void updateMinVLen();
void updateMaxELen();
+
+ static llvm::Expected<std::unique_ptr<RISCVISAInfo>>
+ postProcessAndChecking(std::unique_ptr<RISCVISAInfo> &&ISAInfo);
};
} // namespace llvm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118334.404015.patch
Type: text/x-patch
Size: 1855 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220128/56322e78/attachment.bin>
More information about the llvm-commits
mailing list