1 | //===- llvm/CodeGen/MachineBlockPlacement.h ---------------------*- C++ -*-===// |
---|---|
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLVM_CODEGEN_MACHINEBLOCKPLACEMENT_H |
10 | #define LLVM_CODEGEN_MACHINEBLOCKPLACEMENT_H |
11 | |
12 | #include "llvm/CodeGen/MachinePassManager.h" |
13 | |
14 | namespace llvm { |
15 | |
16 | class MachineBlockPlacementPass |
17 | : public PassInfoMixin<MachineBlockPlacementPass> { |
18 | |
19 | bool AllowTailMerge = true; |
20 | |
21 | public: |
22 | MachineBlockPlacementPass(bool AllowTailMerge) |
23 | : AllowTailMerge(AllowTailMerge) {} |
24 | PreservedAnalyses run(MachineFunction &MF, |
25 | MachineFunctionAnalysisManager &MFAM); |
26 | static bool isRequired() { return true; } |
27 | |
28 | void |
29 | printPipeline(raw_ostream &OS, |
30 | function_ref<StringRef(StringRef)> MapClassName2PassName) const; |
31 | }; |
32 | |
33 | class MachineBlockPlacementStatsPass |
34 | : public PassInfoMixin<MachineBlockPlacementStatsPass> { |
35 | |
36 | public: |
37 | PreservedAnalyses run(MachineFunction &MF, |
38 | MachineFunctionAnalysisManager &MFAM); |
39 | static bool isRequired() { return true; } |
40 | }; |
41 | |
42 | } // namespace llvm |
43 | |
44 | #endif // LLVM_CODEGEN_MACHINEBLOCKPLACEMENT_H |
45 |