Clean up code a bit.
[oota-llvm.git] / lib / Target / X86 / X86RegisterInfo.h
index 711bfe11ebc6e5273bbcc49343d9381403ea667a..b67091cd404e853af554f4ea4a7afe279073c1e1 100644 (file)
@@ -42,10 +42,16 @@ struct X86RegisterInfo : public X86GenRegisterInfo {
                   unsigned DestReg, unsigned SrcReg,
                   const TargetRegisterClass *RC) const;
 
-  virtual bool canFoldMemoryOperand(MachineInstr* MI, unsigned i) const;
+  /// foldMemoryOperand - If this target supports it, fold a load or store of
+  /// the specified stack slot into the specified machine instruction for the
+  /// specified operand.  If this is possible, the target should perform the
+  /// folding and return true, otherwise it should return false.  If it folds
+  /// the instruction, it is likely that the MachineInstruction the iterator
+  /// references has been changed.
+  virtual MachineInstr* foldMemoryOperand(MachineInstr* MI,
+                                          unsigned OpNum,
+                                          int FrameIndex) const;
 
-  virtual int foldMemoryOperand(MachineInstr* MI, unsigned i,
-                                int FrameIndex) const;
 
   void eliminateCallFramePseudoInstr(MachineFunction &MF,
                                      MachineBasicBlock &MBB,