[llvm] [Instrumentation] Support MachineFunctionProperties (PR #83668)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 00:20:17 PST 2024
================
@@ -135,4 +135,25 @@ PassManager<MachineFunction>::run(MachineFunction &MF,
return PA;
}
+bool PassInstrumentation::runBeforeMachineFunctionPass(
+ const detail::MachinePassConcept &Pass, MachineFunction &MF) const {
+ bool ShouldRun = runBeforePass(Pass, MF);
+ if (!ShouldRun)
+ return false;
+
+ if (Callbacks)
+ for (auto &C : Callbacks->BeforeNonSkippedMachineFunctionPassCallbacks)
+ C(Pass, MF);
----------------
arsenm wrote:
```suggestion
if (Callbacks) {
for (auto &C : Callbacks->BeforeNonSkippedMachineFunctionPassCallbacks)
C(Pass, MF);
}
```
https://github.com/llvm/llvm-project/pull/83668
More information about the llvm-commits
mailing list