LLVM 17.0.0git
SPIRVCallLowering.h
Go to the documentation of this file.
1//===--- SPIRVCallLowering.h - Call lowering --------------------*- 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 describes how to lower LLVM calls to machine code calls.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVCALLLOWERING_H
14#define LLVM_LIB_TARGET_SPIRV_SPIRVCALLLOWERING_H
15
16#include "SPIRVGlobalRegistry.h"
18
19namespace llvm {
20
21class SPIRVGlobalRegistry;
22class SPIRVTargetLowering;
23
25private:
26 // Used to create and assign function, argument, and return type information.
28
29public:
31
32 // Built OpReturn or OpReturnValue.
33 bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val,
35 Register SwiftErrorVReg) const override;
36
37 // Build OpFunction, OpFunctionParameter, and any EntryPoint or Linkage data.
38 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
40 FunctionLoweringInfo &FLI) const override;
41
42 // Build OpCall, or replace with a builtin function.
43 bool lowerCall(MachineIRBuilder &MIRBuilder,
44 CallLoweringInfo &Info) const override;
45};
46} // end namespace llvm
47
48#endif // LLVM_LIB_TARGET_SPIRV_SPIRVCALLLOWERING_H
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
This file describes how to lower LLVM calls to machine code calls.
#define F(x, y, z)
Definition: MD5.cpp:55
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
FunctionLoweringInfo - This contains information that is global to a function that is used when lower...
Helper class to build MachineInstr.
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
bool lowerCall(MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info) const override
This hook must be implemented to lower the given call instruction, including argument and return valu...
bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val, ArrayRef< Register > VRegs, FunctionLoweringInfo &FLI, Register SwiftErrorVReg) const override
This hook must be implemented to lower outgoing return values, described by Val, into the specified v...
bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef< ArrayRef< Register > > VRegs, FunctionLoweringInfo &FLI) const override
This hook must be implemented to lower the incoming (formal) arguments, described by VRegs,...
LLVM Value Representation.
Definition: Value.h:74
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18