Lines Matching defs:Feature
28 /// hasFlag - Determine if a feature has a flag; '+' or '-'
30 static inline bool hasFlag(const StringRef Feature) {
31 assert(!Feature.empty() && "Empty string");
33 char Ch = Feature[0];
40 static inline std::string StripFlag(const StringRef Feature) {
41 return hasFlag(Feature) ? Feature.substr(1) : Feature;
46 static inline bool isEnabled(const StringRef Feature) {
47 assert(!Feature.empty() && "Empty string");
49 char Ch = Feature[0];
56 static inline std::string PrependFlag(const StringRef Feature,
58 assert(!Feature.empty() && "Empty string");
59 if (hasFlag(Feature))
60 return Feature;
62 Prefix += Feature;
97 // Start with the first feature
99 // For each successive feature
103 // Add the feature
146 /// Display help for feature choices.
150 // Determine the length of the longest CPU and Feature entries.
161 // Print the Feature table.
168 errs() << "Use +feature to enable a feature, or -feature to disable it.\n"
187 /// SetImpliedBits - For each feature that is (transitively) implied by this
188 /// feature, set it.
206 /// ClearImpliedBits - For each feature that (transitively) implies this
207 /// feature, clear it.
225 /// ToggleFeature - Toggle a feature and returns the newly updated feature
228 SubtargetFeatures::ToggleFeature(uint64_t Bits, const StringRef Feature,
231 // Find feature in table.
233 Find(StripFlag(Feature), FeatureTable, FeatureTableSize);
239 // For each feature that implies this, clear it.
244 // For each feature that this implies, set it.
248 errs() << "'" << Feature
249 << "' is not a recognized feature for this target"
250 << " (ignoring feature)\n";
257 /// getFeatureBits - Get feature bits a CPU.
288 // Set base feature bits
291 // Set the feature implied by this CPU feature, if any.
304 // Iterate through each feature
306 const StringRef Feature = Features[i];
309 if (Feature == "+help")
312 // Find feature in table.
314 Find(StripFlag(Feature), FeatureTable, FeatureTableSize);
317 // Enable/disable feature in bits
318 if (isEnabled(Feature)) {
321 // For each feature that this implies, set it.
326 // For each feature that implies this, clear it.
330 errs() << "'" << Feature
331 << "' is not a recognized feature for this target"
332 << " (ignoring feature)\n";
363 /// print - Print feature string.
371 /// dump - Dump feature info.