diff options
Diffstat (limited to 'contrib/llvm/include/llvm/MC/MCSubtargetInfo.h')
-rw-r--r-- | contrib/llvm/include/llvm/MC/MCSubtargetInfo.h | 52 |
1 files changed, 20 insertions, 32 deletions
diff --git a/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h b/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h index dd10881b73a8..b3ce523d9c0c 100644 --- a/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h +++ b/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h @@ -27,15 +27,14 @@ namespace llvm { -class MachineInstr; class MCInst; //===----------------------------------------------------------------------===// /// -/// MCSubtargetInfo - Generic base class for all target subtargets. +/// Generic base class for all target subtargets. /// class MCSubtargetInfo { - Triple TargetTriple; // Target triple + Triple TargetTriple; std::string CPU; // CPU being targeted. ArrayRef<SubtargetFeatureKV> ProcFeatures; // Processor feature list ArrayRef<SubtargetFeatureKV> ProcDesc; // Processor descriptions @@ -49,7 +48,7 @@ class MCSubtargetInfo { const InstrStage *Stages; // Instruction itinerary stages const unsigned *OperandCycles; // Itinerary operand cycles - const unsigned *ForwardingPaths; // Forwarding paths + const unsigned *ForwardingPaths; FeatureBitset FeatureBits; // Feature bits for current CPU + FS public: @@ -66,22 +65,10 @@ public: MCSubtargetInfo &operator=(MCSubtargetInfo &&) = delete; virtual ~MCSubtargetInfo() = default; - /// getTargetTriple - Return the target triple string. const Triple &getTargetTriple() const { return TargetTriple; } + StringRef getCPU() const { return CPU; } - /// getCPU - Return the CPU string. - StringRef getCPU() const { - return CPU; - } - - /// getFeatureBits - Return the feature bits. - /// - const FeatureBitset& getFeatureBits() const { - return FeatureBits; - } - - /// setFeatureBits - Set the feature bits. - /// + const FeatureBitset& getFeatureBits() const { return FeatureBits; } void setFeatureBits(const FeatureBitset &FeatureBits_) { FeatureBits = FeatureBits_; } @@ -102,16 +89,16 @@ public: /// string. void setDefaultFeatures(StringRef CPU, StringRef FS); - /// ToggleFeature - Toggle a feature and returns the re-computed feature - /// bits. This version does not change the implied bits. + /// Toggle a feature and return the re-computed feature bits. + /// This version does not change the implied bits. FeatureBitset ToggleFeature(uint64_t FB); - /// ToggleFeature - Toggle a feature and returns the re-computed feature - /// bits. This version does not change the implied bits. + /// Toggle a feature and return the re-computed feature bits. + /// This version does not change the implied bits. FeatureBitset ToggleFeature(const FeatureBitset& FB); - /// ToggleFeature - Toggle a set of features and returns the re-computed - /// feature bits. This version will also change all implied bits. + /// Toggle a set of features and return the re-computed feature bits. + /// This version will also change all implied bits. FeatureBitset ToggleFeature(StringRef FS); /// Apply a feature flag and return the re-computed feature bits, including @@ -122,8 +109,7 @@ public: /// the provided string, ignoring all other features. bool checkFeatures(StringRef FS) const; - /// getSchedModelForCPU - Get the machine model of a CPU. - /// + /// Get the machine model of a CPU. const MCSchedModel &getSchedModelForCPU(StringRef CPU) const; /// Get the machine model for this subtarget's CPU. @@ -167,13 +153,19 @@ public: return 0; } - /// getInstrItineraryForCPU - Get scheduling itinerary of a CPU. - /// + /// Get scheduling itinerary of a CPU. InstrItineraryData getInstrItineraryForCPU(StringRef CPU) const; /// Initialize an InstrItineraryData instance. void initInstrItins(InstrItineraryData &InstrItins) const; + /// Resolve a variant scheduling class for the given MCInst and CPU. + virtual unsigned + resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, + unsigned CPUID) const { + return 0; + } + /// Check whether the CPU string is valid. bool isCPUStringValid(StringRef CPU) const { auto Found = std::lower_bound(ProcDesc.begin(), ProcDesc.end(), CPU); @@ -181,10 +173,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 {}; } |