LLVM 22.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
19namespace llvm {
20
21class LLVMContext;
22class SPIRVSubtarget;
23
24// This class provides the information for legalizing SPIR-V instructions.
26 const SPIRVSubtarget *ST;
28
29public:
31 LostDebugLocObserver &LocObserver) const override;
33
34private:
35 bool legalizeIsFPClass(LegalizerHelper &Helper, MachineInstr &MI,
36 LostDebugLocObserver &LocObserver) const;
37};
38} // namespace llvm
39#endif // LLVM_LIB_TARGET_SPIRV_SPIRVMACHINELEGALIZER_H
IRTranslator LLVM IR MI
Interface for Targets to specify which operations they can successfully select and how the others sho...
This is an important class for using LLVM in a threaded context.
Definition LLVMContext.h:68
Representation of each machine instruction.
SPIRVLegalizerInfo(const SPIRVSubtarget &ST)
bool legalizeCustom(LegalizerHelper &Helper, MachineInstr &MI, LostDebugLocObserver &LocObserver) const override
Called for instructions with the Custom LegalizationAction.
This is an optimization pass for GlobalISel generic memory operations.