Re: [Mesa-dev] [PATCH v4 2/4] nir: add new constant folding infrastructure

2015-01-23 Thread Jason Ekstrand
On Jan 23, 2015 10:37 PM, "Connor Abbott" wrote: > > Other than the one comment fix below, > > Reviewed-by: Connor Abbott > > On Fri, Jan 23, 2015 at 7:17 PM, Jason Ekstrand wrote: > > Add a required field to the Opcode class, const_expr, that contains an > > expression or statement that compute

Re: [Mesa-dev] [PATCH v4 2/4] nir: add new constant folding infrastructure

2015-01-23 Thread Connor Abbott
Other than the one comment fix below, Reviewed-by: Connor Abbott On Fri, Jan 23, 2015 at 7:17 PM, Jason Ekstrand wrote: > Add a required field to the Opcode class, const_expr, that contains an > expression or statement that computes the result of the opcode given known > constant inputs. Then t

[Mesa-dev] [PATCH v4 2/4] nir: add new constant folding infrastructure

2015-01-23 Thread Jason Ekstrand
Add a required field to the Opcode class, const_expr, that contains an expression or statement that computes the result of the opcode given known constant inputs. Then take those const_expr's and expand them into a function that takes an opcode and an array of constant inputs and spits out the cons