[llvm] r353741 - [globalisel] Restore comment explaining the nits of GISelChangeObserver::createdInstr()
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 11 12:05:49 PST 2019
Date: Mon Feb 11 12:05:49 2019
New Revision: 353741
[globalisel] Restore comment explaining the nits of GISelChangeObserver::createdInstr()
--- llvm/trunk/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h (original)
+++ llvm/trunk/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h Mon Feb 11 12:05:49 2019
@@ -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;
More information about the llvm-commits