Re: [Mesa-dev] [PATCH] glsl: Detect do-while-false loops and unroll them

2016-02-22 Thread Tapani Pälli
On 02/23/2016 03:23 AM, Ian Romanick wrote: On 02/22/2016 04:16 PM, Ian Romanick wrote: On 02/22/2016 04:05 PM, Matt Turner wrote: On Mon, Feb 22, 2016 at 11:42 AM, Ian Romanick wrote: From: Ian Romanick Previously loops like do { // ... } while (false); that did not have

Re: [Mesa-dev] [PATCH] glsl: Detect do-while-false loops and unroll them

2016-02-22 Thread Ian Romanick
On 02/22/2016 04:16 PM, Ian Romanick wrote: > On 02/22/2016 04:05 PM, Matt Turner wrote: >> On Mon, Feb 22, 2016 at 11:42 AM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> Previously loops like >>> >>>do { >>> // ... >>>} while (false); >>> >>> that did not have any other loop-

Re: [Mesa-dev] [PATCH] glsl: Detect do-while-false loops and unroll them

2016-02-22 Thread Ian Romanick
On 02/22/2016 04:05 PM, Matt Turner wrote: > On Mon, Feb 22, 2016 at 11:42 AM, Ian Romanick wrote: >> From: Ian Romanick >> >> Previously loops like >> >>do { >> // ... >>} while (false); >> >> that did not have any other loop-branch instructions would not be >> unrolled. This is c

Re: [Mesa-dev] [PATCH] glsl: Detect do-while-false loops and unroll them

2016-02-22 Thread Matt Turner
On Mon, Feb 22, 2016 at 11:42 AM, Ian Romanick wrote: > From: Ian Romanick > > Previously loops like > >do { > // ... >} while (false); > > that did not have any other loop-branch instructions would not be > unrolled. This is commonly used to wrap multiline preprocessor macros. > >

Re: [Mesa-dev] [PATCH] glsl: Detect do-while-false loops and unroll them

2016-02-22 Thread Timothy Arceri
On Mon, 2016-02-22 at 11:42 -0800, Ian Romanick wrote: > From: Ian Romanick > > Previously loops like > >    do { >   // ... >    } while (false); > > that did not have any other loop-branch instructions would not be > unrolled.  This is commonly used to wrap multiline preprocessor > macros

[Mesa-dev] [PATCH] glsl: Detect do-while-false loops and unroll them

2016-02-22 Thread Ian Romanick
From: Ian Romanick Previously loops like do { // ... } while (false); that did not have any other loop-branch instructions would not be unrolled. This is commonly used to wrap multiline preprocessor macros. This produces IR like (loop ( ... break )) Since l