[llvm] [Instrumentation] Support MachineFunction in ChangeReporter (PR #80946)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 17:47:45 PST 2024


================
@@ -409,6 +435,10 @@ template <typename T>
 void ChangeReporter<T>::handleInvalidatedPass(StringRef PassID) {
   assert(!BeforeStack.empty() && "Unexpected empty stack encountered.");
 
+  // Prepare to process the next MIR.
+  if (PassID == FreeMachineFunctionPass::name())
----------------
paperchalice wrote:

It's hard to determine when the initial MIR for a function is created. If the input is general LLVM IR and the pipeline is not interrupted by a module pass then new machine function will not be created until `FreeMachineFunction`, which is the initial MIR for the next function.

https://github.com/llvm/llvm-project/pull/80946


More information about the llvm-commits mailing list