Re: [Mesa-dev] [RFC 7/9] nir/nir: Use a linked list instead of a has set for use/def sets

2015-04-27 Thread Connor Abbott
On Mon, Apr 27, 2015 at 5:25 PM, Jason Ekstrand wrote: > On Mon, Apr 27, 2015 at 1:35 PM, Connor Abbott wrote: >> On Fri, Apr 24, 2015 at 7:32 PM, Jason Ekstrand wrote: >>> +struct nir_if; >>> + >>> typedef struct nir_src { >>> union { >>> + nir_instr *parent_instr; >>> + struct n

Re: [Mesa-dev] [RFC 7/9] nir/nir: Use a linked list instead of a has set for use/def sets

2015-04-27 Thread Jason Ekstrand
On Mon, Apr 27, 2015 at 1:35 PM, Connor Abbott wrote: > On Fri, Apr 24, 2015 at 7:32 PM, Jason Ekstrand wrote: >> +struct nir_if; >> + >> typedef struct nir_src { >> union { >> + nir_instr *parent_instr; >> + struct nir_if *parent_if; >> + }; > > There's something I'm not quite u

Re: [Mesa-dev] [RFC 7/9] nir/nir: Use a linked list instead of a has set for use/def sets

2015-04-27 Thread Connor Abbott
On Fri, Apr 24, 2015 at 7:32 PM, Jason Ekstrand wrote: > This commit switches us from the current setup of using hash sets for > use/def sets to using linked lists. Doing so should save us quite a bit of > memory because we aren't carrying around 3 hash sets per register and 2 per > SSA value. I

Re: [Mesa-dev] [RFC 7/9] nir/nir: Use a linked list instead of a has set for use/def sets

2015-04-24 Thread Jason Ekstrand
On Fri, Apr 24, 2015 at 4:32 PM, Jason Ekstrand wrote: > This commit switches us from the current setup of using hash sets for > use/def sets to using linked lists. Doing so should save us quite a bit of > memory because we aren't carrying around 3 hash sets per register and 2 per > SSA value. I

[Mesa-dev] [RFC 7/9] nir/nir: Use a linked list instead of a has set for use/def sets

2015-04-24 Thread Jason Ekstrand
This commit switches us from the current setup of using hash sets for use/def sets to using linked lists. Doing so should save us quite a bit of memory because we aren't carrying around 3 hash sets per register and 2 per SSA value. It should also save us CPU time because adding/removing things fr