aboutsummaryrefslogtreecommitdiff
path: root/backend/include/rcc/MIR/ReachingDefPrinter.h
blob: 8b4d1e09ee987f813f0114effe51bb417985ba36 (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
// SPDX-License-Identifier: GPL-3.0-or-later

#ifndef RCC_MIR_REACHINGDEFPRINTER_H
#define RCC_MIR_REACHINGDEFPRINTER_H

#include "rcc/CodeGen/MachinePassManager.h"

#include <string_view>

namespace rcc::mir {

class ReachingDefPrinterPass final : public MachineFunctionPass {
public:
  [[nodiscard]] static constexpr std::string_view name() noexcept {
    return "print<reaching-def>";
  }

  [[nodiscard]] const MachinePassContract &contract() const noexcept override;
  [[nodiscard]] Expected<MachinePassResult> run(MachineFunction &Function,
                                                const TargetDescription &Target,
                                                MachineFunctionAnalysisManager &Analyses) override;
};

} // namespace rcc::mir

#endif // RCC_MIR_REACHINGDEFPRINTER_H