//===- BasicPtxBuilderInterface.td - PTX builder interface -*- tablegen -*-===// // // 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 // //===----------------------------------------------------------------------===// // // Defines the interface to build PTX (Parallel Thread Execution) from NVVM Ops // automatically. It is used by NVVM to LLVM pass. // //===----------------------------------------------------------------------===// #include "mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h" #define DEBUG_TYPE … #define DBGS() … #define DBGSNL() … //===----------------------------------------------------------------------===// // BasicPtxBuilderInterface //===----------------------------------------------------------------------===// #include "mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.cpp.inc" usingnamespacemlir; usingnamespaceNVVM; static constexpr int64_t kSharedMemorySpace = …; static char getRegisterType(Type type) { … } static char getRegisterType(Value v) { … } void PtxBuilder::insertValue(Value v, PTXRegisterMod itype) { … } LLVM::InlineAsmOp PtxBuilder::build() { … } void PtxBuilder::buildAndReplaceOp() { … }