xref: /aosp_15_r20/external/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker //===-- llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp - Call lowering ---===//
2*9880d681SAndroid Build Coastguard Worker //
3*9880d681SAndroid Build Coastguard Worker //                     The LLVM Compiler Infrastructure
4*9880d681SAndroid Build Coastguard Worker //
5*9880d681SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source
6*9880d681SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details.
7*9880d681SAndroid Build Coastguard Worker //
8*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
9*9880d681SAndroid Build Coastguard Worker ///
10*9880d681SAndroid Build Coastguard Worker /// \file
11*9880d681SAndroid Build Coastguard Worker /// This file implements the lowering of LLVM calls to machine code calls for
12*9880d681SAndroid Build Coastguard Worker /// GlobalISel.
13*9880d681SAndroid Build Coastguard Worker ///
14*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
15*9880d681SAndroid Build Coastguard Worker 
16*9880d681SAndroid Build Coastguard Worker #include "AMDGPUCallLowering.h"
17*9880d681SAndroid Build Coastguard Worker #include "AMDGPUISelLowering.h"
18*9880d681SAndroid Build Coastguard Worker 
19*9880d681SAndroid Build Coastguard Worker #include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
20*9880d681SAndroid Build Coastguard Worker #include "llvm/CodeGen/MachineInstrBuilder.h"
21*9880d681SAndroid Build Coastguard Worker 
22*9880d681SAndroid Build Coastguard Worker using namespace llvm;
23*9880d681SAndroid Build Coastguard Worker 
24*9880d681SAndroid Build Coastguard Worker #ifndef LLVM_BUILD_GLOBAL_ISEL
25*9880d681SAndroid Build Coastguard Worker #error "This shouldn't be built without GISel"
26*9880d681SAndroid Build Coastguard Worker #endif
27*9880d681SAndroid Build Coastguard Worker 
AMDGPUCallLowering(const AMDGPUTargetLowering & TLI)28*9880d681SAndroid Build Coastguard Worker AMDGPUCallLowering::AMDGPUCallLowering(const AMDGPUTargetLowering &TLI)
29*9880d681SAndroid Build Coastguard Worker   : CallLowering(&TLI) {
30*9880d681SAndroid Build Coastguard Worker }
31*9880d681SAndroid Build Coastguard Worker 
lowerReturn(MachineIRBuilder & MIRBuilder,const Value * Val,unsigned VReg) const32*9880d681SAndroid Build Coastguard Worker bool AMDGPUCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder,
33*9880d681SAndroid Build Coastguard Worker                                         const Value *Val, unsigned VReg) const {
34*9880d681SAndroid Build Coastguard Worker   return true;
35*9880d681SAndroid Build Coastguard Worker }
36*9880d681SAndroid Build Coastguard Worker 
lowerFormalArguments(MachineIRBuilder & MIRBuilder,const Function::ArgumentListType & Args,const SmallVectorImpl<unsigned> & VRegs) const37*9880d681SAndroid Build Coastguard Worker bool AMDGPUCallLowering::lowerFormalArguments(
38*9880d681SAndroid Build Coastguard Worker     MachineIRBuilder &MIRBuilder, const Function::ArgumentListType &Args,
39*9880d681SAndroid Build Coastguard Worker     const SmallVectorImpl<unsigned> &VRegs) const {
40*9880d681SAndroid Build Coastguard Worker   // TODO: Implement once there are generic loads/stores.
41*9880d681SAndroid Build Coastguard Worker   return true;
42*9880d681SAndroid Build Coastguard Worker }
43