nir: Add a basic CSE pass
[mesa.git] / src / glsl / Makefile.sources
1 # shared source lists for Makefile, SConscript, and Android.mk
2
3 GLSL_SRCDIR = $(top_srcdir)/src/glsl
4 GLSL_BUILDDIR = $(top_builddir)/src/glsl
5
6 # libglcpp
7
8 LIBGLCPP_FILES = \
9 $(GLSL_SRCDIR)/glcpp/glcpp.h \
10 $(GLSL_SRCDIR)/glcpp/pp.c
11
12 LIBGLCPP_GENERATED_FILES = \
13 $(GLSL_BUILDDIR)/glcpp/glcpp-lex.c \
14 $(GLSL_BUILDDIR)/glcpp/glcpp-parse.c
15
16 NIR_FILES = \
17 $(GLSL_SRCDIR)/nir/nir.c \
18 $(GLSL_SRCDIR)/nir/nir.h \
19 $(GLSL_SRCDIR)/nir/nir_dominance.c \
20 $(GLSL_SRCDIR)/nir/nir_from_ssa.c \
21 $(GLSL_SRCDIR)/nir/nir_intrinsics.c \
22 $(GLSL_SRCDIR)/nir/nir_intrinsics.h \
23 $(GLSL_SRCDIR)/nir/nir_live_variables.c \
24 $(GLSL_SRCDIR)/nir/nir_lower_atomics.c \
25 $(GLSL_SRCDIR)/nir/nir_lower_samplers.cpp \
26 $(GLSL_SRCDIR)/nir/nir_lower_system_values.c \
27 $(GLSL_SRCDIR)/nir/nir_lower_variables_scalar.c \
28 $(GLSL_SRCDIR)/nir/nir_lower_vec_to_movs.c \
29 $(GLSL_SRCDIR)/nir/nir_metadata.c \
30 $(GLSL_SRCDIR)/nir/nir_opcodes.c \
31 $(GLSL_SRCDIR)/nir/nir_opcodes.h \
32 $(GLSL_SRCDIR)/nir/nir_opt_copy_propagate.c \
33 $(GLSL_SRCDIR)/nir/nir_opt_cse.c \
34 $(GLSL_SRCDIR)/nir/nir_opt_dce.c \
35 $(GLSL_SRCDIR)/nir/nir_opt_global_to_local.c \
36 $(GLSL_SRCDIR)/nir/nir_opt_peephole_ffma.c \
37 $(GLSL_SRCDIR)/nir/nir_opt_peephole_select.c \
38 $(GLSL_SRCDIR)/nir/nir_print.c \
39 $(GLSL_SRCDIR)/nir/nir_remove_dead_variables.c \
40 $(GLSL_SRCDIR)/nir/nir_to_ssa.c \
41 $(GLSL_SRCDIR)/nir/nir_validate.c \
42 $(GLSL_SRCDIR)/nir/nir_types.cpp \
43 $(GLSL_SRCDIR)/nir/glsl_to_nir.cpp
44
45 # libglsl
46
47 LIBGLSL_FILES = \
48 $(GLSL_SRCDIR)/ast.h \
49 $(GLSL_SRCDIR)/ast_array_index.cpp \
50 $(GLSL_SRCDIR)/ast_expr.cpp \
51 $(GLSL_SRCDIR)/ast_function.cpp \
52 $(GLSL_SRCDIR)/ast_to_hir.cpp \
53 $(GLSL_SRCDIR)/ast_type.cpp \
54 $(GLSL_SRCDIR)/builtin_functions.cpp \
55 $(GLSL_SRCDIR)/builtin_type_macros.h \
56 $(GLSL_SRCDIR)/builtin_types.cpp \
57 $(GLSL_SRCDIR)/builtin_variables.cpp \
58 $(GLSL_SRCDIR)/glsl_parser_extras.cpp \
59 $(GLSL_SRCDIR)/glsl_parser_extras.h \
60 $(GLSL_SRCDIR)/glsl_symbol_table.cpp \
61 $(GLSL_SRCDIR)/glsl_symbol_table.h \
62 $(GLSL_SRCDIR)/glsl_types.cpp \
63 $(GLSL_SRCDIR)/glsl_types.h \
64 $(GLSL_SRCDIR)/hir_field_selection.cpp \
65 $(GLSL_SRCDIR)/ir_basic_block.cpp \
66 $(GLSL_SRCDIR)/ir_basic_block.h \
67 $(GLSL_SRCDIR)/ir_builder.cpp \
68 $(GLSL_SRCDIR)/ir_builder.h \
69 $(GLSL_SRCDIR)/ir_clone.cpp \
70 $(GLSL_SRCDIR)/ir_constant_expression.cpp \
71 $(GLSL_SRCDIR)/ir.cpp \
72 $(GLSL_SRCDIR)/ir.h \
73 $(GLSL_SRCDIR)/ir_equals.cpp \
74 $(GLSL_SRCDIR)/ir_expression_flattening.cpp \
75 $(GLSL_SRCDIR)/ir_expression_flattening.h \
76 $(GLSL_SRCDIR)/ir_function_can_inline.cpp \
77 $(GLSL_SRCDIR)/ir_function_detect_recursion.cpp \
78 $(GLSL_SRCDIR)/ir_function_inlining.h \
79 $(GLSL_SRCDIR)/ir_function.cpp \
80 $(GLSL_SRCDIR)/ir_hierarchical_visitor.cpp \
81 $(GLSL_SRCDIR)/ir_hierarchical_visitor.h \
82 $(GLSL_SRCDIR)/ir_hv_accept.cpp \
83 $(GLSL_SRCDIR)/ir_import_prototypes.cpp \
84 $(GLSL_SRCDIR)/ir_optimization.h \
85 $(GLSL_SRCDIR)/ir_print_visitor.cpp \
86 $(GLSL_SRCDIR)/ir_print_visitor.h \
87 $(GLSL_SRCDIR)/ir_reader.cpp \
88 $(GLSL_SRCDIR)/ir_reader.h \
89 $(GLSL_SRCDIR)/ir_rvalue_visitor.cpp \
90 $(GLSL_SRCDIR)/ir_rvalue_visitor.h \
91 $(GLSL_SRCDIR)/ir_set_program_inouts.cpp \
92 $(GLSL_SRCDIR)/ir_uniform.h \
93 $(GLSL_SRCDIR)/ir_validate.cpp \
94 $(GLSL_SRCDIR)/ir_variable_refcount.cpp \
95 $(GLSL_SRCDIR)/ir_variable_refcount.h \
96 $(GLSL_SRCDIR)/ir_visitor.h \
97 $(GLSL_SRCDIR)/linker.cpp \
98 $(GLSL_SRCDIR)/linker.h \
99 $(GLSL_SRCDIR)/link_atomics.cpp \
100 $(GLSL_SRCDIR)/link_functions.cpp \
101 $(GLSL_SRCDIR)/link_interface_blocks.cpp \
102 $(GLSL_SRCDIR)/link_uniforms.cpp \
103 $(GLSL_SRCDIR)/link_uniform_initializers.cpp \
104 $(GLSL_SRCDIR)/link_uniform_block_active_visitor.cpp \
105 $(GLSL_SRCDIR)/link_uniform_block_active_visitor.h \
106 $(GLSL_SRCDIR)/link_uniform_blocks.cpp \
107 $(GLSL_SRCDIR)/link_varyings.cpp \
108 $(GLSL_SRCDIR)/link_varyings.h \
109 $(GLSL_SRCDIR)/list.h \
110 $(GLSL_SRCDIR)/loop_analysis.cpp \
111 $(GLSL_SRCDIR)/loop_analysis.h \
112 $(GLSL_SRCDIR)/loop_controls.cpp \
113 $(GLSL_SRCDIR)/loop_unroll.cpp \
114 $(GLSL_SRCDIR)/lower_clip_distance.cpp \
115 $(GLSL_SRCDIR)/lower_const_arrays_to_uniforms.cpp \
116 $(GLSL_SRCDIR)/lower_discard.cpp \
117 $(GLSL_SRCDIR)/lower_discard_flow.cpp \
118 $(GLSL_SRCDIR)/lower_if_to_cond_assign.cpp \
119 $(GLSL_SRCDIR)/lower_instructions.cpp \
120 $(GLSL_SRCDIR)/lower_jumps.cpp \
121 $(GLSL_SRCDIR)/lower_mat_op_to_vec.cpp \
122 $(GLSL_SRCDIR)/lower_noise.cpp \
123 $(GLSL_SRCDIR)/lower_offset_array.cpp \
124 $(GLSL_SRCDIR)/lower_packed_varyings.cpp \
125 $(GLSL_SRCDIR)/lower_named_interface_blocks.cpp \
126 $(GLSL_SRCDIR)/lower_packing_builtins.cpp \
127 $(GLSL_SRCDIR)/lower_texture_projection.cpp \
128 $(GLSL_SRCDIR)/lower_variable_index_to_cond_assign.cpp \
129 $(GLSL_SRCDIR)/lower_vec_index_to_cond_assign.cpp \
130 $(GLSL_SRCDIR)/lower_vec_index_to_swizzle.cpp \
131 $(GLSL_SRCDIR)/lower_vector.cpp \
132 $(GLSL_SRCDIR)/lower_vector_insert.cpp \
133 $(GLSL_SRCDIR)/lower_vertex_id.cpp \
134 $(GLSL_SRCDIR)/lower_output_reads.cpp \
135 $(GLSL_SRCDIR)/lower_ubo_reference.cpp \
136 $(GLSL_SRCDIR)/opt_algebraic.cpp \
137 $(GLSL_SRCDIR)/opt_array_splitting.cpp \
138 $(GLSL_SRCDIR)/opt_constant_folding.cpp \
139 $(GLSL_SRCDIR)/opt_constant_propagation.cpp \
140 $(GLSL_SRCDIR)/opt_constant_variable.cpp \
141 $(GLSL_SRCDIR)/opt_copy_propagation.cpp \
142 $(GLSL_SRCDIR)/opt_copy_propagation_elements.cpp \
143 $(GLSL_SRCDIR)/opt_cse.cpp \
144 $(GLSL_SRCDIR)/opt_dead_builtin_variables.cpp \
145 $(GLSL_SRCDIR)/opt_dead_builtin_varyings.cpp \
146 $(GLSL_SRCDIR)/opt_dead_code.cpp \
147 $(GLSL_SRCDIR)/opt_dead_code_local.cpp \
148 $(GLSL_SRCDIR)/opt_dead_functions.cpp \
149 $(GLSL_SRCDIR)/opt_flatten_nested_if_blocks.cpp \
150 $(GLSL_SRCDIR)/opt_flip_matrices.cpp \
151 $(GLSL_SRCDIR)/opt_function_inlining.cpp \
152 $(GLSL_SRCDIR)/opt_if_simplification.cpp \
153 $(GLSL_SRCDIR)/opt_minmax.cpp \
154 $(GLSL_SRCDIR)/opt_noop_swizzle.cpp \
155 $(GLSL_SRCDIR)/opt_rebalance_tree.cpp \
156 $(GLSL_SRCDIR)/opt_redundant_jumps.cpp \
157 $(GLSL_SRCDIR)/opt_structure_splitting.cpp \
158 $(GLSL_SRCDIR)/opt_swizzle_swizzle.cpp \
159 $(GLSL_SRCDIR)/opt_tree_grafting.cpp \
160 $(GLSL_SRCDIR)/opt_vectorize.cpp \
161 $(GLSL_SRCDIR)/program.h \
162 $(GLSL_SRCDIR)/s_expression.cpp \
163 $(GLSL_SRCDIR)/s_expression.h
164
165 # glsl_compiler
166
167 GLSL_COMPILER_CXX_FILES = \
168 $(GLSL_SRCDIR)/standalone_scaffolding.cpp \
169 $(GLSL_SRCDIR)/standalone_scaffolding.h \
170 $(GLSL_SRCDIR)/main.cpp
171
172 # libglsl generated sources
173 LIBGLSL_GENERATED_CXX_FILES = \
174 $(GLSL_BUILDDIR)/glsl_lexer.cpp \
175 $(GLSL_BUILDDIR)/glsl_parser.cpp