blob: 4d9f556d11f3ef6e95772bc479b510e69d8ce92a (
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
30
31
32
33
34
35
36
37
38
39
40
|
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef RCC_CODEGEN_TARGETPSEUDOEXPANSION_H
#define RCC_CODEGEN_TARGETPSEUDOEXPANSION_H
#include "rcc/Support/Error.h"
#include <cstdint>
namespace rcc {
class MachineFunction;
class MachineInstr;
class TargetDescription;
enum class MachinePseudoExpansionPhase : std::uint8_t {
PrePEI,
PostRA,
TargetLate,
};
class TargetPseudoExpansionInfo {
public:
virtual ~TargetPseudoExpansionInfo() = default;
[[nodiscard]] virtual Expected<bool> preparePostRAPseudo(MachineInstr &, MachineFunction &,
const TargetDescription &) const {
return false;
}
[[nodiscard]] virtual Expected<bool> expandPseudo(MachineInstr &, MachinePseudoExpansionPhase,
MachineFunction &,
const TargetDescription &) const {
return false;
}
};
} // namespace rcc
#endif // RCC_CODEGEN_TARGETPSEUDOEXPANSION_H
|