[llvm] [llvm][MC] Add public getAllProcessorFeatures() (PR #66582)
Balint Cristian via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 16 10:56:10 PDT 2023
https://github.com/cbalint13 updated https://github.com/llvm/llvm-project/pull/66582
>From 127a220f1caf3c645461ce556f3f8c3df1286b85 Mon Sep 17 00:00:00 2001
From: Balint Cristian <cristian.balint at gmail.com>
Date: Sat, 16 Sep 2023 20:55:44 +0300
Subject: [PATCH] [llvm][MC] Add public getAllProcessorFeatures()
Signed-off-by: Balint Cristian <cristian.balint at gmail.com>
---
llvm/include/llvm/MC/MCSubtargetInfo.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/llvm/include/llvm/MC/MCSubtargetInfo.h b/llvm/include/llvm/MC/MCSubtargetInfo.h
index c1533ac8d0059f5..e8ca9aa2cd88705 100644
--- a/llvm/include/llvm/MC/MCSubtargetInfo.h
+++ b/llvm/include/llvm/MC/MCSubtargetInfo.h
@@ -230,10 +230,16 @@ class MCSubtargetInfo {
return Found != ProcDesc.end() && StringRef(Found->Key) == CPU;
}
+ // Return processor descriptions.
ArrayRef<SubtargetSubTypeKV> getAllProcessorDescriptions() const {
return ProcDesc;
}
+ // Return processor features.
+ ArrayRef<SubtargetFeatureKV> getAllProcessorFeatures() const {
+ return ProcFeatures;
+ }
+
virtual unsigned getHwMode() const { return 0; }
/// Return the cache size in bytes for the given level of cache.
More information about the llvm-commits
mailing list