[llvm] 04fc02e - [RISCV] Don't store CPUKind in CPUInfo. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon May 1 15:26:45 PDT 2023
Author: Craig Topper
Date: 2023-05-01T15:26:17-07:00
New Revision: 04fc02e583b06b846315904a55af9c273c8b20b9
URL: https://github.com/llvm/llvm-project/commit/04fc02e583b06b846315904a55af9c273c8b20b9
DIFF: https://github.com/llvm/llvm-project/commit/04fc02e583b06b846315904a55af9c273c8b20b9.diff
LOG: [RISCV] Don't store CPUKind in CPUInfo. NFC
This field is never used today. If you have a pointer to the row
you can find the CPUKind by subtracting the pointer from the start
of the array.
Added:
Modified:
llvm/lib/TargetParser/RISCVTargetParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/TargetParser/RISCVTargetParser.cpp b/llvm/lib/TargetParser/RISCVTargetParser.cpp
index 22b52357c197..30a1023c0673 100644
--- a/llvm/lib/TargetParser/RISCVTargetParser.cpp
+++ b/llvm/lib/TargetParser/RISCVTargetParser.cpp
@@ -27,14 +27,13 @@ enum CPUKind : unsigned {
struct CPUInfo {
StringLiteral Name;
- CPUKind Kind;
StringLiteral DefaultMarch;
bool is64Bit() const { return DefaultMarch.starts_with("rv64"); }
};
constexpr CPUInfo RISCVCPUInfo[] = {
#define PROC(ENUM, NAME, DEFAULT_MARCH) \
- {NAME, CK_##ENUM, DEFAULT_MARCH},
+ {NAME, DEFAULT_MARCH},
#include "llvm/TargetParser/RISCVTargetParserDef.inc"
};
More information about the llvm-commits
mailing list