[RISCV] Move RISCV::RVVBitsPerBlock from TargetParser to Support/RISCVISAInfo.h.
authorCraig Topper <craig.topper@sifive.com>
Sat, 29 Apr 2023 22:04:52 +0000 (15:04 -0700)
committerCraig Topper <craig.topper@sifive.com>
Sat, 29 Apr 2023 22:04:55 +0000 (15:04 -0700)
RISCVTargetParser.h has a dependency on a tablegen generated file.

Using RISCVISAInfo.h instead avoids this dependency.

We just need this constant somewhere visible to the frontend and
backend and I'm trying to avoid adding a header just for it.

clang/lib/AST/ASTContext.cpp
clang/lib/AST/Type.cpp
clang/lib/CodeGen/TargetInfo.cpp
clang/lib/Driver/SanitizerArgs.cpp
clang/lib/Sema/CMakeLists.txt
clang/lib/Sema/SemaType.cpp
llvm/include/llvm/Support/RISCVISAInfo.h
llvm/include/llvm/TargetParser/RISCVTargetParser.h
llvm/lib/Target/RISCV/RISCVISelLowering.h

index 3a72c3d257944e32cc0351c4f1b032b40c317533..c04b056cba78f7e74f7e4e7c440bc303a12e859a 100644 (file)
@@ -85,7 +85,7 @@
 #include "llvm/Support/MD5.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/TargetParser/RISCVTargetParser.h"
+#include "llvm/Support/RISCVISAInfo.h"
 #include "llvm/TargetParser/Triple.h"
 #include <algorithm>
 #include <cassert>
index ed481a4c06962241f6516ca24991f17894c71dbb..20282c08afab58d9f745902d879f6fb3d8acf974 100644 (file)
@@ -46,7 +46,7 @@
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/MathExtras.h"
-#include "llvm/TargetParser/RISCVTargetParser.h"
+#include "llvm/Support/RISCVISAInfo.h"
 #include <algorithm>
 #include <cassert>
 #include <cstdint>
index ff4d516090ea4ef1afc650d6635742ae736eba2b..7f02621777004898dad376cf6cd9b0521fde8111 100644 (file)
@@ -33,7 +33,7 @@
 #include "llvm/IR/Type.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/TargetParser/RISCVTargetParser.h"
+#include "llvm/Support/RISCVISAInfo.h"
 #include "llvm/TargetParser/Triple.h"
 #include <algorithm>
 
index 8fe8ef2265c999427c6e2803bb57e15792f20aa6..1aadc67a2d0cb436ab30aa036a36847bed5496f6 100644 (file)
@@ -19,7 +19,6 @@
 #include "llvm/Support/SpecialCaseList.h"
 #include "llvm/Support/VirtualFileSystem.h"
 #include "llvm/TargetParser/AArch64TargetParser.h"
-#include "llvm/TargetParser/RISCVTargetParser.h"
 #include "llvm/TargetParser/TargetParser.h"
 #include "llvm/Transforms/Instrumentation/AddressSanitizerOptions.h"
 #include <memory>
index 843a269dac720b38412078128512b0cc2ee1203a..629fafadcf9f45a29d51b64cc52e3377e187d23c 100644 (file)
@@ -71,7 +71,6 @@ add_clang_library(clangSema
   DEPENDS
   ClangOpenCLBuiltinsImpl
   omp_gen
-  RISCVTargetParserTableGen
 
   LINK_LIBS
   clangAST
index 19a41b022ecdac54f3df8c17d564c425f1f5f03c..6442d3182b85b5a16a69d817ca4cc69e0ddd309e 100644 (file)
@@ -40,7 +40,7 @@
 #include "llvm/ADT/SmallString.h"
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/TargetParser/RISCVTargetParser.h"
+#include "llvm/Support/RISCVISAInfo.h"
 #include <bitset>
 #include <optional>
 
index 6eb085c32b5b2fd34bd8c905e85e964ef01198b7..1a260e93b64a98572dc0f41120b4f005d4d219fb 100644 (file)
@@ -22,6 +22,11 @@ struct RISCVExtensionInfo {
   unsigned MinorVersion;
 };
 
+namespace RISCV {
+// We use 64 bits as the known part in the scalable vector types.
+static constexpr unsigned RVVBitsPerBlock = 64;
+}
+
 class RISCVISAInfo {
 public:
   RISCVISAInfo(const RISCVISAInfo &) = delete;
index 993f653455a0d976c72cf4723ed3235b7bec9276..83effbc184897904d0564816e2a332a7f8ce8756 100644 (file)
 #define LLVM_TARGETPARSER_RISCVTARGETPARSER_H
 
 #include "llvm/ADT/StringRef.h"
-#include <vector>
 
 namespace llvm {
 
-class Triple;
-
 namespace RISCV {
 
-// We use 64 bits as the known part in the scalable vector types.
-static constexpr unsigned RVVBitsPerBlock = 64;
-
 enum CPUKind : unsigned {
 #define PROC(ENUM, NAME, DEFAULT_MARCH) CK_##ENUM,
 #define TUNE_PROC(ENUM, NAME) CK_##ENUM,
index 849b11f5b0006de6332e446ce7c3c9acd683afa3..65881f8204a6b2a63fd899637c8c8fd6644b4a16 100644 (file)
@@ -18,7 +18,6 @@
 #include "llvm/CodeGen/CallingConvLower.h"
 #include "llvm/CodeGen/SelectionDAG.h"
 #include "llvm/CodeGen/TargetLowering.h"
-#include "llvm/TargetParser/RISCVTargetParser.h"
 #include <optional>
 
 namespace llvm {