LLVM  16.0.0git
SPIRVLegalizerInfo.h
Go to the documentation of this file.
1 //===- SPIRVLegalizerInfo.h --- SPIR-V Legalization Rules --------*- C++ -*-==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the targeting of the MachineLegalizer class for SPIR-V.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_SPIRV_SPIRVMACHINELEGALIZER_H
14 #define LLVM_LIB_TARGET_SPIRV_SPIRVMACHINELEGALIZER_H
15 
16 #include "SPIRVGlobalRegistry.h"
18 
19 bool isTypeFoldingSupported(unsigned Opcode);
20 
21 namespace llvm {
22 
23 class LLVMContext;
24 class SPIRVSubtarget;
25 
26 // This class provides the information for legalizing SPIR-V instructions.
28  const SPIRVSubtarget *ST;
30 
31 public:
32  bool legalizeCustom(LegalizerHelper &Helper, MachineInstr &MI) const override;
34 };
35 } // namespace llvm
36 #endif // LLVM_LIB_TARGET_SPIRV_SPIRVMACHINELEGALIZER_H
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:105
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::SPIRVSubtarget
Definition: SPIRVSubtarget.h:35
llvm::LegalizerHelper
Definition: LegalizerHelper.h:46
LegalizerInfo.h
llvm::SPIRVLegalizerInfo
Definition: SPIRVLegalizerInfo.h:27
llvm::SPIRVLegalizerInfo::legalizeCustom
bool legalizeCustom(LegalizerHelper &Helper, MachineInstr &MI) const override
Called for instructions with the Custom LegalizationAction.
Definition: SPIRVLegalizerInfo.cpp:274
llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo
SPIRVLegalizerInfo(const SPIRVSubtarget &ST)
Definition: SPIRVLegalizerInfo.cpp:57
llvm::MachineInstr
Representation of each machine instruction.
Definition: MachineInstr.h:66
SPIRVGlobalRegistry.h
llvm::SPIRVGlobalRegistry
Definition: SPIRVGlobalRegistry.h:27
isTypeFoldingSupported
bool isTypeFoldingSupported(unsigned Opcode)
Definition: SPIRVLegalizerInfo.cpp:53
llvm::LegalizerInfo
Definition: LegalizerInfo.h:1180