[Mesa-dev] [PATCH RFC 05/11] glsl: add loop jump visitor

Paul Berry stereotype441 at gmail.com
Mon Jan 27 21:52:02 PST 2014


On 22 January 2014 09:16, Connor Abbott <cwabbott0 at gmail.com> wrote:

> +class ir_loop_jumps_visitor : public ir_hierarchical_visitor
> +{
> +public:
> +   ir_loop_jumps_visitor();
> +   ~ir_loop_jumps_visitor();
> +
> +   virtual ir_visitor_status visit_enter(ir_loop *);
> +   virtual ir_visitor_status visit(ir_loop_jump *);
> +
> +   ir_loop_jumps *get_loop_jumps(ir_loop *ir);
> +
> +private:
> +   ir_loop *outer_loop;
>

As with outer_if in the previous patch, I think we could save some
unnecessary hashtable lookups if we simply stored the ir_loop_jumps * here
instead of storing the ir_loop *.  But I don't feel terribly strongly about
it.

Either way, the patch is:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140127/a2efe2b4/attachment.html>


More information about the mesa-dev mailing list