[llvm] [TargetParser] Increase MAX_SUBTARGET_FEATURES to 384 (PR #144326)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 16 03:15:15 PDT 2025


https://github.com/wangpc-pp created https://github.com/llvm/llvm-project/pull/144326

There are 314 features in RISC-V backend, which is about to exceed
the maxinum 320 as there are some ongoing new extensions.

We increase the `MAX_SUBTARGET_FEATURES` to 384 so that we won't
surprise anyone.


>From b64eb5581730ae5a465c0831f8aef3cb6dd63a57 Mon Sep 17 00:00:00 2001
From: Pengcheng Wang <wangpengcheng.pp at bytedance.com>
Date: Mon, 16 Jun 2025 16:58:25 +0800
Subject: [PATCH] [TargetParser] Increase MAX_SUBTARGET_FEATURES to 384

There are 314 features in RISC-V backend, which is about to exceed
the maxinum 320 as there are some ongoing new extensions.

We increase the `MAX_SUBTARGET_FEATURES` to 384 so that we won't
surprise anyone.
---
 llvm/include/llvm/TargetParser/SubtargetFeature.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/TargetParser/SubtargetFeature.h b/llvm/include/llvm/TargetParser/SubtargetFeature.h
index 6f1723dec5d04..cdcfcdd0e802e 100644
--- a/llvm/include/llvm/TargetParser/SubtargetFeature.h
+++ b/llvm/include/llvm/TargetParser/SubtargetFeature.h
@@ -32,7 +32,7 @@ namespace llvm {
 class raw_ostream;
 class Triple;
 
-const unsigned MAX_SUBTARGET_WORDS = 5;
+const unsigned MAX_SUBTARGET_WORDS = 6;
 const unsigned MAX_SUBTARGET_FEATURES = MAX_SUBTARGET_WORDS * 64;
 
 /// Container class for subtarget features.



More information about the llvm-commits mailing list