[PATCH] Replace uint64_t representation of Features with FeatureBitset (std::bitset) in a few more places
Michael Kuperstein
michael.m.kuperstein at intel.com
Sat Jun 20 09:00:07 PDT 2015
Thanks!
I originally only converted the subtarget features, but not the available features, since, at least on x86, only a small subset of subtarget features actually participate in that, so it didn't look like it was running out. There's was no good reason for that, though.
Anyway, lgtm with a couple of nits.
================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:2628
@@ -2621,3 +2627,3 @@
uint64_t ErrorInfoIgnore;
- uint64_t ErrorInfoMissingFeature = 0; // Init suppresses compiler warnings.
+ FeatureBitset ErrorInfoMissingFeature; // Init suppresses compiler warnings.
unsigned Match[4];
----------------
Can probably remove the comment. :-)
================
Comment at: utils/TableGen/AsmMatcherEmitter.cpp:2257
@@ -2256,3 +2256,3 @@
<< "// instruction matching.\n"
- << "static const char *getSubtargetFeatureName(uint64_t Val) {\n";
+ << "static const char *getSubtargetFeatureName(FeatureBitset Val) {\n";
if (!Info.SubtargetFeatures.empty()) {
----------------
I'm not sure we need to make this take a bitset.
It's supposed to take a single feature value, right?
With the previous interface, a uint64_t stood for both a single value and a set, but now the two are different. We can still use a uint64_t for a single value, however, it's just that it's now an ordinal number instead of a bit.
http://reviews.llvm.org/D10542
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list