[Mesa-dev] [PATCH 2/4] R600: Add a CONST_ADDRESS node to model constant buf read

Tom Stellard tom at stellard.net
Thu Jan 3 07:13:35 PST 2013


On Wed, Dec 26, 2012 at 05:37:19PM +0100, Vincent Lejeune wrote:
> ---
>  lib/Target/AMDGPU/AMDGPUISelLowering.cpp |  1 +
>  lib/Target/AMDGPU/AMDGPUISelLowering.h   |  1 +
>  lib/Target/AMDGPU/R600Instructions.td    | 11 ++++++++++-
>  3 files changed, 12 insertions(+), 1 deletion(-)
> 

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>

> diff --git a/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
> index 910c2ff..df1a4d6 100644
> --- a/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
> +++ b/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
> @@ -398,5 +398,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)
>    }
>  }
> diff --git a/lib/Target/AMDGPU/AMDGPUISelLowering.h b/lib/Target/AMDGPU/AMDGPUISelLowering.h
> index 992dab7..5671f94 100644
> --- a/lib/Target/AMDGPU/AMDGPUISelLowering.h
> +++ b/lib/Target/AMDGPU/AMDGPUISelLowering.h
> @@ -122,6 +122,7 @@ enum {
>    INTERP,
>    INTERP_P0,
>    EXPORT,
> +  CONST_ADDRESS,
>    LAST_AMDGPU_ISD_NUMBER
>  };
>  
> diff --git a/lib/Target/AMDGPU/R600Instructions.td b/lib/Target/AMDGPU/R600Instructions.td
> index 7921fe1e..dc32368 100644
> --- a/lib/Target/AMDGPU/R600Instructions.td
> +++ b/lib/Target/AMDGPU/R600Instructions.td
> @@ -464,7 +464,7 @@ def isR600toCayman : Predicate<
>                       "Subtarget.device()->getGeneration() <= AMDGPUDeviceInfo::HD6XXX">;
>  
>  //===----------------------------------------------------------------------===//
> -// Interpolation Instructions
> +// R600 SDNodes
>  //===----------------------------------------------------------------------===//
>  
>  def INTERP: SDNode<"AMDGPUISD::INTERP",
> @@ -475,6 +475,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),
> -- 
> 1.8.0.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list