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.
This commit is contained in:
Eric Anholt
2010-05-04 13:04:40 -07:00
parent 05a4e59c24
commit 5c89f0ecb9
9 changed files with 748 additions and 1 deletions
+2
View File
@@ -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 */