diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-19 03:08:38 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-19 03:08:38 +0800 |
| commit | c0f2700e0c7effc5da267bf501232ff4bfea63bc (patch) | |
| tree | b49a36959213dc3919a138981d8347ed22b9a31b /backend/lib/Target/RISCV/GISel | |
| parent | 0461d2ba6bf1aedbd0d39e5da4daf90137bf61a7 (diff) | |
| download | rcc-project-c0f2700e0c7effc5da267bf501232ff4bfea63bc.tar.gz rcc-project-c0f2700e0c7effc5da267bf501232ff4bfea63bc.tar.xz | |
[RISCV][GlobalISel] Generate trap selection
Diffstat (limited to 'backend/lib/Target/RISCV/GISel')
| -rw-r--r-- | backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp b/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp index 379360b..dd63743 100644 --- a/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp +++ b/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp @@ -522,9 +522,6 @@ public: case GenericOpcode::G_ATOMICRMW_UMIN: case GenericOpcode::G_FENCE: case GenericOpcode::G_BRINDIRECT: - case GenericOpcode::G_TRAP: - case GenericOpcode::G_DEBUGTRAP: - case GenericOpcode::G_UBSANTRAP: case GenericOpcode::G_PHI: return {}; default: @@ -599,10 +596,6 @@ public: return selectAtomicRMW(Instruction, Function, Target, Type, Generic); case GenericOpcode::G_FENCE: return selectFence(Instruction); - case GenericOpcode::G_TRAP: - case GenericOpcode::G_DEBUGTRAP: - case GenericOpcode::G_UBSANTRAP: - return selectTrap(Instruction); case GenericOpcode::G_PHI: return Instruction.setOpcode(opcode(GenericOpcode::PHI)); case GenericOpcode::COPY: @@ -1158,15 +1151,6 @@ private: return Instruction.setOpcode(instructionOpcode(InstructionOpcode::FENCE)); } - [[nodiscard]] Expected<void> selectTrap(MachineInstr &Instruction) const { - while (Instruction.operandCount() != 0) { - auto Erased = Instruction.eraseOperand(Instruction.operandCount() - 1U); - if (!Erased) - return std::unexpected(Erased.error()); - } - return Instruction.setOpcode(instructionOpcode(InstructionOpcode::EBREAK)); - } - [[nodiscard]] Expected<void> selectLoad(MachineInstr &Instruction, MachineFunction &Function, std::optional<LowLevelType> Type) const { if (!Type) |
