From 7f31119fb0ca0ed01d2f7603516702d004752b55 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 23 Apr 2018 16:59:06 +0000 Subject: [PATCH] [MC] Remove MachineInstr reference in MC layer (PR37160) Only add support for getSchedInfoStr(const MachineInstr &MI) at the TargetSubtargetInfo level. Really, the getSchedInfoStr calls need to be removed entirely, we should just return a latency/rthroughput through the subtarget and keep a string creation helper function somewhere else. llvm-svn: 330615 --- llvm/include/llvm/CodeGen/TargetSubtargetInfo.h | 2 +- llvm/include/llvm/MC/MCSubtargetInfo.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/llvm/include/llvm/CodeGen/TargetSubtargetInfo.h b/llvm/include/llvm/CodeGen/TargetSubtargetInfo.h index 5e5faac..5756277 100644 --- a/llvm/include/llvm/CodeGen/TargetSubtargetInfo.h +++ b/llvm/include/llvm/CodeGen/TargetSubtargetInfo.h @@ -249,7 +249,7 @@ public: virtual bool enableSubRegLiveness() const { return false; } /// Returns string representation of scheduler comment - std::string getSchedInfoStr(const MachineInstr &MI) const override; + std::string getSchedInfoStr(const MachineInstr &MI) const; std::string getSchedInfoStr(MCInst const &MCI) const override; /// This is called after a .mir file was loaded. diff --git a/llvm/include/llvm/MC/MCSubtargetInfo.h b/llvm/include/llvm/MC/MCSubtargetInfo.h index 0a2b247..3767907 100644 --- a/llvm/include/llvm/MC/MCSubtargetInfo.h +++ b/llvm/include/llvm/MC/MCSubtargetInfo.h @@ -27,7 +27,6 @@ namespace llvm { -class MachineInstr; class MCInst; //===----------------------------------------------------------------------===// @@ -167,10 +166,6 @@ public: } /// Returns string representation of scheduler comment - virtual std::string getSchedInfoStr(const MachineInstr &MI) const { - return {}; - } - virtual std::string getSchedInfoStr(MCInst const &MCI) const { return {}; } -- 2.7.4