1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00

R600: Add a CONST_ADDRESS node to model constant buf read

Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 173221
This commit is contained in:
Tom Stellard 2013-01-23 02:09:03 +00:00
parent 8899509f04
commit 48aa269492
3 changed files with 12 additions and 1 deletions

View File

@ -413,5 +413,6 @@ const char* AMDGPUTargetLowering::getTargetNodeName(unsigned Opcode) const {
NODE_NAME_CASE(INTERP)
NODE_NAME_CASE(INTERP_P0)
NODE_NAME_CASE(EXPORT)
NODE_NAME_CASE(CONST_ADDRESS)
}
}

View File

@ -123,6 +123,7 @@ enum {
INTERP,
INTERP_P0,
EXPORT,
CONST_ADDRESS,
LAST_AMDGPU_ISD_NUMBER
};

View File

@ -470,7 +470,7 @@ def isR600toCayman : Predicate<
"Subtarget.device()->getGeneration() <= AMDGPUDeviceInfo::HD6XXX">;
//===----------------------------------------------------------------------===//
// Interpolation Instructions
// R600 SDNodes
//===----------------------------------------------------------------------===//
def INTERP: SDNode<"AMDGPUISD::INTERP",
@ -481,6 +481,15 @@ def INTERP_P0: SDNode<"AMDGPUISD::INTERP_P0",
SDTypeProfile<1, 1, [SDTCisFP<0>, SDTCisInt<1>]>
>;
def CONST_ADDRESS: SDNode<"AMDGPUISD::CONST_ADDRESS",
SDTypeProfile<1, 1, [SDTCisFP<0>, SDTCisPtrTy<1>]>,
[SDNPMayLoad]
>;
//===----------------------------------------------------------------------===//
// Interpolation Instructions
//===----------------------------------------------------------------------===//
let usesCustomInserter = 1 in {
def input_perspective : AMDGPUShaderInst <
(outs R600_Reg128:$dst),