LLVM  6.0.0svn
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  AMDGPUAS AMDGPUASI;
27 
28  unsigned lowerParameterPtr(MachineIRBuilder &MIRBuilder, Type *ParamTy,
29  unsigned Offset) const;
30 
31  void lowerParameter(MachineIRBuilder &MIRBuilder, Type *ParamTy,
32  unsigned Offset, unsigned DstReg) const;
33 
34  public:
36 
37  bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val,
38  unsigned VReg) const override;
39  bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
40  ArrayRef<unsigned> VRegs) const override;
41  static CCAssignFn *CCAssignFnForCall(CallingConv::ID CC, bool IsVarArg);
42  static CCAssignFn *CCAssignFnForReturn(CallingConv::ID CC, bool IsVarArg);
43 };
44 } // End of namespace llvm;
45 #endif
Compute iterated dominance frontiers using a linear time algorithm.
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 const MCPhysReg VRegs[32]
static CCAssignFn * CCAssignFnForCall(CallingConv::ID CC, bool IsVarArg)
F(f)
OpenCL uses address spaces to differentiate between various memory regions on the hardware...
Definition: AMDGPU.h:214
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 &MIRBuiler, const Value *Val, unsigned VReg) 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)