aboutsummaryrefslogtreecommitdiff
path: root/backend/utils/TableGen/Common/CodeGenTarget.h
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-16 16:13:12 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-16 16:13:12 +0800
commitca25d25d4c5131491a50b1a94e63e9b2d3c34ed4 (patch)
tree995b2f5e2a1312bced1d899be4fd87f95e49c73b /backend/utils/TableGen/Common/CodeGenTarget.h
parent4f7b41c3c711d6c6fa4e422f3eec8961c91eea7a (diff)
downloadrcc-project-ca25d25d4c5131491a50b1a94e63e9b2d3c34ed4.tar.gz
rcc-project-ca25d25d4c5131491a50b1a94e63e9b2d3c34ed4.tar.xz
[RISCV][GlobalISel] Select comparisons against zero
Diffstat (limited to 'backend/utils/TableGen/Common/CodeGenTarget.h')
-rw-r--r--backend/utils/TableGen/Common/CodeGenTarget.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/backend/utils/TableGen/Common/CodeGenTarget.h b/backend/utils/TableGen/Common/CodeGenTarget.h
index 929d3e7..bee814f 100644
--- a/backend/utils/TableGen/Common/CodeGenTarget.h
+++ b/backend/utils/TableGen/Common/CodeGenTarget.h
@@ -189,17 +189,42 @@ struct NormalizedSelectionOperandClassPredicate final {
std::uint32_t RegClass = 0;
};
+struct NormalizedSelectionIntegerPredicate final {
+ std::uint32_t OperandIndex = 0;
+ std::uint32_t Predicate = 0;
+};
+
+struct NormalizedSelectionOperandDefConstantPredicate final {
+ std::uint32_t OperandIndex = 0;
+ std::int64_t Value = 0;
+};
+
+struct NormalizedSelectionOperandRenderer final {
+ enum class Kind : std::uint8_t {
+ Operand,
+ PhysicalRegister,
+ };
+
+ Kind SourceKind = Kind::Operand;
+ std::uint32_t Value = 0;
+ std::uint16_t Flags = 0;
+};
+
struct NormalizedSelectionRule final {
std::string Symbol;
std::uint32_t Priority = 0;
std::uint32_t Specificity = 0;
std::uint32_t MatchOpcode = 0;
std::optional<NormalizedSelectionTypePredicate> ResultType;
+ std::optional<NormalizedSelectionIntegerPredicate> IntegerPredicate;
std::vector<NormalizedSelectionOperandTypePredicate> OperandTypes;
std::vector<NormalizedSelectionOperandBankPredicate> OperandBanks;
std::vector<NormalizedSelectionOperandClassPredicate> OperandClasses;
+ std::vector<NormalizedSelectionOperandDefConstantPredicate> OperandDefConstants;
std::uint32_t ResultOpcode = 0;
+ std::optional<std::vector<NormalizedSelectionOperandRenderer>> OperandRenderers;
std::vector<std::int64_t> AppendedImmediates;
+ std::vector<std::uint32_t> EraseOperandDefinitions;
};
struct NormalizedTargetModel final {