[llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h TargetData.h TargetFrameInfo.h TargetInstrInfo.h TargetJITInfo.h TargetLowering.h TargetMachine.h TargetMachineRegistry.h TargetOptions.h TargetSchedInfo.h

Misha Brukman brukman at cs.uiuc.edu
Thu Apr 21 13:53:55 PDT 2005



Changes in directory llvm/include/llvm/Target:

MRegisterInfo.h updated: 1.55 -> 1.56
TargetData.h updated: 1.29 -> 1.30
TargetFrameInfo.h updated: 1.17 -> 1.18
TargetInstrInfo.h updated: 1.75 -> 1.76
TargetJITInfo.h updated: 1.5 -> 1.6
TargetLowering.h updated: 1.9 -> 1.10
TargetMachine.h updated: 1.50 -> 1.51
TargetMachineRegistry.h updated: 1.4 -> 1.5
TargetOptions.h updated: 1.3 -> 1.4
TargetSchedInfo.h updated: 1.33 -> 1.34
---
Log message:

Remove trailing whitespace


---
Diffs of the changes:  (+114 -114)

 MRegisterInfo.h         |    8 ++--
 TargetData.h            |   14 +++----
 TargetFrameInfo.h       |   12 +++---
 TargetInstrInfo.h       |   34 +++++++++---------
 TargetJITInfo.h         |   10 ++---
 TargetLowering.h        |   32 ++++++++---------
 TargetMachine.h         |   16 ++++----
 TargetMachineRegistry.h |    8 ++--
 TargetOptions.h         |    4 +-
 TargetSchedInfo.h       |   90 ++++++++++++++++++++++++------------------------
 10 files changed, 114 insertions(+), 114 deletions(-)


Index: llvm/include/llvm/Target/MRegisterInfo.h
diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.55 llvm/include/llvm/Target/MRegisterInfo.h:1.56
--- llvm/include/llvm/Target/MRegisterInfo.h:1.55	Wed Oct 27 01:00:53 2004
+++ llvm/include/llvm/Target/MRegisterInfo.h	Thu Apr 21 15:53:44 2005
@@ -1,10 +1,10 @@
 //===- Target/MRegisterInfo.h - Target Register Information -----*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file describes an abstract interface used to get information about a
@@ -92,7 +92,7 @@
   virtual iterator allocation_order_end(MachineFunction &MF)   const {
     return end();
   }
-  
+
 
 
   /// getSize - Return the size of the register in bytes, which is also the size
@@ -280,7 +280,7 @@
   /// instructions.  This method need only be implemented if using call frame
   /// setup/destroy pseudo instructions.
   ///
-  virtual void 
+  virtual void
   eliminateCallFramePseudoInstr(MachineFunction &MF,
                                 MachineBasicBlock &MBB,
                                 MachineBasicBlock::iterator MI) const {


Index: llvm/include/llvm/Target/TargetData.h
diff -u llvm/include/llvm/Target/TargetData.h:1.29 llvm/include/llvm/Target/TargetData.h:1.30
--- llvm/include/llvm/Target/TargetData.h:1.29	Sun Mar 13 13:04:04 2005
+++ llvm/include/llvm/Target/TargetData.h	Thu Apr 21 15:53:44 2005
@@ -1,14 +1,14 @@
 //===-- llvm/Target/TargetData.h - Data size & alignment info ---*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file defines target properties related to datatype size/offset/alignment
-// information.  It uses lazy annotations to cache information about how 
+// information.  It uses lazy annotations to cache information about how
 // structure types are laid out and used.
 //
 // This structure should be created once, filled in if the defaults are not
@@ -49,7 +49,7 @@
              bool LittleEndian = false,
              unsigned char PtrSize = 8,
              unsigned char PtrAl   = 8, unsigned char DoubleAl = 8,
-             unsigned char FloatAl = 4, unsigned char LongAl   = 8, 
+             unsigned char FloatAl = 4, unsigned char LongAl   = 8,
              unsigned char IntAl   = 4, unsigned char ShortAl  = 2,
              unsigned char ByteAl  = 1, unsigned char BoolAl   = 1);
 
@@ -67,7 +67,7 @@
     PointerSize(TD.getPointerSize()),
     PointerAlignment(TD.getPointerAlignment()) {
   }
-    
+
   TargetData(const std::string &ToolName, const Module *M);
   ~TargetData();  // Not virtual, do not subclass this class
 
@@ -105,9 +105,9 @@
   /// getIndexOffset - return the offset from the beginning of the type for the
   /// specified indices.  This is used to implement getelementptr.
   ///
-  uint64_t getIndexedOffset(const Type *Ty, 
+  uint64_t getIndexedOffset(const Type *Ty,
                             const std::vector<Value*> &Indices) const;
-  
+
   const StructLayout *getStructLayout(const StructType *Ty) const;
 };
 


Index: llvm/include/llvm/Target/TargetFrameInfo.h
diff -u llvm/include/llvm/Target/TargetFrameInfo.h:1.17 llvm/include/llvm/Target/TargetFrameInfo.h:1.18
--- llvm/include/llvm/Target/TargetFrameInfo.h:1.17	Wed Oct 27 11:14:51 2004
+++ llvm/include/llvm/Target/TargetFrameInfo.h	Thu Apr 21 15:53:44 2005
@@ -1,10 +1,10 @@
 //===-- llvm/Target/TargetFrameInfo.h ---------------------------*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // Interface to describe the layout of a stack frame on the target machine.
@@ -67,13 +67,13 @@
   /// fixed offset from the incoming stack pointer that each register should be
   /// spilled at.  If a register is not listed here, the code generator is
   /// allowed to spill it anywhere it chooses.
-  /// 
+  ///
   virtual const std::pair<unsigned, int> *
   getCalleeSaveSpillSlots(unsigned &NumEntries) const {
     NumEntries = 0;
     return 0;
   }
-  
+
   //===--------------------------------------------------------------------===//
   // These methods provide details of the stack frame used by Sparc, thus they
   // are Sparc specific.
@@ -87,12 +87,12 @@
   // function.  The frame contents are obtained from the MachineFunction object
   // for the given function.  The rest must be implemented by the
   // machine-specific subclass.
-  // 
+  //
   virtual int getIncomingArgOffset              (MachineFunction& mcInfo,
 						 unsigned argNum) const;
   virtual int getOutgoingArgOffset              (MachineFunction& mcInfo,
 						 unsigned argNum) const;
-  
+
   virtual int getFirstAutomaticVarOffset        (MachineFunction& mcInfo,
                                                  bool& growUp) const;
   virtual int getRegSpillAreaOffset             (MachineFunction& mcInfo,


Index: llvm/include/llvm/Target/TargetInstrInfo.h
diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.75 llvm/include/llvm/Target/TargetInstrInfo.h:1.76
--- llvm/include/llvm/Target/TargetInstrInfo.h:1.75	Wed Jan 19 00:53:02 2005
+++ llvm/include/llvm/Target/TargetInstrInfo.h	Thu Apr 21 15:53:44 2005
@@ -1,10 +1,10 @@
 //===-- llvm/Target/TargetInstrInfo.h - Instruction Info --------*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file describes the target machine instructions to the code generator.
@@ -91,14 +91,14 @@
 
 
 //---------------------------------------------------------------------------
-/// 
+///
 /// TargetInstrInfo - Interface to description of machine instructions
-/// 
+///
 class TargetInstrInfo {
   const TargetInstrDescriptor* desc;    // raw array to allow static init'n
   unsigned NumOpcodes;                  // number of entries in the desc array
   unsigned numRealOpCodes;              // number of non-dummy op codes
-  
+
   TargetInstrInfo(const TargetInstrInfo &);  // DO NOT IMPLEMENT
   void operator=(const TargetInstrInfo &);   // DO NOT IMPLEMENT
 public:
@@ -107,9 +107,9 @@
 
   // Invariant: All instruction sets use opcode #0 as the PHI instruction
   enum { PHI = 0 };
-  
+
   unsigned getNumOpcodes() const { return NumOpcodes; }
-  
+
   /// get - Return the machine instruction descriptor that corresponds to the
   /// specified instruction opcode.
   ///
@@ -121,7 +121,7 @@
   const char *getName(MachineOpCode Opcode) const {
     return get(Opcode).Name;
   }
-  
+
   int getNumOperands(MachineOpCode Opcode) const {
     return get(Opcode).numOperands;
   }
@@ -143,7 +143,7 @@
   //
   // Query instruction class flags according to the machine-independent
   // flags listed above.
-  // 
+  //
   bool isReturn(MachineOpCode Opcode) const {
     return get(Opcode).Flags & M_RET_FLAG;
   }
@@ -253,36 +253,36 @@
     return true;
   }
 
-  // 
+  //
   // Latencies for individual instructions and instruction pairs
-  // 
+  //
   virtual int minLatency(MachineOpCode Opcode) const {
     return get(Opcode).latency;
   }
-  
+
   virtual int maxLatency(MachineOpCode Opcode) const {
     return get(Opcode).latency;
   }
 
   //
   // Which operand holds an immediate constant?  Returns -1 if none
-  // 
+  //
   virtual int getImmedConstantPos(MachineOpCode Opcode) const {
     return -1; // immediate position is machine specific, so say -1 == "none"
   }
-  
+
   // Check if the specified constant fits in the immediate field
   // of this machine instruction
-  // 
+  //
   virtual bool constantFitsInImmedField(MachineOpCode Opcode,
 					int64_t intValue) const;
-  
+
   // Return the largest positive constant that can be held in the IMMED field
   // of this machine instruction.
   // isSignExtended is set to true if the value is sign-extended before use
   // (this is true for all immediate fields in SPARC instructions).
   // Return 0 if the instruction has no IMMED field.
-  // 
+  //
   virtual uint64_t maxImmedConstant(MachineOpCode Opcode,
 				    bool &isSignExtended) const {
     isSignExtended = get(Opcode).immedIsSignExtended;


Index: llvm/include/llvm/Target/TargetJITInfo.h
diff -u llvm/include/llvm/Target/TargetJITInfo.h:1.5 llvm/include/llvm/Target/TargetJITInfo.h:1.6
--- llvm/include/llvm/Target/TargetJITInfo.h:1.5	Sat Nov 20 22:42:32 2004
+++ llvm/include/llvm/Target/TargetJITInfo.h	Thu Apr 21 15:53:44 2005
@@ -1,10 +1,10 @@
 //===- Target/TargetJITInfo.h - Target Information for JIT ------*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file exposes an abstract interface used by the Just-In-Time code
@@ -30,19 +30,19 @@
   class TargetJITInfo {
   public:
     virtual ~TargetJITInfo() {}
-    
+
     /// addPassesToJITCompile - Add passes to the specified pass manager to
     /// implement a fast code generator for this target.
     ///
     virtual void addPassesToJITCompile(FunctionPassManager &PM) = 0;
-    
+
     /// replaceMachineCodeForFunction - Make it so that calling the function
     /// whose machine code is at OLD turns into a call to NEW, perhaps by
     /// overwriting OLD with a branch to NEW.  This is used for self-modifying
     /// code.
     ///
     virtual void replaceMachineCodeForFunction(void *Old, void *New) = 0;
-    
+
     /// emitFunctionStub - Use the specified MachineCodeEmitter object to emit a
     /// small native function that simply calls the function at the specified
     /// address.  Return the address of the resultant function.


Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.9 llvm/include/llvm/Target/TargetLowering.h:1.10
--- llvm/include/llvm/Target/TargetLowering.h:1.9	Thu Apr  7 14:41:18 2005
+++ llvm/include/llvm/Target/TargetLowering.h	Thu Apr 21 15:53:44 2005
@@ -1,10 +1,10 @@
 //===-- llvm/Target/TargetLowering.h - Target Lowering Info -----*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file describes how to lower LLVM code to machine code.  This has two
@@ -70,7 +70,7 @@
 
   TargetMachine &getTargetMachine() const { return TM; }
   const TargetData &getTargetData() const { return TD; }
-  
+
   bool isLittleEndian() const { return IsLittleEndian; }
   MVT::ValueType getPointerTy() const { return PointerTy; }
   MVT::ValueType getShiftAmountTy() const { return ShiftAmountTy; }
@@ -92,7 +92,7 @@
     assert(RC && "This value type is not natively supported!");
     return RC;
   }
-  
+
   /// hasNativeSupportFor - Return true if the target has native support for the
   /// specified value type.  This means that it has a register that directly
   /// holds it without promotions or expansions.
@@ -117,7 +117,7 @@
   MVT::ValueType getTypeToTransformTo(MVT::ValueType VT) const {
     return TransformToType[VT];
   }
-  
+
   typedef std::vector<double>::const_iterator legal_fpimm_iterator;
   legal_fpimm_iterator legal_fpimm_begin() const {
     return LegalFPImmediates.begin();
@@ -126,11 +126,11 @@
     return LegalFPImmediates.end();
   }
 
-  /// getOperationAction - Return how this operation should be 
+  /// getOperationAction - Return how this operation should be
   LegalizeAction getOperationAction(unsigned Op, MVT::ValueType VT) const {
-    return (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3); 
+    return (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3);
   }
-  
+
   /// hasNativeSupportForOperation - Return true if this operation is legal for
   /// this type.
   ///
@@ -173,7 +173,7 @@
     case Type::PointerTyID: return PointerTy;
     }
   }
-  
+
   /// getNumElements - Return the number of registers that this ValueType will
   /// eventually require.  This is always one for all non-integer types, is
   /// one for any types promoted to live in larger registers, but may be more
@@ -206,7 +206,7 @@
   void setShiftAmountFlavor(OutOfRangeShiftAmount OORSA) {
     ShiftAmtHandling = OORSA;
   }
-  
+
   /// addRegisterClass - Add the specified register class as an available
   /// regclass for the specified value type.  This indicates the selector can
   /// handle values of that class natively.
@@ -218,7 +218,7 @@
   /// computeRegisterProperties - Once all of the register classes are added,
   /// this allows us to compute derived properties we expose.
   void computeRegisterProperties();
-  
+
   /// setOperationAction - Indicate that the specified operation does not work
   /// with the specified type and indicate what to do about it.
   void setOperationAction(unsigned Op, MVT::ValueType VT,
@@ -291,7 +291,7 @@
   /// implement this.  The default implementation of this aborts.
   virtual SDOperand LowerOperation(SDOperand Op);
 
-  
+
 private:
   TargetMachine &TM;
   const TargetData &TD;
@@ -299,7 +299,7 @@
   /// IsLittleEndian - True if this is a little endian target.
   ///
   bool IsLittleEndian;
-  
+
   /// PointerTy - The type to use for pointers, usually i32 or i64.
   ///
   MVT::ValueType PointerTy;
@@ -327,7 +327,7 @@
   /// value type, where the two bits correspond to the LegalizeAction enum.
   /// This can be queried with "getTypeAction(VT)".
   unsigned ValueTypeActions;
- 
+
   /// TransformToType - For any value types we are promoting or expanding, this
   /// contains the value type that we are changing to.  For Expanded types, this
   /// contains one step of the expand (e.g. i64 -> i32), even if there are
@@ -341,9 +341,9 @@
   /// operations that are not should be described.  Note that operations on
   /// non-legal value types are not described here.
   unsigned OpActions[128];
-  
+
   std::vector<double> LegalFPImmediates;
-  
+
   std::vector<std::pair<MVT::ValueType,
                         TargetRegisterClass*> > AvailableRegClasses;
 };


Index: llvm/include/llvm/Target/TargetMachine.h
diff -u llvm/include/llvm/Target/TargetMachine.h:1.50 llvm/include/llvm/Target/TargetMachine.h:1.51
--- llvm/include/llvm/Target/TargetMachine.h:1.50	Tue Aug 10 18:10:21 2004
+++ llvm/include/llvm/Target/TargetMachine.h	Thu Apr 21 15:53:44 2005
@@ -1,10 +1,10 @@
 //===-- llvm/Target/TargetMachine.h - Target Information --------*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file describes the general parts of a Target machine.
@@ -37,16 +37,16 @@
 /// TargetMachine - Primary interface to the complete machine description for
 /// the target machine.  All target-specific information should be accessible
 /// through this interface.
-/// 
+///
 class TargetMachine {
   const std::string Name;
   const TargetData DataLayout;       // Calculates type size & alignment
   IntrinsicLowering *IL;             // Specifies how to lower intrinsic calls
-  
+
   TargetMachine(const TargetMachine&);   // DO NOT IMPLEMENT
   void operator=(const TargetMachine&);  // DO NOT IMPLEMENT
 protected: // Can only create subclasses...
-  TargetMachine(const std::string &name, IntrinsicLowering *IL,                
+  TargetMachine(const std::string &name, IntrinsicLowering *IL,
                 bool LittleEndian = false,
                 unsigned char PtrSize = 8, unsigned char PtrAl = 8,
                 unsigned char DoubleAl = 8, unsigned char FloatAl = 4,
@@ -54,7 +54,7 @@
                 unsigned char ShortAl = 2, unsigned char ByteAl = 1,
                 unsigned char BoolAl = 1);
 
-  TargetMachine(const std::string &name, IntrinsicLowering *IL, 
+  TargetMachine(const std::string &name, IntrinsicLowering *IL,
                 const TargetData &TD);
 
   /// This constructor is used for targets that support arbitrary TargetData
@@ -87,12 +87,12 @@
   /// lower unknown intrinsic functions to the equivalent LLVM expansion.
   ///
   IntrinsicLowering &getIntrinsicLowering() const { return *IL; }
-  
+
   // Interfaces to the major aspects of target machine information:
   // -- Instruction opcode and operand information
   // -- Pipelines and scheduling information
   // -- Stack frame information
-  // 
+  //
   virtual const TargetInstrInfo        *getInstrInfo() const { return 0; }
   virtual const TargetFrameInfo        *getFrameInfo() const { return 0; }
   const TargetData &getTargetData() const { return DataLayout; }


Index: llvm/include/llvm/Target/TargetMachineRegistry.h
diff -u llvm/include/llvm/Target/TargetMachineRegistry.h:1.4 llvm/include/llvm/Target/TargetMachineRegistry.h:1.5
--- llvm/include/llvm/Target/TargetMachineRegistry.h:1.4	Wed Sep  1 17:55:35 2004
+++ llvm/include/llvm/Target/TargetMachineRegistry.h	Thu Apr 21 15:53:44 2005
@@ -1,10 +1,10 @@
 //===-- Target/TargetMachineRegistry.h - Target Registration ----*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file exposes two classes: the TargetMachineRegistry class, which allows
@@ -74,7 +74,7 @@
   /// TargetMachine comments..
   template<class TargetMachineImpl>
   struct RegisterTarget : public TargetMachineRegistry::Entry {
-    RegisterTarget(const char *Name, const char *ShortDesc) : 
+    RegisterTarget(const char *Name, const char *ShortDesc) :
       TargetMachineRegistry::Entry(Name, ShortDesc, &Allocator,
                                    &TargetMachineImpl::getModuleMatchQuality,
                                    &TargetMachineImpl::getJITMatchQuality) {
@@ -94,7 +94,7 @@
     virtual ~TargetRegistrationListener();
 
     TargetRegistrationListener *getNext() const { return Next; }
-    
+
     virtual void targetRegistered(const TargetMachineRegistry::Entry *E) = 0;
   };
 


Index: llvm/include/llvm/Target/TargetOptions.h
diff -u llvm/include/llvm/Target/TargetOptions.h:1.3 llvm/include/llvm/Target/TargetOptions.h:1.4
--- llvm/include/llvm/Target/TargetOptions.h:1.3	Fri Apr 15 17:12:15 2005
+++ llvm/include/llvm/Target/TargetOptions.h	Thu Apr 21 15:53:44 2005
@@ -1,10 +1,10 @@
 //===-- llvm/Target/TargetOptions.h - Target Options ------------*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file defines command line option flags that are shared across various


Index: llvm/include/llvm/Target/TargetSchedInfo.h
diff -u llvm/include/llvm/Target/TargetSchedInfo.h:1.33 llvm/include/llvm/Target/TargetSchedInfo.h:1.34
--- llvm/include/llvm/Target/TargetSchedInfo.h:1.33	Sat Jan 15 19:26:31 2005
+++ llvm/include/llvm/Target/TargetSchedInfo.h	Thu Apr 21 15:53:44 2005
@@ -1,10 +1,10 @@
 //===- Target/TargetSchedInfo.h - Target Instruction Sched Info -*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file describes the target machine to the instruction scheduler.
@@ -22,14 +22,14 @@
 
 namespace llvm {
 
-typedef long long CycleCount_t; 
+typedef long long CycleCount_t;
 static const CycleCount_t HUGE_LATENCY = ~((long long) 1 << (sizeof(CycleCount_t)-2));
-static const CycleCount_t INVALID_LATENCY = -HUGE_LATENCY; 
+static const CycleCount_t INVALID_LATENCY = -HUGE_LATENCY;
 
 //---------------------------------------------------------------------------
-// class MachineResource 
+// class MachineResource
 // class CPUResource
-// 
+//
 // Purpose:
 //   Representation of a single machine resource used in specifying
 //   resource usages of machine instructions for scheduling.
@@ -42,7 +42,7 @@
   const std::string rname;
   resourceId_t rid;
   int maxNumUsers;   // MAXINT if no restriction
-  
+
   CPUResource(const std::string& resourceName, int maxUsers);
   static CPUResource* getCPUResource(resourceId_t id);
 private:
@@ -52,17 +52,17 @@
 
 //---------------------------------------------------------------------------
 // struct InstrClassRUsage
-// struct InstrRUsageDelta 
-// struct InstrIssueDelta 
-// struct InstrRUsage 
-// 
+// struct InstrRUsageDelta
+// struct InstrIssueDelta
+// struct InstrRUsage
+//
 // Purpose:
-//   The first three are structures used to specify machine resource 
+//   The first three are structures used to specify machine resource
 //   usages for each instruction in a machine description file:
 //    InstrClassRUsage : resource usages common to all instrs. in a class
-//    InstrRUsageDelta : add/delete resource usage for individual instrs. 
-//    InstrIssueDelta  : add/delete instr. issue info for individual instrs 
-//   
+//    InstrRUsageDelta : add/delete resource usage for individual instrs.
+//    InstrIssueDelta  : add/delete instr. issue info for individual instrs
+//
 //   The last one (InstrRUsage) is the internal representation of
 //   instruction resource usage constructed from the above three.
 //---------------------------------------------------------------------------
@@ -73,18 +73,18 @@
 struct InstrClassRUsage {
   InstrSchedClass schedClass;
   int		totCycles;
-  
+
   // Issue restrictions common to instructions in this class
   unsigned      maxNumIssue;
   bool	        isSingleIssue;
   bool	        breaksGroup;
   CycleCount_t      numBubbles;
-  
+
   // Feasible slots to use for instructions in this class.
   // The size of vector S[] is `numSlots'.
   unsigned      numSlots;
   unsigned      feasibleSlots[MAX_NUM_SLOTS];
-  
+
   // Resource usages common to instructions in this class.
   // The size of vector V[] is `numRUEntries'.
   unsigned      numRUEntries;
@@ -104,7 +104,7 @@
 
 // Specify instruction issue restrictions for individual instructions
 // that differ from the common rules for the class.
-// 
+//
 struct InstrIssueDelta {
   MachineOpCode	opCode;
   bool		isSingleIssue;
@@ -115,19 +115,19 @@
 
 struct InstrRUsage {
   bool		sameAsClass;
-  
+
   // Issue restrictions for this instruction
   bool		isSingleIssue;
   bool		breaksGroup;
   CycleCount_t	numBubbles;
-  
+
   // Feasible slots to use for this instruction.
   std::vector<bool> feasibleSlots;
-  
+
   // Resource usages for this instruction, with one resource vector per cycle.
   CycleCount_t	numCycles;
   std::vector<std::vector<resourceId_t> > resourcesByCycle;
-  
+
 private:
   // Conveniences for initializing this structure
   void setTo(const InstrClassRUsage& classRU);
@@ -143,22 +143,22 @@
   void setMaxSlots	(int maxNumSlots) {
     feasibleSlots.resize(maxNumSlots);
   }
-  
+
   friend class TargetSchedInfo;	// give access to these functions
 };
 
 
 //---------------------------------------------------------------------------
-/// TargetSchedInfo - Common interface to machine information for 
+/// TargetSchedInfo - Common interface to machine information for
 /// instruction scheduling
 ///
 class TargetSchedInfo {
 public:
   const TargetMachine& target;
-  
+
   unsigned maxNumIssueTotal;
   int	longestIssueConflict;
-  
+
 protected:
   inline const InstrRUsage& getInstrRUsage(MachineOpCode opCode) const {
     assert(opCode >= 0 && opCode < (int) instrRUsages.size());
@@ -181,19 +181,19 @@
 					 unsigned _numUsageDeltas,
 					 unsigned _numIssueDeltas);
   /*dtor*/ virtual ~TargetSchedInfo() {}
-  
+
   inline const TargetInstrInfo& getInstrInfo() const {
     return *mii;
   }
-  
+
   inline int		getNumSchedClasses()  const {
     return numSchedClasses;
-  }  
-  
+  }
+
   inline  unsigned getMaxNumIssueTotal() const {
     return maxNumIssueTotal;
   }
-  
+
   inline  unsigned getMaxIssueForClass(const InstrSchedClass& sc) const {
     assert(sc < numSchedClasses);
     return classRUsages[sc].maxNumIssue;
@@ -201,14 +201,14 @@
 
   inline InstrSchedClass getSchedClass	(MachineOpCode opCode) const {
     return getInstrInfo().getSchedClass(opCode);
-  } 
-  
+  }
+
   inline  bool	instrCanUseSlot		(MachineOpCode opCode,
 					 unsigned s) const {
     assert(s < getInstrRUsage(opCode).feasibleSlots.size() && "Invalid slot!");
     return getInstrRUsage(opCode).feasibleSlots[s];
   }
-  
+
   inline int	getLongestIssueConflict	() const {
     return longestIssueConflict;
   }
@@ -229,15 +229,15 @@
   inline  bool	isSingleIssue		(MachineOpCode opCode) const {
     return getInstrRUsage(opCode).isSingleIssue;
   }
-  
+
   inline  bool	breaksIssueGroup	(MachineOpCode opCode) const {
     return getInstrRUsage(opCode).breaksGroup;
   }
-  
+
   inline  unsigned numBubblesAfter	(MachineOpCode opCode) const {
     return getInstrRUsage(opCode).numBubbles;
   }
-  
+
   inline unsigned getCPUResourceNum(int rd)const{
     for(unsigned i=0;i<resourceNumVector.size();i++){
       if(resourceNumVector[i].first == rd) return resourceNumVector[i].second;
@@ -245,25 +245,25 @@
     assert( 0&&"resource not found");
     return 0;
   }
-  
+
 
 protected:
   virtual void	initializeResources	();
-  
+
 private:
   void computeInstrResources(const std::vector<InstrRUsage>& instrRUForClasses);
   void computeIssueGaps(const std::vector<InstrRUsage>& instrRUForClasses);
-  
+
   void setGap(int gap, MachineOpCode fromOp, MachineOpCode toOp) {
     std::vector<int>& toGaps = issueGaps[fromOp];
     if (toOp >= (int) toGaps.size())
       toGaps.resize(toOp+1);
     toGaps[toOp] = gap;
   }
-  
+
 public:
   std::vector<std::pair<int,int> > resourceNumVector;
-  
+
 protected:
   unsigned	           numSchedClasses;
   const TargetInstrInfo*   mii;
@@ -272,7 +272,7 @@
   const InstrIssueDelta*   issueDeltas;	        // raw array [1:numIssueDeltas]
   unsigned 		   numUsageDeltas;
   unsigned 		   numIssueDeltas;
-  
+
   std::vector<InstrRUsage> instrRUsages;    // indexed by opcode
   std::vector<std::vector<int> > issueGaps; // indexed by [opcode1][opcode2]
   std::vector<std::vector<MachineOpCode> >
@@ -281,7 +281,7 @@
 
   friend class ModuloSchedulingPass;
   friend class MSSchedule;
-  
+
 };
 
 } // End llvm namespace






More information about the llvm-commits mailing list