blob: bb62e8a287b81e0fecd6eaf70461cbaadeeb6175 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef RCC_CODEGEN_MACHINEFALLTHROUGH_H
#define RCC_CODEGEN_MACHINEFALLTHROUGH_H
#include "rcc/CodeGen/MachinePassManager.h"
namespace rcc {
class TargetInstrInfo;
class MachineFallthroughPass final : public MachineFunctionPass {
public:
explicit MachineFallthroughPass(const TargetInstrInfo &Info) noexcept : Info(&Info) {}
[[nodiscard]] const MachinePassContract &contract() const noexcept override;
[[nodiscard]] Expected<MachinePassResult> run(MachineFunction &Function,
const TargetDescription &Target,
MachineFunctionAnalysisManager &Analyses) override;
private:
const TargetInstrInfo *Info;
};
} // namespace rcc
#endif // RCC_CODEGEN_MACHINEFALLTHROUGH_H
|