LLVM
24.0.0git
lib
Target
SPIRV
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_SPIRVLEGALIZERINFO_H
14
#define LLVM_LIB_TARGET_SPIRV_SPIRVLEGALIZERINFO_H
15
16
#include "
SPIRVGlobalRegistry.h
"
17
#include "
llvm/CodeGen/GlobalISel/LegalizerInfo.h
"
18
19
namespace
llvm
{
20
21
class
SPIRVSubtarget
;
22
23
// This class provides the information for legalizing SPIR-V instructions.
24
class
SPIRVLegalizerInfo
:
public
LegalizerInfo
{
25
const
SPIRVSubtarget
*ST;
26
SPIRVGlobalRegistry
*GR;
27
28
public
:
29
bool
legalizeCustom
(
LegalizerHelper
&Helper,
MachineInstr
&
MI
,
30
LostDebugLocObserver
&LocObserver)
const override
;
31
bool
legalizeIntrinsic
(
LegalizerHelper
&Helper,
32
MachineInstr
&
MI
)
const override
;
33
34
SPIRVLegalizerInfo
(
const
SPIRVSubtarget
&ST);
35
36
private
:
37
bool
legalizeIsFPClass(
LegalizerHelper
&Helper,
MachineInstr
&
MI
,
38
LostDebugLocObserver
&LocObserver)
const
;
39
bool
legalizeBitcast(
LegalizerHelper
&Helper,
MachineInstr
&
MI
)
const
;
40
};
41
}
// namespace llvm
42
#endif
// LLVM_LIB_TARGET_SPIRV_SPIRVLEGALIZERINFO_H
MI
IRTranslator LLVM IR MI
Definition
IRTranslator.cpp:877
LegalizerInfo.h
Interface for Targets to specify which operations they can successfully select and how the others sho...
SPIRVGlobalRegistry.h
llvm::LegalizerHelper
Definition
LegalizerHelper.h:49
llvm::LegalizerInfo
Definition
LegalizerInfo.h:1335
llvm::LostDebugLocObserver
Definition
LostDebugLocObserver.h:20
llvm::MachineInstr
Representation of each machine instruction.
Definition
MachineInstr.h:73
llvm::SPIRVGlobalRegistry
Definition
SPIRVGlobalRegistry.h:33
llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo
SPIRVLegalizerInfo(const SPIRVSubtarget &ST)
Definition
SPIRVLegalizerInfo.cpp:59
llvm::SPIRVLegalizerInfo::legalizeCustom
bool legalizeCustom(LegalizerHelper &Helper, MachineInstr &MI, LostDebugLocObserver &LocObserver) const override
Called for instructions with the Custom LegalizationAction.
Definition
SPIRVLegalizerInfo.cpp:824
llvm::SPIRVLegalizerInfo::legalizeIntrinsic
bool legalizeIntrinsic(LegalizerHelper &Helper, MachineInstr &MI) const override
Definition
SPIRVLegalizerInfo.cpp:1180
llvm::SPIRVSubtarget
Definition
SPIRVSubtarget.h:46
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
DefaultTargetInfo.h:21
Generated on
for LLVM by
1.14.0