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 {
202202 bool runOnModule (Module &M) override {
203203 FeatureBitset Features = coalesceFeatures (M);
204204
205- std::string FeatureStr =
206- getFeatureString (Features, WasmTM->getTargetFeatureString ());
205+ std::string FeatureStr = getFeatureString (Features);
207206 WasmTM->setTargetFeatureString (FeatureStr);
208207 for (auto &F : M)
209208 replaceFeatures (F, FeatureStr);
@@ -241,17 +240,14 @@ class CoalesceFeaturesAndStripAtomics final : public ModulePass {
241240 return Features;
242241 }
243242
244- static std::string getFeatureString (const FeatureBitset &Features,
245- StringRef TargetFS) {
243+ static std::string getFeatureString (const FeatureBitset &Features) {
246244 std::string Ret;
247245 for (const SubtargetFeatureKV &KV : WebAssemblyFeatureKV) {
248246 if (Features[KV.Value ])
249247 Ret += (StringRef (" +" ) + KV.Key + " ," ).str ();
248+ else
249+ Ret += (StringRef (" -" ) + KV.Key + " ," ).str ();
250250 }
251- SubtargetFeatures TF{TargetFS};
252- for (std::string const &F : TF.getFeatures ())
253- if (!SubtargetFeatures::isEnabled (F))
254- Ret += F + " ," ;
255251 return Ret;
256252 }
257253
You can’t perform that action at this time.
0 commit comments