Add a bit of documentation to copyPhysReg.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 29 Aug 2012 23:52:55 +0000 (23:52 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 29 Aug 2012 23:52:55 +0000 (23:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162879 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetInstrInfo.h

index 44953a287ad9f8cb09062201ac23ec6184aace87..d7cc1cf45a6cd8d47dcaa122cef050126d1969df 100644 (file)
@@ -459,6 +459,13 @@ public:
   }
 
   /// copyPhysReg - Emit instructions to copy a pair of physical registers.
   }
 
   /// copyPhysReg - Emit instructions to copy a pair of physical registers.
+  ///
+  /// This function should support copies within any legal register class as
+  /// well as any cross-class copies created during instruction selection.
+  ///
+  /// The source and destination registers may overlap, which may require a
+  /// careful implementation when multiple copy instructions are required for
+  /// large registers. See for example the ARM target.
   virtual void copyPhysReg(MachineBasicBlock &MBB,
                            MachineBasicBlock::iterator MI, DebugLoc DL,
                            unsigned DestReg, unsigned SrcReg,
   virtual void copyPhysReg(MachineBasicBlock &MBB,
                            MachineBasicBlock::iterator MI, DebugLoc DL,
                            unsigned DestReg, unsigned SrcReg,