[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:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -71,7 +71,6 @@ add_clang_library(clangSema
|
||||
DEPENDS
|
||||
ClangOpenCLBuiltinsImpl
|
||||
omp_gen
|
||||
RISCVTargetParserTableGen
|
||||
|
||||
LINK_LIBS
|
||||
clangAST
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user