Path: blob/main/contrib/llvm-project/llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.h
35269 views
//===- SPIRVLegalizerInfo.h --- SPIR-V Legalization Rules --------*- C++ -*-==//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file declares the targeting of the MachineLegalizer class for SPIR-V.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVMACHINELEGALIZER_H13#define LLVM_LIB_TARGET_SPIRV_SPIRVMACHINELEGALIZER_H1415#include "SPIRVGlobalRegistry.h"16#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"1718bool isTypeFoldingSupported(unsigned Opcode);1920namespace llvm {2122class LLVMContext;23class SPIRVSubtarget;2425// This class provides the information for legalizing SPIR-V instructions.26class SPIRVLegalizerInfo : public LegalizerInfo {27const SPIRVSubtarget *ST;28SPIRVGlobalRegistry *GR;2930public:31bool legalizeCustom(LegalizerHelper &Helper, MachineInstr &MI,32LostDebugLocObserver &LocObserver) const override;33SPIRVLegalizerInfo(const SPIRVSubtarget &ST);34};35} // namespace llvm36#endif // LLVM_LIB_TARGET_SPIRV_SPIRVMACHINELEGALIZER_H373839