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 ja...@jlekstrand.net wrote: On Mon, Apr 27, 2015 at 1:35 PM, Connor Abbott cwabbo...@gmail.com wrote: On Fri, Apr 24, 2015 at 7:32 PM, Jason Ekstrand ja...@jlekstrand.net wrote: +struct nir_if; + typedef struct nir_src { union { +

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 cwabbo...@gmail.com wrote: On Fri, Apr 24, 2015 at 7:32 PM, Jason Ekstrand ja...@jlekstrand.net wrote: +struct nir_if; + typedef struct nir_src { union { + nir_instr *parent_instr; + struct nir_if *parent_if; + }; There's

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 ja...@jlekstrand.net 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

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 ja...@jlekstrand.net 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

[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