Re: [Mesa-dev] [PATCH 1/4] Revert glsl: Skip processing the first function's body in do_dead_functions().

2011-08-05 Thread Kenneth Graunke
On 08/01/2011 04:07 PM, Paul Berry wrote: opt_dead_functions contained a shortcut to skip processing the first function's body, based on the assumption that IR functions are topologically sorted, with callees always coming before their callers (therefore the first function cannot contain any

Re: [Mesa-dev] [PATCH 1/4] Revert glsl: Skip processing the first function's body in do_dead_functions().

2011-08-03 Thread Paul Berry
On 2 August 2011 18:11, Ian Romanick i...@freedesktop.org wrote: On 1 August 2011 22:16, Paul Berry stereotype...@gmail.com wrote: 4. Since the linker emits functions at the head of the final linked program, if the linker brings in a function (let's call it f()) that wasn't declared in the

Re: [Mesa-dev] [PATCH 1/4] Revert glsl: Skip processing the first function's body in do_dead_functions().

2011-08-02 Thread Eric Anholt
On Mon, 1 Aug 2011 22:16:40 -0700, Paul Berry stereotype...@gmail.com wrote: On 1 August 2011 17:35, Ian Romanick i...@freedesktop.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/01/2011 04:07 PM, Paul Berry wrote: opt_dead_functions contained a shortcut to skip

Re: [Mesa-dev] [PATCH 1/4] Revert glsl: Skip processing the first function's body in do_dead_functions().

2011-08-02 Thread Paul Berry
On 1 August 2011 22:16, Paul Berry stereotype...@gmail.com wrote: I will investigate things further in the morning and let you know what I find. Ok, I've spent a while looking through the linker code, and the rabbit hole goes deeper than I expected. There are a number of reasons why the

Re: [Mesa-dev] [PATCH 1/4] Revert glsl: Skip processing the first function's body in do_dead_functions().

2011-08-02 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/02/2011 11:41 AM, Paul Berry wrote: On 1 August 2011 22:16, Paul Berry stereotype...@gmail.com wrote: I will investigate things further in the morning and let you know what I find. Ok, I've spent a while looking through the linker code,

Re: [Mesa-dev] [PATCH 1/4] Revert glsl: Skip processing the first function's body in do_dead_functions().

2011-08-01 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/01/2011 04:07 PM, Paul Berry wrote: opt_dead_functions contained a shortcut to skip processing the first function's body, based on the assumption that IR functions are topologically sorted, with callees always coming before their callers

Re: [Mesa-dev] [PATCH 1/4] Revert glsl: Skip processing the first function's body in do_dead_functions().

2011-08-01 Thread Paul Berry
On 1 August 2011 17:35, Ian Romanick i...@freedesktop.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/01/2011 04:07 PM, Paul Berry wrote: opt_dead_functions contained a shortcut to skip processing the first function's body, based on the assumption that IR functions are