On Tue, 07 Sep 2010 13:08:37 -0700, Ian Romanick wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Luca Barbieri wrote:
> > Well, the alternative is to copy&paste this into ir_lower_jumps and
> > other similar passes.
> >
> > I added a new class instead of changing ir_visitor so that
Yes, I think what is really needed here is a class that only ignores
IR related to declaration and expression statements.
This would allow lower_jumps to avoid caring about stuff like
ir_texture that it doesn't care about at all.
Would this be acceptable?
BTW, using hierarchical_visitor is less
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Luca Barbieri wrote:
> Well, the alternative is to copy&paste this into ir_lower_jumps and
> other similar passes.
>
> I added a new class instead of changing ir_visitor so that subclasses
> that need to examine all leaves will get a compile error if
Well, the alternative is to copy&paste this into ir_lower_jumps and
other similar passes.
I added a new class instead of changing ir_visitor so that subclasses
that need to examine all leaves will get a compile error if not
updated when new leaves are introduced. This is debatable though,
since yo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Luca Barbieri wrote:
> This is just a subclass of ir_visitor with empty implementations of all
> the visit methods.
>
> Used to avoid duplicating that in ir_visitor subclasses.
NAK. The methods are missing intentionally. Refer to any documentation
This is just a subclass of ir_visitor with empty implementations of all
the visit methods.
Used to avoid duplicating that in ir_visitor subclasses.
ir_hierarchical_visitor is another way to solve this, but is less natural
for some applications.
---
src/glsl/ir_visitor.h | 21 ++