diff options
author | Sam Clegg <sbc@chromium.org> | 2022-11-03 15:06:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 22:06:32 +0000 |
commit | 8388a33e84c0730f5a7c7e89bd089ad7c9db9455 (patch) | |
tree | a4991df7be22c02204208704af25172c2932bfa0 /src | |
parent | bf1782368dc6fee2d5fb9f4dd0cada2ca04ccb30 (diff) | |
download | binaryen-8388a33e84c0730f5a7c7e89bd089ad7c9db9455.tar.gz binaryen-8388a33e84c0730f5a7c7e89bd089ad7c9db9455.tar.bz2 binaryen-8388a33e84c0730f5a7c7e89bd089ad7c9db9455.zip |
Update default features to match new llvm defaults (#5212)
See: https://reviews.llvm.org/D125728
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/tool-options.h | 4 | ||||
-rw-r--r-- | src/wasm-features.h | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/tools/tool-options.h b/src/tools/tool-options.h index 14cbf4aba..eb5212c84 100644 --- a/src/tools/tool-options.h +++ b/src/tools/tool-options.h @@ -205,8 +205,8 @@ struct ToolOptions : public Options { } private: - FeatureSet enabledFeatures = FeatureSet::MVP; - FeatureSet disabledFeatures = FeatureSet::MVP; + FeatureSet enabledFeatures = FeatureSet::Default; + FeatureSet disabledFeatures = FeatureSet::None; }; } // namespace wasm diff --git a/src/wasm-features.h b/src/wasm-features.h index 2ceb9796b..881868901 100644 --- a/src/wasm-features.h +++ b/src/wasm-features.h @@ -27,7 +27,7 @@ namespace wasm { struct FeatureSet { enum Feature : uint32_t { - MVP = 0, + None = 0, Atomics = 1 << 0, MutableGlobals = 1 << 1, TruncSat = 1 << 2, @@ -46,6 +46,10 @@ struct FeatureSet { ExtendedConst = 1 << 14, Strings = 1 << 15, MultiMemories = 1 << 16, + MVP = None, + // Keep in sync with llvm default features: + // https://github.com/llvm/llvm-project/blob/c7576cb89d6c95f03968076e902d3adfd1996577/clang/lib/Basic/Targets/WebAssembly.cpp#L150-L153 + Default = SignExt | MutableGlobals, // GCNNLocals are opt-in: merely asking for "All" does not apply them. To // get all possible values use AllPossible. See setAll() below for more // details. @@ -109,7 +113,7 @@ struct FeatureSet { return ret; } - FeatureSet() : features(MVP) {} + FeatureSet() : features(None) {} FeatureSet(uint32_t features) : features(features) {} operator uint32_t() const { return features; } |