llvm/clang/lib/Basic/Targets/RISCV.cpp

//===--- RISCV.cpp - Implement RISC-V target feature support --------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements RISC-V TargetInfo objects.
//
//===----------------------------------------------------------------------===//

#include "RISCV.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/MacroBuilder.h"
#include "clang/Basic/TargetBuiltins.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/RISCVTargetParser.h"
#include <optional>

usingnamespaceclang;
usingnamespaceclang::targets;

ArrayRef<const char *> RISCVTargetInfo::getGCCRegNames() const {}

ArrayRef<TargetInfo::GCCRegAlias> RISCVTargetInfo::getGCCRegAliases() const {}

bool RISCVTargetInfo::validateAsmConstraint(
    const char *&Name, TargetInfo::ConstraintInfo &Info) const {}

std::string RISCVTargetInfo::convertConstraint(const char *&Constraint) const {}

static unsigned getVersionValue(unsigned MajorVersion, unsigned MinorVersion) {}

void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts,
                                       MacroBuilder &Builder) const {}

static constexpr Builtin::Info BuiltinInfo[] =;

ArrayRef<Builtin::Info> RISCVTargetInfo::getTargetBuiltins() const {}

bool RISCVTargetInfo::initFeatureMap(
    llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU,
    const std::vector<std::string> &FeaturesVec) const {}

std::optional<std::pair<unsigned, unsigned>>
RISCVTargetInfo::getVScaleRange(const LangOptions &LangOpts) const {}

/// Return true if has this feature, need to sync with handleTargetFeatures.
bool RISCVTargetInfo::hasFeature(StringRef Feature) const {}

/// Perform initialization based on the user configured set of features.
bool RISCVTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
                                           DiagnosticsEngine &Diags) {}

bool RISCVTargetInfo::isValidCPUName(StringRef Name) const {}

void RISCVTargetInfo::fillValidCPUList(
    SmallVectorImpl<StringRef> &Values) const {}

bool RISCVTargetInfo::isValidTuneCPUName(StringRef Name) const {}

void RISCVTargetInfo::fillValidTuneCPUList(
    SmallVectorImpl<StringRef> &Values) const {}

static void populateNegativeRISCVFeatures(std::vector<std::string> &Features) {}

static void handleFullArchString(StringRef FullArchStr,
                                 std::vector<std::string> &Features) {}

ParsedTargetAttr RISCVTargetInfo::parseTargetAttr(StringRef Features) const {}

TargetInfo::CallingConvCheckResult
RISCVTargetInfo::checkCallingConvention(CallingConv CC) const {}

bool RISCVTargetInfo::validateCpuSupports(StringRef Feature) const {}