Use -> instead of (*iter).
[oota-llvm.git] / lib / CodeGen / DFAPacketizer.cpp
index f80f16055b67ce3846151b64854ac06c8a407c6e..16276bda3762ac468dfad80f54bed96c29dc1eec 100644 (file)
 using namespace llvm;
 
 DFAPacketizer::DFAPacketizer(const InstrItineraryData *I, const int (*SIT)[2],
-                             const unsignedSET):
+                             const unsigned *SET):
   InstrItins(I), CurrentState(0), DFAStateInputTable(SIT),
   DFAStateEntryTable(SET) {}
 
 
 //
-// ReadTable - Read the DFA transition table and update CachedTable
+// ReadTable - Read the DFA transition table and update CachedTable.
 //
 // Format of the transition tables:
 // DFAStateInputTable[][2] = pairs of <Input, Transition> for all valid
@@ -47,7 +47,7 @@ void DFAPacketizer::ReadTable(unsigned int state) {
   unsigned ThisState = DFAStateEntryTable[state];
   unsigned NextStateInTable = DFAStateEntryTable[state+1];
   // Early exit in case CachedTable has already contains this
-  // state's transitions
+  // state's transitions.
   if (CachedTable.count(UnsignPair(state,
                                    DFAStateInputTable[ThisState][0])))
     return;
@@ -59,10 +59,10 @@ void DFAPacketizer::ReadTable(unsigned int state) {
 
 
 // canReserveResources - Check if the resources occupied by a MCInstrDesc
-// are available in the current state
-bool DFAPacketizer::canReserveResources(const llvm::MCInstrDescMID) {
+// are available in the current state.
+bool DFAPacketizer::canReserveResources(const llvm::MCInstrDesc *MID) {
   unsigned InsnClass = MID->getSchedClass();
-  const llvm::InstrStageIS = InstrItins->beginStage(InsnClass);
+  const llvm::InstrStage *IS = InstrItins->beginStage(InsnClass);
   unsigned FuncUnits = IS->getUnits();
   UnsignPair StateTrans = UnsignPair(CurrentState, FuncUnits);
   ReadTable(CurrentState);
@@ -71,10 +71,10 @@ bool DFAPacketizer::canReserveResources(const llvm::MCInstrDesc* MID) {
 
 
 // reserveResources - Reserve the resources occupied by a MCInstrDesc and
-// change the current state to reflect that change
-void DFAPacketizer::reserveResources(const llvm::MCInstrDescMID) {
+// change the current state to reflect that change.
+void DFAPacketizer::reserveResources(const llvm::MCInstrDesc *MID) {
   unsigned InsnClass = MID->getSchedClass();
-  const llvm::InstrStageIS = InstrItins->beginStage(InsnClass);
+  const llvm::InstrStage *IS = InstrItins->beginStage(InsnClass);
   unsigned FuncUnits = IS->getUnits();
   UnsignPair StateTrans = UnsignPair(CurrentState, FuncUnits);
   ReadTable(CurrentState);
@@ -84,15 +84,15 @@ void DFAPacketizer::reserveResources(const llvm::MCInstrDesc* MID) {
 
 
 // canReserveResources - Check if the resources occupied by a machine
-// instruction are available in the current state
-bool DFAPacketizer::canReserveResources(llvm::MachineInstrMI) {
-  const llvm::MCInstrDescMID = MI->getDesc();
+// instruction are available in the current state.
+bool DFAPacketizer::canReserveResources(llvm::MachineInstr *MI) {
+  const llvm::MCInstrDesc &MID = MI->getDesc();
   return canReserveResources(&MID);
 }
 
 // reserveResources - Reserve the resources occupied by a machine
-// instruction and change the current state to reflect that change
-void DFAPacketizer::reserveResources(llvm::MachineInstrMI) {
-  const llvm::MCInstrDescMID = MI->getDesc();
+// instruction and change the current state to reflect that change.
+void DFAPacketizer::reserveResources(llvm::MachineInstr *MI) {
+  const llvm::MCInstrDesc &MID = MI->getDesc();
   reserveResources(&MID);
 }