for (const SubtargetFeatureKV &FE : FeatureTable) {
if (FeatureEntry.Value == FE.Value) continue;
- if ((FeatureEntry.Implies & FE.Value).any()) {
- Bits |= FE.Value;
+ if (FeatureEntry.Implies.test(FE.Value)) {
+ Bits.set(FE.Value);
SetImpliedBits(Bits, FE, FeatureTable);
}
}
for (const SubtargetFeatureKV &FE : FeatureTable) {
if (FeatureEntry.Value == FE.Value) continue;
- if ((FE.Implies & FeatureEntry.Value).any()) {
- Bits &= ~FE.Value;
+ if (FE.Implies.test(FeatureEntry.Value)) {
+ Bits.reset(FE.Value);
ClearImpliedBits(Bits, FE, FeatureTable);
}
}
Find(StripFlag(Feature), FeatureTable);
// If there is a match
if (FeatureEntry) {
- if ((Bits & FeatureEntry->Value) == FeatureEntry->Value) {
- Bits &= ~FeatureEntry->Value;
+ if (Bits.test(FeatureEntry->Value)) {
+ Bits.reset(FeatureEntry->Value);
// For each feature that implies this, clear it.
ClearImpliedBits(Bits, *FeatureEntry, FeatureTable);
} else {
- Bits |= FeatureEntry->Value;
+ Bits.set(FeatureEntry->Value);
// For each feature that this implies, set it.
SetImpliedBits(Bits, *FeatureEntry, FeatureTable);
if (FeatureEntry) {
// Enable/disable feature in bits
if (isEnabled(Feature)) {
- Bits |= FeatureEntry->Value;
+ Bits.set(FeatureEntry->Value);
// For each feature that this implies, set it.
SetImpliedBits(Bits, *FeatureEntry, FeatureTable);
} else {
- Bits &= ~FeatureEntry->Value;
+ Bits.reset(FeatureEntry->Value);
// For each feature that implies this, clear it.
ClearImpliedBits(Bits, *FeatureEntry, FeatureTable);
// If there is a match
if (CPUEntry) {
// Set base feature bits
- Bits = CPUEntry->Value;
+ Bits = CPUEntry->Implies;
// Set the feature implied by this CPU feature, if any.
for (auto &FE : FeatureTable) {
- if ((CPUEntry->Value & FE.Value).any())
+ if (CPUEntry->Implies.test(FE.Value))
SetImpliedBits(Bits, FE, FeatureTable);
}
} else {
OS << " { "
<< "\"" << CommandLineName << "\", "
<< "\"" << Desc << "\", "
- << "{ " << Target << "::" << Name << " }, ";
+ << Target << "::" << Name << ", ";
RecVec ImpliesList = Feature->getValueAsListOfDefs("Implies");
StringRef Name = Processor->getValueAsString("Name");
RecVec FeatureList = Processor->getValueAsListOfDefs("Features");
- // Emit as { "cpu", "description", { f1 , f2 , ... fn } },
- OS << " { "
+ // Emit as { "cpu", "description", 0, { f1 , f2 , ... fn } },
+ // The 0 is for the feature id which isn't used for CPUs.
+ OS << " { "
<< "\"" << Name << "\", "
- << "\"Select the " << Name << " processor\", ";
+ << "\"Select the " << Name << " processor\", 0, ";
OS << "{";
for (unsigned j = 0, M = FeatureList.size(); j < M;) {
OS << " " << Target << "::" << FeatureList[j]->getName();
if (++j < M) OS << ",";
}
- // The { } is for the "implies" section of this data structure.
- OS << " }, { } },\n";
+ OS << " } },\n";
}
// End processor table