aboutsummaryrefslogtreecommitdiff
path: root/backend/include/rcc
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-19 03:41:05 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-19 03:41:05 +0800
commit219b315373ef34ca20cc78b89bf3c3d19442ffbd (patch)
treee65feacb93b93fee1d591486b97573ce7b78b85e /backend/include/rcc
parent3cc064e41f6913b176fbfb2d6e65d049f611b1d4 (diff)
downloadrcc-project-219b315373ef34ca20cc78b89bf3c3d19442ffbd.tar.gz
rcc-project-219b315373ef34ca20cc78b89bf3c3d19442ffbd.tar.xz
[RISCV][GlobalISel] Generate integer load selection
Diffstat (limited to 'backend/include/rcc')
-rw-r--r--backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h1
-rw-r--r--backend/include/rcc/TableGen/Record.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h b/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h
index a8b4f44..31966fe 100644
--- a/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h
+++ b/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h
@@ -38,6 +38,7 @@ enum class GIMatchTableOpcode : std::uint8_t {
CheckOperandClass,
CheckIntegerPredicate,
CheckFloatingPredicate,
+ CheckMemorySize,
CheckTargetPredicate,
CheckOperandImmediateRanges,
CheckOperandDefConstantRanges,
diff --git a/backend/include/rcc/TableGen/Record.h b/backend/include/rcc/TableGen/Record.h
index 7039d9d..b5abc23 100644
--- a/backend/include/rcc/TableGen/Record.h
+++ b/backend/include/rcc/TableGen/Record.h
@@ -247,6 +247,12 @@ struct SourceSelectionTargetPredicate final {
TextRange Range;
};
+struct SourceSelectionMemoryPredicate final {
+ std::uint32_t MemoryOperandIndex = 0;
+ std::uint32_t Bytes = 0;
+ TextRange Range;
+};
+
struct SourceSelectionConstantRange final {
std::int64_t Minimum = 0;
std::int64_t Maximum = 0;
@@ -314,6 +320,7 @@ struct SourceSelectionRule final {
std::optional<SourceSelectionTypePredicate> ResultType;
std::optional<SourceSelectionIntegerPredicate> IntegerPredicate;
std::optional<SourceSelectionFloatingPredicate> FloatingPredicate;
+ std::optional<SourceSelectionMemoryPredicate> MemoryPredicate;
std::vector<SourceSelectionTargetPredicate> TargetPredicates;
std::vector<SourceSelectionOperandTypePredicate> OperandTypes;
std::vector<SourceSelectionOperandBankPredicate> OperandBanks;