LLVM  9.0.0svn
AMDGPUCallLowering.h
Go to the documentation of this file.
1 //===- lib/Target/AMDGPU/AMDGPUCallLowering.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 /// \file
10 /// This file describes how to lower LLVM calls to machine code calls.
11 ///
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUCALLLOWERING_H
15 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUCALLLOWERING_H
16 
17 #include "AMDGPU.h"
19 
20 namespace llvm {
21 
22 class AMDGPUTargetLowering;
23 
25  unsigned lowerParameterPtr(MachineIRBuilder &MIRBuilder, Type *ParamTy,
26  uint64_t Offset) const;
27 
28  void lowerParameter(MachineIRBuilder &MIRBuilder, Type *ParamTy,
29  uint64_t Offset, unsigned Align,
30  unsigned DstReg) const;
31 
32  public:
34 
35  bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
36  ArrayRef<unsigned> VRegs) const override;
37  bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
38  ArrayRef<unsigned> VRegs) const override;
39  static CCAssignFn *CCAssignFnForCall(CallingConv::ID CC, bool IsVarArg);
40  static CCAssignFn *CCAssignFnForReturn(CallingConv::ID CC, bool IsVarArg);
41 };
42 } // End of namespace llvm;
43 #endif
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
This class represents lattice values for constants.
Definition: AllocatorList.h:23
static CCAssignFn * CCAssignFnForReturn(CallingConv::ID CC, bool IsVarArg)
bool CCAssignFn(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
CCAssignFn - This function assigns a location for Val, updating State to reflect the change...
static CCAssignFn * CCAssignFnForCall(CallingConv::ID CC, bool IsVarArg)
F(f)
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:45
Helper class to build MachineInstr.
bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef< unsigned > VRegs) const override
This hook must be implemented to lower the incoming (formal) arguments, described by Args...
bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< unsigned > VRegs) const override
This hook must be implemented to lower outgoing return values, described by Val, into the specified v...
LLVM Value Representation.
Definition: Value.h:72
This file describes how to lower LLVM calls to machine code calls.
AMDGPUCallLowering(const AMDGPUTargetLowering &TLI)