diff options
author | paperchalice <liujunchang97@outlook.com> | 2024-04-30 09:54:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 09:54:48 +0800 |
commit | 6ea0c0a28343b2676baf480db490b5a27fa11d7c (patch) | |
tree | f00243ace9e105d4acf60987f9a218b0809ac8af /llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | |
parent | b1867e18c346e9621e14270bea2d1acb7d2a9ce0 (diff) | |
download | llvm-6ea0c0a28343b2676baf480db490b5a27fa11d7c.zip llvm-6ea0c0a28343b2676baf480db490b5a27fa11d7c.tar.gz llvm-6ea0c0a28343b2676baf480db490b5a27fa11d7c.tar.bz2 |
[NewPM][CodeGen] Add `MachineFunctionAnalysis` (#88610)
In new pass system, `MachineFunction` could be an analysis result again,
machine module pass can now fetch them from analysis manager.
`MachineModuleInfo` no longer owns them.
Remove `FreeMachineFunctionPass`, replaced by
`InvalidateAnalysisPass<MachineFunctionAnalysis>`.
Now `FreeMachineFunction` is replaced by
`InvalidateAnalysisPass<MachineFunctionAnalysis>`, the workaround in
`MachineFunctionPassManager` is no longer needed, there is no difference
between `unittests/MIR/PassBuilderCallbacksTest.cpp` and
`unittests/IR/PassBuilderCallbacksTest.cpp`.
Diffstat (limited to 'llvm/lib/CodeGen/DeadMachineInstructionElim.cpp')
-rw-r--r-- | llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp index facc0145..578854c 100644 --- a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp +++ b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp @@ -68,7 +68,7 @@ DeadMachineInstructionElimPass::run(MachineFunction &MF, MachineFunctionAnalysisManager &) { if (!DeadMachineInstructionElimImpl().runImpl(MF)) return PreservedAnalyses::all(); - PreservedAnalyses PA; + PreservedAnalyses PA = getMachineFunctionPassPreservedAnalyses(); PA.preserveSet<CFGAnalyses>(); return PA; } |