[PATCH vkd3d v7 4/6] vkd3d-shader/hlsl: Perform a copy propagation pass.

Matteo Bruni matteo.mystral at gmail.com
Fri Nov 19 10:12:30 CST 2021


On Fri, Nov 19, 2021 at 4:55 PM Giovanni Mascellani
<gmascellani at codeweavers.com> wrote:
>
> Hi,
>
> On 18/11/21 18:28, Matteo Bruni wrote:
> >> +struct copy_propagation_value
> >> +{
> >> +    struct hlsl_ir_node *node;
> >> +    unsigned int component;
> >> +};
> >> +
> >> +struct copy_propagation_variable
> >> +{
> >> +    struct rb_entry entry;
> >> +    struct hlsl_ir_var *var;
> >> +    struct copy_propagation_value *values;
> >> +};
> >
> > I still haven't gotten warm to these names. What about
> > copy_propagation_definition (or just copy_propagation_def)?
>
> I don't understand why it's appropriate for this structure, but fine.

It's in the sense of "definition of the current value", more or less
like the "def" in use-def chains.

> >> +static struct hlsl_ir_node *copy_propagation_find_replacement(struct copy_propagation_variable *variable,
> >> +        unsigned int offset, unsigned int count, unsigned int *swizzle)
> >
> > I think I prefer my original suggestion of _get_ (or something else)
> > rather than _find_; the point being that this function isn't really
> > finding anything.
>
> To me it gets something as much as it finds something. I wanted to avoid
> the word "get" because it seems overly generic, but it's true that
> "find" is not that much more specific. Ok.

Throwing a couple more options: generate, compute.



More information about the wine-devel mailing list