2016-12-22 03:06:24 +08:00
|
|
|
//===-- llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp - Call lowering -----===//
|
2016-04-15 03:09:28 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
///
|
|
|
|
/// \file
|
|
|
|
/// This file implements the lowering of LLVM calls to machine code calls for
|
|
|
|
/// GlobalISel.
|
|
|
|
///
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "AMDGPUCallLowering.h"
|
|
|
|
#include "AMDGPUISelLowering.h"
|
2017-01-31 01:42:41 +08:00
|
|
|
|
2016-04-15 03:09:28 +08:00
|
|
|
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
|
|
|
|
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
#ifndef LLVM_BUILD_GLOBAL_ISEL
|
|
|
|
#error "This shouldn't be built without GISel"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
AMDGPUCallLowering::AMDGPUCallLowering(const AMDGPUTargetLowering &TLI)
|
|
|
|
: CallLowering(&TLI) {
|
|
|
|
}
|
|
|
|
|
|
|
|
bool AMDGPUCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder,
|
2017-01-31 01:42:41 +08:00
|
|
|
const Value *Val, unsigned VReg) const {
|
2016-04-15 03:09:28 +08:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2016-09-21 20:57:35 +08:00
|
|
|
bool AMDGPUCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,
|
|
|
|
const Function &F,
|
|
|
|
ArrayRef<unsigned> VRegs) const {
|
2017-01-31 01:42:41 +08:00
|
|
|
// TODO: Implement once there are generic loads/stores.
|
2016-04-15 03:09:28 +08:00
|
|
|
return true;
|
|
|
|
}
|