Re: [Mesa-dev] [PATCH 3/5] nir: add new constant folding infrastructure

2015-01-26 Thread Juha-Pekka Heikkila
On 20.01.2015 21:43, Jason Ekstrand wrote: > > > On Mon, Jan 19, 2015 at 5:01 PM, Connor Abbott > wrote: > > On Mon, Jan 19, 2015 at 4:04 PM, Jason Ekstrand > mailto:ja...@jlekstrand.net>> wrote: > > I've got some specific comments below, but I want to ma

Re: [Mesa-dev] [PATCH 3/5] nir: add new constant folding infrastructure

2015-01-20 Thread Jason Ekstrand
On Mon, Jan 19, 2015 at 5:01 PM, Connor Abbott wrote: > On Mon, Jan 19, 2015 at 4:04 PM, Jason Ekstrand > wrote: > > I've got some specific comments below, but I want to make some more > general > > comments here. I like this in principle: having all the opcodes > > self-documenting is wonderfu

Re: [Mesa-dev] [PATCH 3/5] nir: add new constant folding infrastructure

2015-01-19 Thread Connor Abbott
On Mon, Jan 19, 2015 at 4:04 PM, Jason Ekstrand wrote: > I've got some specific comments below, but I want to make some more general > comments here. I like this in principle: having all the opcodes > self-documenting is wonderful. However, I'm not terribly happy with the way > it worked out. A

Re: [Mesa-dev] [PATCH 3/5] nir: add new constant folding infrastructure

2015-01-19 Thread Jason Ekstrand
I've got some specific comments below, but I want to make some more general comments here. I like this in principle: having all the opcodes self-documenting is wonderful. However, I'm not terribly happy with the way it worked out. A lot of the codegen stuff is very confusing and its not at all o

[Mesa-dev] [PATCH 3/5] nir: add new constant folding infrastructure

2015-01-16 Thread Connor Abbott
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