]> granicus.if.org Git - llvm/commitdiff
[globalisel] Restore comment explaining the nits of GISelChangeObserver::createdInstr()
authorDaniel Sanders <daniel_l_sanders@apple.com>
Mon, 11 Feb 2019 20:05:49 +0000 (20:05 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Mon, 11 Feb 2019 20:05:49 +0000 (20:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353741 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h

index a2876b621279ce9c7f3c19d73ac424ef389812e6..e5691cb35174a347293741a76d1e77b4b9e8082f 100644 (file)
@@ -33,10 +33,17 @@ public:
 
   /// An instruction is about to be erased.
   virtual void erasingInstr(MachineInstr &MI) = 0;
-  /// An instruction was created and inserted into the function.
+
+  /// An instruction has been created and inserted into the function.
+  /// Note that the instruction might not be a fully fledged instruction at this
+  /// point and won't be if the MachineFunction::Delegate is calling it. This is
+  /// because the delegate only sees the construction of the MachineInstr before
+  /// operands have been added.
   virtual void createdInstr(MachineInstr &MI) = 0;
+
   /// This instruction is about to be mutated in some way.
   virtual void changingInstr(MachineInstr &MI) = 0;
+
   /// This instruction was mutated in some way.
   virtual void changedInstr(MachineInstr &MI) = 0;