From 864a29abbdce86353ec91c3587757711d3a42f10 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Sun, 16 Aug 2026 17:28:49 +0800 Subject: [RISCV][GlobalISel] Generate integer comparisons --- backend/include/rcc/TableGen/Record.h | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'backend/include/rcc/TableGen/Record.h') diff --git a/backend/include/rcc/TableGen/Record.h b/backend/include/rcc/TableGen/Record.h index 4378af8..57e5832 100644 --- a/backend/include/rcc/TableGen/Record.h +++ b/backend/include/rcc/TableGen/Record.h @@ -237,17 +237,40 @@ struct SourceSelectionIntegerPredicate final { struct SourceSelectionOperandDefConstantPredicate final { std::uint32_t OperandIndex = 0; - std::int64_t Value = 0; + struct ConstantRange final { + std::int64_t Minimum = 0; + std::int64_t Maximum = 0; + TextRange SourceRange; + }; + + std::vector Ranges; + TextRange Range; +}; + +struct SourceSelectionTemporary final { + std::string Symbol; + std::uint32_t TypeFromOperand = 0; TextRange Range; }; struct SourceSelectionOperandRenderer final { std::optional OperandIndex; std::string PhysicalRegisterSymbol; + std::string TemporarySymbol; + std::optional CapturedImmediateOperand; + std::optional Immediate; + std::string ImmediateTransform; std::vector Flags; TextRange Range; }; +struct SourceSelectionAction final { + std::string ResultOpcodeSymbol; + bool ReplacesRoot = false; + std::vector OperandRenderers; + TextRange Range; +}; + struct SourceSelectionRule final { std::string Symbol; std::uint32_t Priority = 0; @@ -258,9 +281,8 @@ struct SourceSelectionRule final { std::vector OperandBanks; std::vector OperandClasses; std::vector OperandDefConstants; - std::string ResultOpcodeSymbol; - std::optional> OperandRenderers; - std::vector AppendedImmediates; + std::vector Temporaries; + std::vector Actions; std::vector EraseOperandDefinitions; TextRange Range; }; -- cgit v1.2.3