blob: 368cbee7f0af050593ce2231aa06ca98e5545253 (
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
28
29
|
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef RCC_CODEGEN_REGALLOCPBQP_H
#define RCC_CODEGEN_REGALLOCPBQP_H
#include "rcc/CodeGen/RegAllocCommon.h"
#include "rcc/CodeGen/TargetRegisterAllocationInfo.h"
namespace rcc {
class PBQPAllocatorPass final : public MachineFunctionPass {
public:
explicit PBQPAllocatorPass(const TargetRegisterAllocationInfo &Info,
RegisterAllocationOptions Options = {}) noexcept
: Info(&Info), Options(Options) {}
[[nodiscard]] const MachinePassContract &contract() const noexcept override;
[[nodiscard]] Expected<MachinePassResult> run(MachineFunction &Function,
const TargetDescription &Target,
MachineAnalysisManager &Analyses) override;
private:
const TargetRegisterAllocationInfo *Info;
RegisterAllocationOptions Options;
};
} // namespace rcc
#endif // RCC_CODEGEN_REGALLOCPBQP_H
|