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

//===--- AArch64.cpp - Implement AArch64 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 AArch64 TargetInfo objects.
//
//===----------------------------------------------------------------------===//

#include "AArch64.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/TargetBuiltins.h"
#include "clang/Basic/TargetInfo.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/TargetParser/AArch64TargetParser.h"
#include "llvm/TargetParser/ARMTargetParserCommon.h"
#include <optional>

usingnamespaceclang;
usingnamespaceclang::targets;

static constexpr Builtin::Info BuiltinInfo[] =;

void AArch64TargetInfo::setArchFeatures() {}

AArch64TargetInfo::AArch64TargetInfo(const llvm::Triple &Triple,
                                     const TargetOptions &Opts)
    :{}

StringRef AArch64TargetInfo::getABI() const {}

bool AArch64TargetInfo::setABI(const std::string &Name) {}

bool AArch64TargetInfo::validateTarget(DiagnosticsEngine &Diags) const {}

bool AArch64TargetInfo::validateGlobalRegisterVariable(
    StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const {}

bool AArch64TargetInfo::validateBranchProtection(StringRef Spec, StringRef,
                                                 BranchProtectionInfo &BPI,
                                                 StringRef &Err) const {}

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

bool AArch64TargetInfo::setCPU(const std::string &Name) {}

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

void AArch64TargetInfo::getTargetDefinesARMV81A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV82A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV83A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV84A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV85A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV86A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV87A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV88A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV89A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV9A(const LangOptions &Opts,
                                               MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV91A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV92A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV93A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV94A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV95A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

void AArch64TargetInfo::getTargetDefinesARMV96A(const LangOptions &Opts,
                                                MacroBuilder &Builder) const {}

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

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

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

unsigned AArch64TargetInfo::multiVersionSortPriority(StringRef Name) const {}

unsigned AArch64TargetInfo::multiVersionFeatureCost() const {}

bool AArch64TargetInfo::doesFeatureAffectCodeGen(StringRef Name) const {}

bool AArch64TargetInfo::validateCpuSupports(StringRef FeatureStr) const {}

bool AArch64TargetInfo::hasFeature(StringRef Feature) const {}

void AArch64TargetInfo::setFeatureEnabled(llvm::StringMap<bool> &Features,
                                          StringRef Name, bool Enabled) const {}

bool AArch64TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
                                             DiagnosticsEngine &Diags) {}

// Parse AArch64 Target attributes, which are a comma separated list of:
//  "arch=<arch>" - parsed to features as per -march=..
//  "cpu=<cpu>" - parsed to features as per -mcpu=.., with CPU set to <cpu>
//  "tune=<cpu>" - TuneCPU set to <cpu>
//  "feature", "no-feature" - Add (or remove) feature.
//  "+feature", "+nofeature" - Add (or remove) feature.
//
// A feature may correspond to an Extension (anything with a corresponding
// AEK_), in which case an ExtensionSet is used to parse it and expand its
// dependencies. If the feature does not yield a successful parse then it
// is passed through.
ParsedTargetAttr AArch64TargetInfo::parseTargetAttr(StringRef Features) const {}

bool AArch64TargetInfo::hasBFloat16Type() const {}

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

bool AArch64TargetInfo::isCLZForZeroUndef() const {}

TargetInfo::BuiltinVaListKind AArch64TargetInfo::getBuiltinVaListKind() const {}

const char *const AArch64TargetInfo::GCCRegNames[] =;

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

const TargetInfo::GCCRegAlias AArch64TargetInfo::GCCRegAliases[] =;

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

// Returns the length of cc constraint.
static unsigned matchAsmCCConstraint(const char *Name) {}

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

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

bool AArch64TargetInfo::validateConstraintModifier(
    StringRef Constraint, char Modifier, unsigned Size,
    std::string &SuggestedModifier) const {}

std::string_view AArch64TargetInfo::getClobbers() const {}

int AArch64TargetInfo::getEHDataRegisterNumber(unsigned RegNo) const {}

bool AArch64TargetInfo::validatePointerAuthKey(
    const llvm::APSInt &value) const {}

bool AArch64TargetInfo::hasInt128Type() const {}

AArch64leTargetInfo::AArch64leTargetInfo(const llvm::Triple &Triple,
                                         const TargetOptions &Opts)
    :{}

void AArch64leTargetInfo::setDataLayout() {}

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

AArch64beTargetInfo::AArch64beTargetInfo(const llvm::Triple &Triple,
                                         const TargetOptions &Opts)
    :{}

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

void AArch64beTargetInfo::setDataLayout() {}

WindowsARM64TargetInfo::WindowsARM64TargetInfo(const llvm::Triple &Triple,
                                               const TargetOptions &Opts)
    :{}

void WindowsARM64TargetInfo::setDataLayout() {}

TargetInfo::BuiltinVaListKind
WindowsARM64TargetInfo::getBuiltinVaListKind() const {}

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

MicrosoftARM64TargetInfo::MicrosoftARM64TargetInfo(const llvm::Triple &Triple,
                                                   const TargetOptions &Opts)
    :{}

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

TargetInfo::CallingConvKind
MicrosoftARM64TargetInfo::getCallingConvKind(bool ClangABICompat4) const {}

unsigned MicrosoftARM64TargetInfo::getMinGlobalAlign(uint64_t TypeSize,
                                                     bool HasNonWeakDef) const {}

MinGWARM64TargetInfo::MinGWARM64TargetInfo(const llvm::Triple &Triple,
                                           const TargetOptions &Opts)
    :{}

DarwinAArch64TargetInfo::DarwinAArch64TargetInfo(const llvm::Triple &Triple,
                                                 const TargetOptions &Opts)
    :{}

void DarwinAArch64TargetInfo::getOSDefines(const LangOptions &Opts,
                                           const llvm::Triple &Triple,
                                           MacroBuilder &Builder) const {}

TargetInfo::BuiltinVaListKind
DarwinAArch64TargetInfo::getBuiltinVaListKind() const {}

// 64-bit RenderScript is aarch64
RenderScript64TargetInfo::RenderScript64TargetInfo(const llvm::Triple &Triple,
                                                   const TargetOptions &Opts)
    :{}

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