Home | History | Annotate | Download | only in AMDGPU
      1 //===-- llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp - Call lowering ---===//
      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 implements the lowering of LLVM calls to machine code calls for
     12 /// GlobalISel.
     13 ///
     14 //===----------------------------------------------------------------------===//
     15 
     16 #include "AMDGPUCallLowering.h"
     17 #include "AMDGPUISelLowering.h"
     18 
     19 #include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
     20 #include "llvm/CodeGen/MachineInstrBuilder.h"
     21 
     22 using namespace llvm;
     23 
     24 #ifndef LLVM_BUILD_GLOBAL_ISEL
     25 #error "This shouldn't be built without GISel"
     26 #endif
     27 
     28 AMDGPUCallLowering::AMDGPUCallLowering(const AMDGPUTargetLowering &TLI)
     29   : CallLowering(&TLI) {
     30 }
     31 
     32 bool AMDGPUCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder,
     33                                         const Value *Val, unsigned VReg) const {
     34   return true;
     35 }
     36 
     37 bool AMDGPUCallLowering::lowerFormalArguments(
     38     MachineIRBuilder &MIRBuilder, const Function::ArgumentListType &Args,
     39     const SmallVectorImpl<unsigned> &VRegs) const {
     40   // TODO: Implement once there are generic loads/stores.
     41   return true;
     42 }
     43