diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-15 03:36:58 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-15 03:36:58 +0800 |
| commit | 5e2a50330a643b4580a94b68b1d68107ec4e1e87 (patch) | |
| tree | f7116245d9c538588a875128522f43a59c78dba3 /backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h | |
| parent | 2eb438cac7bdd3abb43ae1a784e8eb20d77cf7b7 (diff) | |
| download | rcc-project-5e2a50330a643b4580a94b68b1d68107ec4e1e87.tar.gz rcc-project-5e2a50330a643b4580a94b68b1d68107ec4e1e87.tar.xz | |
[GlobalISel] Lower integer operations to libcalls
Diffstat (limited to 'backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h')
| -rw-r--r-- | backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h b/backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h index 9ad66a2..39304ba 100644 --- a/backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h +++ b/backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h @@ -15,6 +15,7 @@ namespace rcc { class MachineFunction; class MachineInstr; class GISelChangeObserver; +struct LibcallLoweringInfo; class LegalizerHelper final { public: @@ -22,7 +23,8 @@ public: GISelChangeObserver &Observer; LegalizerHelper(MachineFunction &Function, const LegalizerInfo &Info, - GISelChangeObserver &Observer, MachineIRBuilder &MIRBuilder); + GISelChangeObserver &Observer, MachineIRBuilder &MIRBuilder, + const LibcallLoweringInfo *Libcalls = nullptr); [[nodiscard]] Expected<void> legalize(MachineInstr &Instruction, const LegalizationDecision &Decision); @@ -35,6 +37,7 @@ public: [[nodiscard]] Expected<void> lowerThreewayCompare(MachineInstr &Instruction); [[nodiscard]] Expected<void> lowerRotate(MachineInstr &Instruction); [[nodiscard]] Expected<void> lowerVAArg(MachineInstr &Instruction); + [[nodiscard]] Expected<void> libcall(MachineInstr &Instruction); [[nodiscard]] Expected<void> widenScalar(MachineInstr &Instruction, std::size_t TypeIndex, LowLevelType WideType); [[nodiscard]] Expected<void> widenScalarSrc(MachineInstr &Instruction, LowLevelType WideType, @@ -118,6 +121,7 @@ private: MachineFunction &Function; MachineRegisterInfo &MRI; const LegalizerInfo &Info; + const LibcallLoweringInfo *Libcalls = nullptr; }; } // namespace rcc |
