llvm/mlir/lib/Target/LLVMIR/Dialect/VCIX/VCIXToLLVMIRTranslation.cpp

//===- VCIXToLLVMIRTranslation.cpp - Translate VCIX to LLVM IR ------------===//
//
// 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 a translation between the MLIR VCIX dialect and
// LLVM IR.
//
//===----------------------------------------------------------------------===//

#include "mlir/Target/LLVMIR/Dialect/VCIX/VCIXToLLVMIRTranslation.h"
#include "mlir/Dialect/LLVMIR/VCIXDialect.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/Operation.h"
#include "mlir/Target/LLVMIR/ModuleTranslation.h"

#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/IntrinsicsRISCV.h"
#include "llvm/Support/raw_ostream.h"

usingnamespacemlir;
usingnamespacemlir::LLVM;
createIntrinsicCall;

/// Infer XLen type from opcode's type. This is done to avoid passing target
/// option around.
static llvm::Type *getXlenType(Attribute opcodeAttr,
                               LLVM::ModuleTranslation &moduleTranslation) {}

/// Return VL for VCIX intrinsic. If vl was previously set, return it,
/// otherwise construct a constant using fixed vector type.
static llvm::Value *createVL(llvm::IRBuilderBase &builder, llvm::Value *vl,
                             VectorType vtype, llvm::Type *xlen, Location loc,
                             LLVM::ModuleTranslation &moduleTranslation) {}

namespace {
/// Implementation of the dialect interface that converts operations belonging
/// to the VCIX dialect to LLVM IR.
class VCIXDialectLLVMIRTranslationInterface
    : public LLVMTranslationDialectInterface {};
} // namespace

void mlir::registerVCIXDialectTranslation(DialectRegistry &registry) {}

void mlir::registerVCIXDialectTranslation(MLIRContext &context) {}