mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-15 04:05:36 +02:00
FEXCore/Config: Annotate all config options that can affect codegen
Instead serializing the world, allow the config to be data driven. A couple host feature options aren't serialized as they get explained elsewhere.
This commit is contained in:
3 files changed
+115
-11
No files matched your search
@@ -520,6 +520,9 @@ void Value<T>::GetListIfExists(FEXCore::Config::ConfigOption Option, StringArray
|
||||
}
|
||||
template void Value<StringArrayType>::GetListIfExists(FEXCore::Config::ConfigOption Option, StringArrayType* List);
|
||||
|
||||
#define CONFIG_AFFECTSCODEGEN
|
||||
#include <FEXCore/Config/ConfigOptions.inl>
|
||||
|
||||
fextl::string SerializeForCache() {
|
||||
fextl::string Config {};
|
||||
|
||||
@@ -533,16 +536,10 @@ fextl::string SerializeForCache() {
|
||||
};
|
||||
|
||||
const auto SerializeValue = [&Config, append_string_triple]<typename T, ConfigOption Option>(auto ConfigVal, const auto Default) {
|
||||
if constexpr (Option == ConfigOption::CONFIG_ENV || Option == ConfigOption::CONFIG_HOSTENV ||
|
||||
Option == ConfigOption::CONFIG_ADDITIONALARGUMENTS || Option == ConfigOption::CONFIG_APP_CONFIG_NAME ||
|
||||
Option == ConfigOption::CONFIG_APP_FILENAME || Option == ConfigOption::CONFIG_IS64BIT_MODE ||
|
||||
Option == ConfigOption::CONFIG_INTERPRETER_INSTALLED || Option == ConfigOption::CONFIG_DISABLE_VIXL_INDIRECT_RUNTIME_CALLS ||
|
||||
Option == ConfigOption::CONFIG_HOSTFEATURES || Option == ConfigOption::CONFIG_CPUFEATUREREGISTERS) {
|
||||
// Skip environment variables, meta arguments, and HostFeatures.
|
||||
// Also skip CPUFeatureRegisters because it contains unfiltered data that is used in HostFeatures.
|
||||
if (!Config_AffectsCodeGen[FEXCore::ToUnderlying(Option)]) {
|
||||
// Skip everything that the config says doesn't affect codegen.
|
||||
return;
|
||||
}
|
||||
|
||||
append_string_triple(Config, FEXCore::Config::GetConfigJSONName(Option), Option, ConfigVal());
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user