summaryrefslogtreecommitdiffstats
path: root/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-05-05 10:37:25 -0700
committerEric Anholt <[email protected]>2010-05-05 11:08:18 -0700
commit6255a1f4c6425aa311c90e9dc7fca41c34e8dc2b (patch)
tree8863a17247b1802f09113c5ac4517879311e567a /glsl_parser_extras.cpp
parentdc1dbd65e1099d98a05302e4ee67bc84c59a1386 (diff)
ir_dead_code_local: Remove redundant assignments within basic blocks.
This cleans up a bunch of junk code in some of the GLSL parser tests, and could potentially help real-world too (particularly after copy propagation has happened).
Diffstat (limited to 'glsl_parser_extras.cpp')
-rw-r--r--glsl_parser_extras.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/glsl_parser_extras.cpp b/glsl_parser_extras.cpp
index 31fa5e6c7d0..58656c70ae2 100644
--- a/glsl_parser_extras.cpp
+++ b/glsl_parser_extras.cpp
@@ -39,6 +39,7 @@
#include "ir_dead_code.h"
#include "ir_function_inlining.h"
#include "ir_if_simplification.h"
+#include "ir_optimization.h"
#include "ir_print_visitor.h"
#include "ir_reader.h"
@@ -788,6 +789,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_local(&instructions) || progress;
progress = do_dead_code_unlinked(&instructions) || progress;
/* Constant folding */