//===--- SPIRVUtils.h ---- SPIR-V Utility Functions -------------*- 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 file contains miscellaneous utility functions.
//
//===----------------------------------------------------------------------===//
namespace llvm // namespace llvm
// Add the given string as a series of integer operand, inserting null
// terminators and padding to make sure the operands all have 32-bit
// little-endian words.
void ;
void ;
void ;
// Read the series of integer operands back as a null-terminated string using
// the reverse of the logic in addStringImm.
std::string ;
// Add the given numerical immediate to MIB.
void ;
// Add an OpName instruction for the given target register.
void ;
// Add an OpDecorate instruction for the given Reg.
void ;
void ;
// Convert a SPIR-V storage class to the corresponding LLVM IR address space.
unsigned ;
// Convert an LLVM IR address space to a SPIR-V storage class.
llvm::SPIRV::StorageClass ;
llvm::SPIRV::MemorySemantics
;
llvm::SPIRV::MemorySemantics ;
// Find def instruction for the given ConstReg, walking through
// spv_track_constant and ASSIGN_TYPE instructions. Updates ConstReg by def
// of OpConstant instruction.
llvm::MachineInstr *
;
// Get constant integer value of the given ConstReg.
uint64_t ;
// Check if MI is a SPIR-V specific intrinsic call.
bool ;
// Get type of i-th operand of the metadata node.
llvm::Type *;
// LLVM_LIB_TARGET_SPIRV_SPIRVUTILS_H