diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-22 18:49:08 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-22 18:49:08 +0800 |
| commit | 8a4bb6e3b0bffa0ed79b51347b12ee4293b622a7 (patch) | |
| tree | 51278f18d8954e7abb5820cb9d529e3d5e5f322b /backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp | |
| parent | 9ca9fb23124e8c5d714e9668210855a23dd2a72f (diff) | |
| download | rcc-project-8a4bb6e3b0bffa0ed79b51347b12ee4293b622a7.tar.gz rcc-project-8a4bb6e3b0bffa0ed79b51347b12ee4293b622a7.tar.xz | |
[CodeGen] Generate RISC-V macro fusion rules
Diffstat (limited to 'backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp')
| -rw-r--r-- | backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp b/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp index 094f9cb..ca702ed 100644 --- a/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp +++ b/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp @@ -5,9 +5,9 @@ #include "RISCVInstrInfo.h" #include "RISCVRegisterBankInfo.h" #include "rcc/CodeGen/GenericOpcodes.h" -#include "rcc/CodeGen/GlobalObject.h" #include "rcc/CodeGen/GlobalISel/GISelValueTracking.h" #include "rcc/CodeGen/GlobalISel/InstructionSelector.h" +#include "rcc/CodeGen/GlobalObject.h" #include "rcc/CodeGen/LowLevelType.h" #include "rcc/CodeGen/MachineBasicBlock.h" #include "rcc/CodeGen/MachineFunction.h" @@ -727,8 +727,8 @@ public: } private: - [[nodiscard]] Expected<const MachineMemOperand *> - createGOTLoad(MachineFunction &Function, LowLevelType Type) const { + [[nodiscard]] Expected<const MachineMemOperand *> createGOTLoad(MachineFunction &Function, + LowLevelType Type) const { auto Size = MemorySize::fixed(Type.minimumBitWidth() / 8U); if (!Size) return std::unexpected(Size.error()); @@ -745,9 +745,9 @@ private: return Function.createMemOperand(std::move(Description)); } - [[nodiscard]] Expected<void> - selectGlobalAddress(MachineInstr &Instruction, MachineFunction &Function, - const TargetDescription &Target) const { + [[nodiscard]] Expected<void> selectGlobalAddress(MachineInstr &Instruction, + MachineFunction &Function, + const TargetDescription &Target) const { const MachineOperand *DestinationOperand = Instruction.operandAt(0); const MachineOperand *SymbolOperand = Instruction.operandAt(1); const Register *Destination = @@ -775,8 +775,8 @@ private: } const bool TaggedGlobals = Subtarget.features().has(RISCVSubtargetOption::TaggedGlobals); - const bool UseGOT = Subtarget.relocationModel() == RelocationModel::PositionIndependent || - TaggedGlobals; + const bool UseGOT = + Subtarget.relocationModel() == RelocationModel::PositionIndependent || TaggedGlobals; const auto ReplaceWithPseudo = [&](InstructionOpcode OpcodeValue) -> Expected<void> { auto SetOpcode = Instruction.setOpcode(instructionOpcode(OpcodeValue)); if (!SetOpcode) |
