[RISCV] Move RISCV::RVVBitsPerBlock from TargetParser to Support/RISCVISAInfo.h.

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.
This commit is contained in:
Craig Topper
2023-04-29 15:04:52 -07:00
parent a4797869e7
commit ee9cbe3548
9 changed files with 9 additions and 13 deletions

View 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>

View 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>

View 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>

View 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>

View File

@@ -71,7 +71,6 @@ add_clang_library(clangSema
DEPENDS
ClangOpenCLBuiltinsImpl
omp_gen
RISCVTargetParserTableGen
LINK_LIBS
clangAST

View 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>

View 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;

View File

@@ -15,17 +15,11 @@
#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,

View 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 {