From 8a4bb6e3b0bffa0ed79b51347b12ee4293b622a7 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Sat, 22 Aug 2026 18:49:08 +0800 Subject: [CodeGen] Generate RISC-V macro fusion rules --- .../lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp') 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 - createGOTLoad(MachineFunction &Function, LowLevelType Type) const { + [[nodiscard]] Expected 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 - selectGlobalAddress(MachineInstr &Instruction, MachineFunction &Function, - const TargetDescription &Target) const { + [[nodiscard]] Expected 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 { auto SetOpcode = Instruction.setOpcode(instructionOpcode(OpcodeValue)); if (!SetOpcode) -- cgit v1.2.3