llvm/clang/utils/TableGen/SveEmitter.cpp

//===- SveEmitter.cpp - Generate arm_sve.h for use with clang -*- C++ -*-===//
//
//  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 tablegen backend is responsible for emitting arm_sve.h, which includes
// a declaration and definition of each function specified by the ARM C/C++
// Language Extensions (ACLE).
//
// For details, visit:
//  https://developer.arm.com/architectures/system-architectures/software-standards/acle
//
// Each SVE instruction is implemented in terms of 1 or more functions which
// are suffixed with the element type of the input vectors.  Functions may be
// implemented in terms of generic vector operations such as +, *, -, etc. or
// by calling a __builtin_-prefixed function which will be handled by clang's
// CodeGen library.
//
// See also the documentation in include/clang/Basic/arm_sve.td.
//
//===----------------------------------------------------------------------===//

#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/TableGen/AArch64ImmCheck.h"
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.h"
#include <array>
#include <cctype>
#include <set>
#include <sstream>
#include <string>
#include <tuple>

usingnamespacellvm;

enum ClassKind {};

enum class ACLEKind {};

TypeSpec;

namespace {
class SVEType {};

class SVEEmitter;

/// The main grunt class. This represents an instantiation of an intrinsic with
/// a particular typespec and prototype.
class Intrinsic {};

class SVEEmitter {};

const std::array<SVEEmitter::ReinterpretTypeInfo, 12> SVEEmitter::Reinterprets =;

} // end anonymous namespace

//===----------------------------------------------------------------------===//
// Type implementation
//===----------------------------------------------------------------------===//

std::string SVEType::builtin_str() const {}

std::string SVEType::str() const {}

void SVEType::applyTypespec(StringRef TS) {}

void SVEType::applyModifier(char Mod) {}

/// Returns the modifier and number of vectors for the given operand \p Op.
std::pair<char, unsigned> getProtoModifier(StringRef Proto, unsigned Op) {}

//===----------------------------------------------------------------------===//
// Intrinsic implementation
//===----------------------------------------------------------------------===//

Intrinsic::Intrinsic(StringRef Name, StringRef Proto, uint64_t MergeTy,
                     StringRef MergeSuffix, uint64_t MemoryElementTy,
                     StringRef LLVMName, uint64_t Flags,
                     ArrayRef<ImmCheck> Checks, TypeSpec BT, ClassKind Class,
                     SVEEmitter &Emitter, StringRef SVEGuard,
                     StringRef SMEGuard)
    :{}

std::string Intrinsic::getBuiltinTypeStr() {}

std::string Intrinsic::replaceTemplatedArgs(std::string Name, TypeSpec TS,
                                            std::string Proto) const {}

std::string Intrinsic::mangleLLVMName() const {}

std::string Intrinsic::mangleName(ClassKind LocalCK) const {}

void Intrinsic::emitIntrinsic(raw_ostream &OS, SVEEmitter &Emitter,
                              ACLEKind Kind) const {}

//===----------------------------------------------------------------------===//
// SVEEmitter implementation
//===----------------------------------------------------------------------===//
uint64_t SVEEmitter::encodeTypeFlags(const SVEType &T) {}

void SVEEmitter::createIntrinsic(
    const Record *R, SmallVectorImpl<std::unique_ptr<Intrinsic>> &Out) {}

void SVEEmitter::createCoreHeaderIntrinsics(raw_ostream &OS,
                                            SVEEmitter &Emitter,
                                            ACLEKind Kind) {}

void SVEEmitter::createHeader(raw_ostream &OS) {}

void SVEEmitter::createBuiltins(raw_ostream &OS) {}

void SVEEmitter::createCodeGenMap(raw_ostream &OS) {}

void SVEEmitter::createRangeChecks(raw_ostream &OS) {}

/// Create the SVETypeFlags used in CGBuiltins
void SVEEmitter::createTypeFlags(raw_ostream &OS) {}

void SVEEmitter::createImmCheckTypes(raw_ostream &OS) {}

void SVEEmitter::createSMEHeader(raw_ostream &OS) {}

void SVEEmitter::createSMEBuiltins(raw_ostream &OS) {}

void SVEEmitter::createSMECodeGenMap(raw_ostream &OS) {}

void SVEEmitter::createSMERangeChecks(raw_ostream &OS) {}

void SVEEmitter::createBuiltinZAState(raw_ostream &OS) {}

void SVEEmitter::createStreamingAttrs(raw_ostream &OS, ACLEKind Kind) {}

namespace clang {
void EmitSveHeader(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitSveBuiltins(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitSveBuiltinCG(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitSveRangeChecks(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitSveTypeFlags(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitImmCheckTypes(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitSveStreamingAttrs(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitSmeHeader(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitSmeBuiltins(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitSmeBuiltinCG(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitSmeRangeChecks(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitSmeStreamingAttrs(const RecordKeeper &Records, raw_ostream &OS) {}

void EmitSmeBuiltinZAState(const RecordKeeper &Records, raw_ostream &OS) {}
} // End namespace clang