aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_variable_refcount.h
Commit message (Collapse)AuthorAgeFilesLines
* glsl/loops: replace loop controls with a normative bound.Paul Berry2013-12-091-1/+0
| | | | | | | | | | | | | | This patch replaces the ir_loop fields "from", "to", "increment", "counter", and "cmp" with a single integer ("normative_bound") that serves the same purpose. I've used the name "normative_bound" to emphasize the fact that the back-end is required to emit code to prevent the loop from running more than normative_bound times. (By contrast, an "informative" bound would be a bound that is informational only). Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Teach ir_variable_refcount about ir_loop::counter variables.Paul Berry2013-11-291-0/+1
| | | | | | | | | | | | | | | | | If an ir_loop has a non-null "counter" field, the variable referred to by this field is implicitly read and written by the loop. We need to account for this in ir_variable_refcount, otherwise there is a danger we will try to dead-code-eliminate the loop counter variable. Note: at the moment the dead code elimination bug doesn't occur due to a bug in ir_hierarchical_visitor: it doesn't visit the "counter" field, so dead code elimination doesn't treat it as a candidate for elimination. But the patch to follow will fix that bug, so we need to fix ir_variable_refcount first in order to avoid breaking dead code elimination. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Use the new hash table for the variable refcount visitor.Eric Anholt2012-12-071-13/+4
| | | | | | | Reviewed-by: Jordan Justen <[email protected]> [[email protected]: open_hash_table => hash_table] Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Rename class variable_entry to ir_variable_refcount_entry.Kenneth Graunke2012-01-301-4/+4
| | | | | | | | | | | | | | | | | | | Exporting a publicly visible class with a generic name like "variable_entry" via ir_variable_refcount.h is kind of mean. Many IR transformers would like to define their own "variable_entry" class. If they accidentally include this header, the compiler/linker may get confused and try to instantiate the wrong variable_entry class, leading to bizarre runtime crashes. The hope is that renaming this one will allow .cpp files to safely declare and use their own file-scope "variable_entry" classes. This avoids crashes caused by converting src/glsl to automake. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-and-tested-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* Convert everything from the talloc API to the ralloc API.Kenneth Graunke2011-01-311-2/+2
|
* glsl2: move constructor into .cpp file to work around compiler bugBrian Paul2010-08-241-8/+1
| | | | | | | Fixes fd.o bug 29770 The refcount==0 assertion only failed on some systems. One example being 32-bit Linux with gcc 4.4.4.
* glsl2: Fix copy'n'paste hilarity leading to leaking in the refcount visitor.Eric Anholt2010-08-181-1/+1
|
* glsl2: Remove a dead cut and paste member from ir_variable_refcount_visitor.Eric Anholt2010-08-041-2/+0
|
* glsl2: Factor out the variable refcounting part of ir_dead_code.cpp.Eric Anholt2010-07-311-0/+87