summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCSubtargetInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCSubtargetInfo.cpp')
-rw-r--r--llvm/lib/MC/MCSubtargetInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCSubtargetInfo.cpp b/llvm/lib/MC/MCSubtargetInfo.cpp
index c401b7e1de0..1874bf03bd8 100644
--- a/llvm/lib/MC/MCSubtargetInfo.cpp
+++ b/llvm/lib/MC/MCSubtargetInfo.cpp
@@ -42,3 +42,11 @@ MCSubtargetInfo::getInstrItineraryForCPU(StringRef CPU) const {
return InstrItineraryData(Stages, OperandCycles, ForwardingPathes,
(InstrItinerary *)Found->Value);
}
+
+/// getFeatureBits - Get the feature bits for a CPU (optionally supplemented
+/// with feature string).
+uint64_t MCSubtargetInfo::getFeatureBits(StringRef CPU, StringRef FS) const {
+ SubtargetFeatures Features(FS);
+ return Features.getFeatureBits(CPU, ProcDesc, NumProcs,
+ ProcFeatures, NumFeatures);
+}
OpenPOWER on IntegriCloud