[llvm] [NewPM] Add `FunctionToMachineFunctionPassAdaptor` (PR #88711)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 19:31:49 PDT 2024
================
@@ -69,6 +71,29 @@ bool MachineFunctionAnalysisManagerModuleProxy::Result::invalidate(
return false;
}
+template <>
+bool MachineFunctionAnalysisManagerFunctionProxy::Result::invalidate(
+ Function &F, const PreservedAnalyses &PA,
+ FunctionAnalysisManager::Invalidator &Inv) {
+ // If literally everything is preserved, we're done.
+ if (PA.areAllPreserved())
+ return false; // This is still a valid proxy.
+
+ // If this proxy isn't marked as preserved, then even if the result remains
+ // valid, the key itself may no longer be valid, so we clear everything.
+ //
+ // Once function changed by a non-trivial pass, we need to do instruction
----------------
paperchalice wrote:
This never happened, `MachineOutliner` just only create dummy IR functions to get associated machine functions.
https://github.com/llvm/llvm-project/pull/88711
More information about the llvm-commits
mailing list