LLVM  8.0.1
AMDGPUCallLowering.h
Go to the documentation of this file.
1 //===- lib/Target/AMDGPU/AMDGPUCallLowering.h - Call lowering -*- C++ -*---===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// This file describes how to lower LLVM calls to machine code calls.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUCALLLOWERING_H
16 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUCALLLOWERING_H
17 
18 #include "AMDGPU.h"
20 
21 namespace llvm {
22 
23 class AMDGPUTargetLowering;
24 
26  unsigned lowerParameterPtr(MachineIRBuilder &MIRBuilder, Type *ParamTy,
27  uint64_t Offset) const;
28 
29  void lowerParameter(MachineIRBuilder &MIRBuilder, Type *ParamTy,
30  uint64_t Offset, unsigned Align,
31  unsigned DstReg) const;
32 
33  public:
35 
36  bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
37  ArrayRef<unsigned> VRegs) const override;
38  bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
39  ArrayRef<unsigned> VRegs) const override;
40  static CCAssignFn *CCAssignFnForCall(CallingConv::ID CC, bool IsVarArg);
41  static CCAssignFn *CCAssignFnForReturn(CallingConv::ID CC, bool IsVarArg);
42 };
43 } // End of namespace llvm;
44 #endif
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
This class represents lattice values for constants.
Definition: AllocatorList.h:24
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:46
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:73
This file describes how to lower LLVM calls to machine code calls.
AMDGPUCallLowering(const AMDGPUTargetLowering &TLI)