diff options
author | Bill Wendling <isanbard@gmail.com> | 2007-06-27 23:34:06 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2007-06-27 23:34:06 +0000 |
commit | 1a636de33bccc31337c1ea0811c7019fa0b31eea (patch) | |
tree | 985615db08d95c845e4328afb01a87bcb81edc48 | |
parent | d23cd2a0bf3d2c8e1dd17bc51f048ac4bf8809ee (diff) | |
download | external_llvm-1a636de33bccc31337c1ea0811c7019fa0b31eea.zip external_llvm-1a636de33bccc31337c1ea0811c7019fa0b31eea.tar.gz external_llvm-1a636de33bccc31337c1ea0811c7019fa0b31eea.tar.bz2 |
Set implied features based upon the CPU's feature list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37768 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/SubtargetFeature.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/SubtargetFeature.cpp b/lib/Target/SubtargetFeature.cpp index 598f029..d783f8b 100644 --- a/lib/Target/SubtargetFeature.cpp +++ b/lib/Target/SubtargetFeature.cpp @@ -268,6 +268,13 @@ uint32_t SubtargetFeatures::getBits(const SubtargetFeatureKV *CPUTable, if (CPUEntry) { // Set base feature bits Bits = CPUEntry->Value; + + // Set the feature implied by this CPU feature, if any. + for (size_t i = 0; i < FeatureTableSize; ++i) { + const SubtargetFeatureKV &FE = FeatureTable[i]; + if (CPUEntry->Value & FE.Value) + SetImpliedBits(Bits, &FE, FeatureTable, FeatureTableSize); + } } else { cerr << "'" << Features[0] << "' is not a recognized processor for this target" |