Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-04 Thread Timothy Arceri
On 04/05/17 22:28, Samuel Pitoiset wrote: On 05/04/2017 02:13 PM, Samuel Pitoiset wrote: On 05/04/2017 12:26 PM, Timothy Arceri wrote: On 04/05/17 18:22, Samuel Pitoiset wrot On 05/04/2017 02:36 AM, Timothy Arceri wrote: This and the tgsi copy_propagation pass are very slow, I'd really

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-04 Thread Samuel Pitoiset
On 05/04/2017 02:13 PM, Samuel Pitoiset wrote: On 05/04/2017 12:26 PM, Timothy Arceri wrote: On 04/05/17 18:22, Samuel Pitoiset wrot On 05/04/2017 02:36 AM, Timothy Arceri wrote: This and the tgsi copy_propagation pass are very slow, I'd really like it if we both didn't require the pass fo

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-04 Thread Samuel Pitoiset
On 05/04/2017 12:26 PM, Timothy Arceri wrote: On 04/05/17 18:22, Samuel Pitoiset wrot On 05/04/2017 02:36 AM, Timothy Arceri wrote: This and the tgsi copy_propagation pass are very slow, I'd really like it if we both didn't require the pass for things to work and also didn't make it any slow

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-04 Thread Timothy Arceri
On 04/05/17 18:22, Samuel Pitoiset wrot On 05/04/2017 02:36 AM, Timothy Arceri wrote: This and the tgsi copy_propagation pass are very slow, I'd really like it if we both didn't require the pass for things to work and also didn't make it any slower. perf is showing these 2 passes at ~11% durin

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-04 Thread Samuel Pitoiset
On 05/04/2017 02:36 AM, Timothy Arceri wrote: This and the tgsi copy_propagation pass are very slow, I'd really like it if we both didn't require the pass for things to work and also didn't make it any slower. perf is showing these 2 passes at ~11% during Deus Ex start-up (cold cache). This

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-03 Thread Timothy Arceri
On 04/05/17 10:43, Ilia Mirkin wrote: I looked into removing these passes a while back. A little detail here is that DCE has to get run at least a little bit for correctness reasons -- some (lazy) glsl -> tgsi Is there anyway to improve this? I was actually looking at this a little yesterday b

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-03 Thread Ilia Mirkin
I looked into removing these passes a while back. A little detail here is that DCE has to get run at least a little bit for correctness reasons -- some (lazy) glsl -> tgsi code uses the dead_mask with the assumption that DCE is run later. Another observation was that while, indeed, those passes ta

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-03 Thread Timothy Arceri
This and the tgsi copy_propagation pass are very slow, I'd really like it if we both didn't require the pass for things to work and also didn't make it any slower. perf is showing these 2 passes at ~11% during Deus Ex start-up (cold cache). Can we not just add a DCE call to the glsl linker/com

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-03 Thread Samuel Pitoiset
On 05/03/2017 06:21 PM, Nicolai Hähnle wrote: On 02.05.2017 16:43, Samuel Pitoiset wrote: The TGSI DCE pass doesn't eliminate dead assignments like MOV TEMP[0], TEMP[1] in presence of loops because it assumes that the visitor doesn't emit dead code. This assumption is actually wrong and this s

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-03 Thread Nicolai Hähnle
On 02.05.2017 16:43, Samuel Pitoiset wrote: The TGSI DCE pass doesn't eliminate dead assignments like MOV TEMP[0], TEMP[1] in presence of loops because it assumes that the visitor doesn't emit dead code. This assumption is actually wrong and this situation happens. However, it appears that the m

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-02 Thread Edmondo Tommasina
The issue in Uningine Heaven is fixed. Tested-by: Edmondo Tommasina Thanks edmondo On Tue, May 2, 2017 at 4:43 PM, Samuel Pitoiset wrote: > The TGSI DCE pass doesn't eliminate dead assignments like > MOV TEMP[0], TEMP[1] in presence of loops because it assumes > that the visitor doesn't emit

[Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-02 Thread Samuel Pitoiset
The TGSI DCE pass doesn't eliminate dead assignments like MOV TEMP[0], TEMP[1] in presence of loops because it assumes that the visitor doesn't emit dead code. This assumption is actually wrong and this situation happens. However, it appears that the merge_registers() pass accidentally takes care