[llvm] r328205 - [MC] fix documentation comments; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 22 08:23:21 PDT 2018


Author: spatel
Date: Thu Mar 22 08:23:21 2018
New Revision: 328205

URL: http://llvm.org/viewvc/llvm-project?rev=328205&view=rev
Log:
[MC] fix documentation comments; NFC

Modified:
    llvm/trunk/include/llvm/MC/MCSubtargetInfo.h
    llvm/trunk/lib/MC/MCSubtargetInfo.cpp

Modified: llvm/trunk/include/llvm/MC/MCSubtargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSubtargetInfo.h?rev=328205&r1=328204&r2=328205&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCSubtargetInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCSubtargetInfo.h Thu Mar 22 08:23:21 2018
@@ -32,10 +32,10 @@ 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 +49,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 +66,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 +90,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 +110,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,8 +154,7 @@ 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.

Modified: llvm/trunk/lib/MC/MCSubtargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSubtargetInfo.cpp?rev=328205&r1=328204&r2=328205&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCSubtargetInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCSubtargetInfo.cpp Thu Mar 22 08:23:21 2018
@@ -51,8 +51,6 @@ MCSubtargetInfo::MCSubtargetInfo(
   InitMCProcessorInfo(CPU, FS);
 }
 
-/// ToggleFeature - Toggle a feature and returns the re-computed feature
-/// bits. This version does not change the implied bits.
 FeatureBitset MCSubtargetInfo::ToggleFeature(uint64_t FB) {
   FeatureBits.flip(FB);
   return FeatureBits;
@@ -63,8 +61,6 @@ FeatureBitset MCSubtargetInfo::ToggleFea
   return FeatureBits;
 }
 
-/// ToggleFeature - Toggle a feature and returns the re-computed feature
-/// bits. This version will also change all implied bits.
 FeatureBitset MCSubtargetInfo::ToggleFeature(StringRef FS) {
   SubtargetFeatures::ToggleFeature(FeatureBits, FS, ProcFeatures);
   return FeatureBits;
@@ -118,7 +114,6 @@ MCSubtargetInfo::getInstrItineraryForCPU
   return InstrItineraryData(SchedModel, Stages, OperandCycles, ForwardingPaths);
 }
 
-/// Initialize an InstrItineraryData instance.
 void MCSubtargetInfo::initInstrItins(InstrItineraryData &InstrItins) const {
   InstrItins = InstrItineraryData(getSchedModel(), Stages, OperandCycles,
                                   ForwardingPaths);




More information about the llvm-commits mailing list