diff options
author | Eric Anholt <eric@anholt.net> | 2010-05-04 13:04:40 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-05-04 17:00:42 -0700 |
commit | 5c89f0ecb9581cbe83442ab3f41f2f3701fffab0 (patch) | |
tree | c598e307fcc03ba9eaf5c89c19fe1d1e7b261bc4 /glsl_parser_extras.cpp | |
parent | 05a4e59c2410292f595cfe0cc552a86ae69b20d2 (diff) |
ir_copy_propagation: New pass to rewrite dereferences to avoid copies.
This is pretty basic. Right now it only handles pure assignments --
same type on each side, no swizzling, and only within basic blocks.
Diffstat (limited to 'glsl_parser_extras.cpp')
-rw-r--r-- | glsl_parser_extras.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/glsl_parser_extras.cpp b/glsl_parser_extras.cpp index 88767af204..31fa5e6c7d 100644 --- a/glsl_parser_extras.cpp +++ b/glsl_parser_extras.cpp @@ -35,6 +35,7 @@ #include "glsl_parser_extras.h" #include "glsl_parser.h" #include "ir_constant_folding.h" +#include "ir_copy_propagation.h" #include "ir_dead_code.h" #include "ir_function_inlining.h" #include "ir_if_simplification.h" @@ -786,6 +787,7 @@ main(int argc, char **argv) progress = do_function_inlining(&instructions) || progress; progress = do_if_simplification(&instructions) || progress; + progress = do_copy_propagation(&instructions) || progress; progress = do_dead_code_unlinked(&instructions) || progress; /* Constant folding */ |