dawn-cmake/src/transform
Ben Clayton a9156ff091 Rework Resolver so that we construct semantic types in a single pass.
The semantic nodes cannot be fully immutable, as they contain cyclic
references. Remove Resolver::CreateSemanticNodes(), and instead
construct and mutate the semantic nodes in the single traversal pass.

Give up on trying to maintain the 'authored' type names (aliased names).
These are a nightmare to maintain, and provided limited use.

Significantly simplfies the Resolver, and allows us to generate more
semantic to semantic references, reducing sem -> ast -> sem hops.

Note: This change introduces constant value propagation across constant
variables. This is unlocked by the earlier construction of the
sem::Variable.

Change-Id: I592092fdc47fe24d30e512952511c9ab7c16d7a1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/68406
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-11-05 16:51:38 +00:00
..
add_empty_entry_point.cc transform: Add transform to add empty entry point 2021-09-07 18:59:21 +00:00
add_empty_entry_point.h transform: Add transform to add empty entry point 2021-09-07 18:59:21 +00:00
add_empty_entry_point_test.cc transform: Add transform to add empty entry point 2021-09-07 18:59:21 +00:00
array_length_from_uniform.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
array_length_from_uniform.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
array_length_from_uniform_test.cc Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
binding_remapper.cc sem: Rename Function methods 2021-11-04 22:29:22 +00:00
binding_remapper.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
binding_remapper_test.cc Remove depreated APIs and WGSL 2021-07-06 10:20:19 +00:00
calculate_array_length.cc Add a helper for DisableValidationDecoration 2021-10-28 15:00:39 +00:00
calculate_array_length.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
calculate_array_length_test.cc Converting to Atomic-Free Plain to Constructible 2021-07-07 20:41:00 +00:00
canonicalize_entry_point_io.cc Add a helper for DisableValidationDecoration 2021-10-28 15:00:39 +00:00
canonicalize_entry_point_io.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
canonicalize_entry_point_io_test.cc ast: Remove helpers from ast::Type 2021-10-15 14:17:31 +00:00
decompose_memory_access.cc Add a helper for DisableValidationDecoration 2021-10-28 15:00:39 +00:00
decompose_memory_access.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
decompose_memory_access_test.cc resolver: Remove rule that call statements to functions must return void 2021-10-21 20:36:04 +00:00
decompose_strided_matrix.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
decompose_strided_matrix.h reader/spirv: Handle the MatrixStride decoration 2021-07-27 08:17:29 +00:00
decompose_strided_matrix_test.cc Add a helper for DisableValidationDecoration 2021-10-28 15:00:39 +00:00
external_texture_transform.cc ast: Keep style consistent 2021-10-15 17:33:10 +00:00
external_texture_transform.h Program: Track what transforms have been applied 2021-06-25 10:26:26 +00:00
external_texture_transform_test.cc Remove texture_external overload for textureSample and add textureSampleLevel 2021-05-12 10:37:03 +00:00
first_index_offset.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
first_index_offset.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
first_index_offset_test.cc resolver: Remove rule that call statements to functions must return void 2021-10-21 20:36:04 +00:00
fold_constants.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
fold_constants.h Program: Track what transforms have been applied 2021-06-25 10:26:26 +00:00
fold_constants_test.cc Implement a FoldConstants transform that currently folds scalar and vector conversions 2021-06-18 14:59:51 +00:00
fold_trivial_single_use_lets.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
fold_trivial_single_use_lets.h transform: Add FoldTrivialSingleUseLets 2021-07-02 21:15:44 +00:00
fold_trivial_single_use_lets_test.cc transform: Add FoldTrivialSingleUseLets 2021-07-02 21:15:44 +00:00
for_loop_to_loop.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
for_loop_to_loop.h [transform] Add ForLoopToLoop 2021-07-08 10:00:17 +00:00
for_loop_to_loop_test.cc [transform] Add ForLoopToLoop 2021-07-08 10:00:17 +00:00
glsl.cc Implement phony assignment 2021-10-21 23:04:44 +00:00
glsl.h GLSL writer: validate all entry points with glslang. 2021-10-14 14:39:36 +00:00
glsl_test.cc Implement GLSL writer backend. 2021-10-06 18:55:10 +00:00
inline_pointer_lets.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
inline_pointer_lets.h Converting to Atomic-Free Plain to Constructible 2021-07-07 20:41:00 +00:00
inline_pointer_lets_test.cc Disallow taking the address of a vector component 2021-11-04 19:55:57 +00:00
loop_to_for_loop.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
loop_to_for_loop.h [transform] Add ForLoopToLoop 2021-07-08 10:00:17 +00:00
loop_to_for_loop_test.cc transform: LoopToForLoop - fix bad emission 2021-07-29 18:05:19 +00:00
manager.cc transform: Add a debug flag to dump WGSL 2021-07-15 20:24:38 +00:00
manager.h Program: Track what transforms have been applied 2021-06-25 10:26:26 +00:00
module_scope_var_to_entry_point_param.cc Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
module_scope_var_to_entry_point_param.h msl: Handle buffer variables in transform 2021-10-28 15:00:39 +00:00
module_scope_var_to_entry_point_param_test.cc msl: Handle buffer variables in transform 2021-10-28 15:00:39 +00:00
num_workgroups_from_uniform.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
num_workgroups_from_uniform.h transform: Add NumWorkgroupsFromUniform transform 2021-09-13 17:11:58 +00:00
num_workgroups_from_uniform_test.cc transform: Add NumWorkgroupsFromUniform transform 2021-09-13 17:11:58 +00:00
pad_array_elements.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
pad_array_elements.h Program: Track what transforms have been applied 2021-06-25 10:26:26 +00:00
pad_array_elements_test.cc Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
promote_initializers_to_const_var.cc ast: Keep style consistent 2021-10-15 17:33:10 +00:00
promote_initializers_to_const_var.h Program: Track what transforms have been applied 2021-06-25 10:26:26 +00:00
promote_initializers_to_const_var_test.cc validation: compute shader must include 'workgroup_size' in its attributes 2021-06-29 18:39:44 +00:00
remove_phonies.cc Implement phony assignment 2021-10-21 23:04:44 +00:00
remove_phonies.h Implement phony assignment 2021-10-21 23:04:44 +00:00
remove_phonies_test.cc Implement phony assignment 2021-10-21 23:04:44 +00:00
renamer.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
renamer.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
renamer_test.cc GLSL: add gl_ reserved words. 2021-10-15 18:44:20 +00:00
robustness.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
robustness.h Add knob for omitting certain storage classes in Robustness transform 2021-10-19 16:51:23 +00:00
robustness_test.cc Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
simplify.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
simplify.h Program: Track what transforms have been applied 2021-06-25 10:26:26 +00:00
simplify_test.cc Add transform::Simplify 2021-05-21 21:01:23 +00:00
single_entry_point.cc sem: Rename Function methods 2021-11-04 22:29:22 +00:00
single_entry_point.h Program: Track what transforms have been applied 2021-06-25 10:26:26 +00:00
single_entry_point_test.cc Remove depreated APIs and WGSL 2021-07-06 10:20:19 +00:00
test_helper.h reader/spirv: Handle the MatrixStride decoration 2021-07-27 08:17:29 +00:00
transform.cc Implement phony assignment 2021-10-21 23:04:44 +00:00
transform.h Implement phony assignment 2021-10-21 23:04:44 +00:00
transform_test.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
vectorize_scalar_matrix_constructors.cc Add support for matrix construction from scalars 2021-10-25 19:20:31 +00:00
vectorize_scalar_matrix_constructors.h Add support for matrix construction from scalars 2021-10-25 19:20:31 +00:00
vectorize_scalar_matrix_constructors_test.cc Add support for matrix construction from scalars 2021-10-25 19:20:31 +00:00
vertex_pulling.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
vertex_pulling.h Remove InputStepMode (it was deprecated in favor of VertexStepMode) 2021-07-27 07:33:19 +00:00
vertex_pulling_test.cc Remove InputStepMode (it was deprecated in favor of VertexStepMode) 2021-07-27 07:33:19 +00:00
wrap_arrays_in_structs.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
wrap_arrays_in_structs.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
wrap_arrays_in_structs_test.cc Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
zero_init_workgroup_memory.cc sem: Rename Function methods 2021-11-04 22:29:22 +00:00
zero_init_workgroup_memory.h transform: Optimize ZeroInitWorkgroupMemory for arrays 2021-07-30 14:08:06 +00:00
zero_init_workgroup_memory_test.cc transform: Optimize ZeroInitWorkgroupMemory for arrays 2021-07-30 14:08:06 +00:00