Add comments.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 7 Jan 2010 00:51:04 +0000 (00:51 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 7 Jan 2010 00:51:04 +0000 (00:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92883 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineFunction.h
include/llvm/Target/TargetInstrInfo.h
test/CodeGen/Thumb2/2010-01-06-TailDuplicateLabels.ll

index f1bfa014585e6ba2272f71fba7490297f993f94c..a12a55aefcfc47b15d6debbcd25691ea61277607 100644 (file)
@@ -315,6 +315,8 @@ public:
   /// 'Orig' instruction, identical in all ways except the the instruction
   /// has no parent, prev, or next.
   ///
+  /// See also TargetInstrInfo::duplicate() for target-specific fixes to cloned
+  /// instructions.
   MachineInstr *CloneMachineInstr(const MachineInstr *Orig);
 
   /// DeleteMachineInstr - Delete the given MachineInstr.
index f7798018b5aeb099dd6b0dc900c8b1850dda5e55..0494ffe592461fb841ec55040a737a4ca445e12f 100644 (file)
@@ -235,6 +235,8 @@ public:
   /// duplicate - Create a duplicate of the Orig instruction in MF. This is like
   /// MachineFunction::CloneMachineInstr(), but the target may update operands
   /// that are required to be unique.
+  ///
+  /// The instruction must be duplicable as indicated by isNotDuplicable().
   virtual MachineInstr *duplicate(MachineInstr *Orig,
                                   MachineFunction &MF) const = 0;
 
index a63271515ca1a31d55f526b2d83d94204ec1c3be..6a05df111472fea2fb5115fd586a2b1c3be80100 100644 (file)
@@ -2,6 +2,8 @@
 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32"
 target triple = "thumbv7-apple-darwin10"
 
+; This function produces a duplicate LPC label unless special care is taken when duplicating a t2LDRpci_pic instruction.
+
 %struct.PlatformMutex = type { i32, [40 x i8] }
 %struct.SpinLock = type { %struct.PlatformMutex }
 %"struct.WTF::TCMalloc_ThreadCache" = type { i32, %struct._opaque_pthread_t*, i8, [68 x %"struct.WTF::TCMalloc_ThreadCache_FreeList"], i32, i32, %"struct.WTF::TCMalloc_ThreadCache"*, %"struct.WTF::TCMalloc_ThreadCache"* }