#include "llvm/TargetParser/RISCVTargetParser.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/TargetParser/RISCVISAInfo.h"
#include "llvm/TargetParser/Triple.h"
namespace llvm {
namespace RISCV {
enum CPUKind : unsigned { … };
struct CPUInfo { … };
constexpr CPUInfo RISCVCPUInfo[] = …;
static const CPUInfo *getCPUInfoByName(StringRef CPU) { … }
bool hasFastScalarUnalignedAccess(StringRef CPU) { … }
bool hasFastVectorUnalignedAccess(StringRef CPU) { … }
bool parseCPU(StringRef CPU, bool IsRV64) { … }
bool parseTuneCPU(StringRef TuneCPU, bool IsRV64) { … }
StringRef getMArchFromMcpu(StringRef CPU) { … }
void fillValidCPUArchList(SmallVectorImpl<StringRef> &Values, bool IsRV64) { … }
void fillValidTuneCPUArchList(SmallVectorImpl<StringRef> &Values, bool IsRV64) { … }
void getFeaturesForCPU(StringRef CPU,
SmallVectorImpl<std::string> &EnabledFeatures,
bool NeedPlus) { … }
namespace RISCVExtensionBitmaskTable {
#define GET_RISCVExtensionBitmaskTable_IMPL
#include "llvm/TargetParser/RISCVTargetParserDef.inc"
}
namespace {
struct LessExtName { … };
}
}
namespace RISCVVType {
unsigned encodeVTYPE(RISCVII::VLMUL VLMUL, unsigned SEW, bool TailAgnostic,
bool MaskAgnostic) { … }
std::pair<unsigned, bool> decodeVLMUL(RISCVII::VLMUL VLMUL) { … }
void printVType(unsigned VType, raw_ostream &OS) { … }
unsigned getSEWLMULRatio(unsigned SEW, RISCVII::VLMUL VLMul) { … }
std::optional<RISCVII::VLMUL>
getSameRatioLMUL(unsigned SEW, RISCVII::VLMUL VLMUL, unsigned EEW) { … }
}
}