blob: 7e84764f7df7252f7c64432ddbed7585d15fafd6 (
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
|
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef RCC_LIB_TARGET_RISCV_GISEL_RISCVLEGALIZERINFO_H
#define RCC_LIB_TARGET_RISCV_GISEL_RISCVLEGALIZERINFO_H
#include "rcc/CodeGen/GlobalISel/LegalizerInfo.h"
namespace rcc::riscv {
class RISCVSubtarget;
class RISCVLegalizerInfo final : public LegalizerInfo {
public:
explicit RISCVLegalizerInfo(const RISCVSubtarget &Subtarget);
[[nodiscard]] Expected<void> legalizeCustom(LegalizerHelper &Helper, MachineInstr &Instruction,
const LegalizationDecision &Decision) const override;
[[nodiscard]] Expected<bool> legalizeIntrinsic(LegalizerHelper &Helper,
MachineInstr &Instruction) const override;
[[nodiscard]] bool isSExtCheaperThanZExt(LowLevelType SourceType,
LowLevelType DestinationType) const override;
};
} // namespace rcc::riscv
#endif // RCC_LIB_TARGET_RISCV_GISEL_RISCVLEGALIZERINFO_H
|