llvm/clang/utils/TableGen/RISCVVEmitter.cpp

//===- RISCVVEmitter.cpp - Generate riscv_vector.h for use with clang -----===//
//
// 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 riscv_vector.h which
// includes a declaration and definition of each intrinsic functions specified
// in https://github.com/riscv/rvv-intrinsic-doc.
//
// See also the documentation in include/clang/Basic/riscv_vector.td.
//
//===----------------------------------------------------------------------===//

#include "clang/Support/RISCVVIntrinsicUtils.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.h"
#include <numeric>
#include <optional>

usingnamespacellvm;
usingnamespaceclang::RISCV;

namespace {
struct SemaRecord {};

// Compressed function signature table.
class SemaSignatureTable {};

class RVVEmitter {};

} // namespace

static BasicType ParseBasicType(char c) {}

static VectorTypeModifier getTupleVTM(unsigned NF) {}

// This function is used to get the log2SEW of each segment load/store, this
// prevent to add a member to RVVIntrinsic.
static unsigned getSegInstLog2SEW(StringRef InstName) {}

void emitCodeGenSwitchBody(const RVVIntrinsic *RVVI, raw_ostream &OS) {}

//===----------------------------------------------------------------------===//
// SemaSignatureTable implementation
//===----------------------------------------------------------------------===//
void SemaSignatureTable::init(ArrayRef<SemaRecord> SemaRecords) {}

void SemaSignatureTable::insert(ArrayRef<PrototypeDescriptor> Signature) {}

unsigned SemaSignatureTable::getIndex(ArrayRef<PrototypeDescriptor> Signature) {}

void SemaSignatureTable::print(raw_ostream &OS) {}

//===----------------------------------------------------------------------===//
// RVVEmitter implementation
//===----------------------------------------------------------------------===//
void RVVEmitter::createHeader(raw_ostream &OS) {}

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

void RVVEmitter::createCodeGen(raw_ostream &OS) {}

void RVVEmitter::createRVVIntrinsics(
    std::vector<std::unique_ptr<RVVIntrinsic>> &Out,
    std::vector<SemaRecord> *SemaRecords) {}

void RVVEmitter::printHeaderCode(raw_ostream &OS) {}

void RVVEmitter::createRVVIntrinsicRecords(std::vector<RVVIntrinsicRecord> &Out,
                                           SemaSignatureTable &SST,
                                           ArrayRef<SemaRecord> SemaRecords) {}

void RVVEmitter::createSema(raw_ostream &OS) {}

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

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

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

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

} // End namespace clang