[Mesa-dev] [PATCH v2 04/11] glsl: separate copy propagation state

Eric Anholt eric at anholt.net
Tue Jul 10 19:57:05 UTC 2018


Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com> writes:

> Separate higher level logic of visiting instructions and chosing when
> to store and use new copy data from the datastructure holding the copy
> propagation information. This will also make easier later patches that
> change the structure.
>
> v2: Remove empty destructor and clarify how hash tables are destroyed.
> ---
>  .../glsl/opt_copy_propagation_elements.cpp    | 267 +++++++++---------
>  1 file changed, 141 insertions(+), 126 deletions(-)
>
> diff --git a/src/compiler/glsl/opt_copy_propagation_elements.cpp b/src/compiler/glsl/opt_copy_propagation_elements.cpp
> index 8975e727522..05965128fd9 100644
> --- a/src/compiler/glsl/opt_copy_propagation_elements.cpp
> +++ b/src/compiler/glsl/opt_copy_propagation_elements.cpp
> @@ -89,6 +89,119 @@ public:
>     acp_ref rhs_node;
>  };
>  
> +class copy_propagation_state {
> +public:
> +   DECLARE_RZALLOC_CXX_OPERATORS(copy_propagation_state);
> +
> +   copy_propagation_state(void *mem_ctx, void *lin_ctx)
> +   {
> +      /* Use 'this' as context for the tables, no explicit destruction
> +       * needed later. */

Mesa style: */ on its own line.

Other than that,

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180710/fa3152c2/attachment.sig>


More information about the mesa-dev mailing list