LLVM  9.0.0svn
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 //===----------------------------------------------------------------------===//
17 #include "AMDGPU.h"
20 namespace llvm {
22 class AMDGPUTargetLowering;
25  unsigned lowerParameterPtr(MachineIRBuilder &MIRBuilder, Type *ParamTy,
26  uint64_t Offset) const;
28  void lowerParameter(MachineIRBuilder &MIRBuilder, Type *ParamTy,
29  uint64_t Offset, unsigned Align,
30  unsigned DstReg) const;
32  public:
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)
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 behaves as the extended lowerReturn function, but for targets that do not support swifterro...
LLVM Value Representation.
Definition: Value.h:72
This file describes how to lower LLVM calls to machine code calls.
AMDGPUCallLowering(const AMDGPUTargetLowering &TLI)