mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
[AMDGPU][GlobalISel] Allow amdgpu_gfx calling conv
Calling functions from shaders already works with the SelectionDAG. Differential Revision: https://reviews.llvm.org/D103183
This commit is contained in:
parent
fb6b06d635
commit
79ec3080a2
@ -1252,19 +1252,13 @@ bool AMDGPUCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
|
|||||||
MachineRegisterInfo &MRI = MF.getRegInfo();
|
MachineRegisterInfo &MRI = MF.getRegInfo();
|
||||||
const SITargetLowering &TLI = *getTLI<SITargetLowering>();
|
const SITargetLowering &TLI = *getTLI<SITargetLowering>();
|
||||||
const DataLayout &DL = F.getParent()->getDataLayout();
|
const DataLayout &DL = F.getParent()->getDataLayout();
|
||||||
CallingConv::ID CallConv = F.getCallingConv();
|
|
||||||
|
|
||||||
if (!AMDGPUTargetMachine::EnableFixedFunctionABI &&
|
if (!AMDGPUTargetMachine::EnableFixedFunctionABI &&
|
||||||
CallConv != CallingConv::AMDGPU_Gfx) {
|
Info.CallConv != CallingConv::AMDGPU_Gfx) {
|
||||||
LLVM_DEBUG(dbgs() << "Variable function ABI not implemented\n");
|
LLVM_DEBUG(dbgs() << "Variable function ABI not implemented\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AMDGPU::isShader(CallConv)) {
|
|
||||||
LLVM_DEBUG(dbgs() << "Unhandled call from graphics shader\n");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
SmallVector<ArgInfo, 8> OutArgs;
|
SmallVector<ArgInfo, 8> OutArgs;
|
||||||
for (auto &OrigArg : Info.OrigArgs)
|
for (auto &OrigArg : Info.OrigArgs)
|
||||||
splitToValueTypes(OrigArg, OutArgs, DL, Info.CallConv);
|
splitToValueTypes(OrigArg, OutArgs, DL, Info.CallConv);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
; Check that it doesn't crash
|
; Check that it doesn't crash
|
||||||
; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx900 < %s | FileCheck -check-prefixes=GFX9 %s
|
; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx900 < %s | FileCheck -check-prefixes=GFX9 %s
|
||||||
; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10 %s
|
; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10 %s
|
||||||
|
; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 -global-isel < %s | FileCheck -check-prefixes=GFX10 %s
|
||||||
|
|
||||||
target datalayout = "A5"
|
target datalayout = "A5"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user