From 1187443bf7620b5688e916ae94800272bf18ee16 Mon Sep 17 00:00:00 2001 From: Cameron Hart Date: Sun, 10 Jul 2016 23:55:53 +1000 Subject: [PATCH] Add accessors for MCSubtargetInfo CPU and Feature tables --- include/llvm/MC/MCSubtargetInfo.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/llvm/MC/MCSubtargetInfo.h b/include/llvm/MC/MCSubtargetInfo.h index dd10881b73a8..e67ee81249d9 100644 --- a/include/llvm/MC/MCSubtargetInfo.h +++ b/include/llvm/MC/MCSubtargetInfo.h @@ -180,6 +180,7 @@ class MCSubtargetInfo { return Found != ProcDesc.end() && StringRef(Found->Key) == CPU; } + /// Returns string representation of scheduler comment virtual std::string getSchedInfoStr(const MachineInstr &MI) const { return {}; @@ -188,6 +189,14 @@ class MCSubtargetInfo { virtual std::string getSchedInfoStr(MCInst const &MCI) const { return {}; } + + ArrayRef getCPUTable() const { + return ProcDesc; + } + + ArrayRef getFeatureTable() const { + return ProcFeatures; + } }; } // end namespace llvm