File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
llvm/lib/Target/WebAssembly Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -202,8 +202,7 @@ class CoalesceFeaturesAndStripAtomics final : public ModulePass {
202
202
bool runOnModule (Module &M) override {
203
203
FeatureBitset Features = coalesceFeatures (M);
204
204
205
- std::string FeatureStr =
206
- getFeatureString (Features, WasmTM->getTargetFeatureString ());
205
+ std::string FeatureStr = getFeatureString (Features);
207
206
WasmTM->setTargetFeatureString (FeatureStr);
208
207
for (auto &F : M)
209
208
replaceFeatures (F, FeatureStr);
@@ -241,17 +240,14 @@ class CoalesceFeaturesAndStripAtomics final : public ModulePass {
241
240
return Features;
242
241
}
243
242
244
- static std::string getFeatureString (const FeatureBitset &Features,
245
- StringRef TargetFS) {
243
+ static std::string getFeatureString (const FeatureBitset &Features) {
246
244
std::string Ret;
247
245
for (const SubtargetFeatureKV &KV : WebAssemblyFeatureKV) {
248
246
if (Features[KV.Value ])
249
247
Ret += (StringRef (" +" ) + KV.Key + " ," ).str ();
248
+ else
249
+ Ret += (StringRef (" -" ) + KV.Key + " ," ).str ();
250
250
}
251
- SubtargetFeatures TF{TargetFS};
252
- for (std::string const &F : TF.getFeatures ())
253
- if (!SubtargetFeatures::isEnabled (F))
254
- Ret += F + " ," ;
255
251
return Ret;
256
252
}
257
253
You can’t perform that action at this time.
0 commit comments