Skip to content

Commit c43fda3

Browse files
committed
Revert "[WebAssembly] avoid to use explicit disabled feature"
This reverts commit 1a17f2b.
1 parent 1a17f2b commit c43fda3

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp

+2-8
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ class CoalesceFeaturesAndStripAtomics final : public ModulePass {
200200
bool runOnModule(Module &M) override {
201201
FeatureBitset Features = coalesceFeatures(M);
202202

203-
std::string FeatureStr =
204-
getFeatureString(Features, WasmTM->getTargetFeatureString());
203+
std::string FeatureStr = getFeatureString(Features);
205204
WasmTM->setTargetFeatureString(FeatureStr);
206205
for (auto &F : M)
207206
replaceFeatures(F, FeatureStr);
@@ -239,17 +238,12 @@ class CoalesceFeaturesAndStripAtomics final : public ModulePass {
239238
return Features;
240239
}
241240

242-
static std::string getFeatureString(const FeatureBitset &Features,
243-
StringRef TargetFS) {
241+
std::string getFeatureString(const FeatureBitset &Features) {
244242
std::string Ret;
245243
for (const SubtargetFeatureKV &KV : WebAssemblyFeatureKV) {
246244
if (Features[KV.Value])
247245
Ret += (StringRef("+") + KV.Key + ",").str();
248246
}
249-
SubtargetFeatures TF{TargetFS};
250-
for (std::string const &F : TF.getFeatures())
251-
if (!SubtargetFeatures::isEnabled(F))
252-
Ret += F;
253247
return Ret;
254248
}
255249

llvm/test/CodeGen/WebAssembly/disable-feature.ll

-22
This file was deleted.

0 commit comments

Comments
 (0)