From eda2cfbe128e5b71e9a0131f816ade5186ad6420 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Fri, 3 Aug 2018 15:06:09 -0400 Subject: [PATCH] Cleanup includes. (#1795) This Cl cleans up the include paths to be relative to the top level directory. Various include-what-you-use fixes have been added. --- Android.mk | 1 - BUILD.gn | 1 - CMakeLists.txt | 1 - PRESUBMIT.py | 3 - source/assembly_grammar.cpp | 10 +- source/assembly_grammar.h | 8 +- source/binary.cpp | 19 ++-- source/binary.h | 2 +- source/comp/markv.h | 2 +- source/comp/markv_codec.cpp | 48 +++++----- source/comp/markv_model.h | 7 +- source/diagnostic.cpp | 5 +- source/disassemble.cpp | 27 +++--- source/enum_set.h | 2 +- source/enum_string_mapping.cpp | 4 +- source/enum_string_mapping.h | 4 +- source/ext_inst.cpp | 16 ++-- source/ext_inst.h | 2 +- source/extensions.cpp | 4 +- source/extensions.h | 2 +- source/id_descriptor.cpp | 6 +- source/instruction.h | 2 +- source/libspirv.cpp | 6 +- source/link/linker.cpp | 26 +++--- source/message.cpp | 2 +- source/name_mapper.cpp | 6 +- source/name_mapper.h | 2 +- source/opcode.cpp | 14 +-- source/opcode.h | 6 +- source/operand.cpp | 8 +- source/operand.h | 3 +- source/opt/aggressive_dead_code_elim_pass.cpp | 13 +-- source/opt/aggressive_dead_code_elim_pass.h | 13 ++- source/opt/basic_block.cpp | 14 +-- source/opt/basic_block.h | 7 +- source/opt/block_merge_pass.cpp | 8 +- source/opt/block_merge_pass.h | 10 +- source/opt/build_module.cpp | 13 ++- source/opt/build_module.h | 4 +- source/opt/ccp_pass.cpp | 13 ++- source/opt/ccp_pass.h | 15 +-- source/opt/cfg.cpp | 14 ++- source/opt/cfg.h | 5 +- source/opt/cfg_cleanup_pass.cpp | 6 +- source/opt/cfg_cleanup_pass.h | 6 +- source/opt/combine_access_chains.cpp | 10 +- source/opt/combine_access_chains.h | 4 +- source/opt/common_uniform_elim_pass.cpp | 6 +- source/opt/common_uniform_elim_pass.h | 18 ++-- source/opt/compact_ids_pass.cpp | 5 +- source/opt/compact_ids_pass.h | 6 +- source/opt/composite.cpp | 10 +- source/opt/composite.h | 9 +- source/opt/const_folding_rules.cpp | 4 +- source/opt/const_folding_rules.h | 3 +- source/opt/constants.cpp | 5 +- source/opt/constants.h | 11 ++- source/opt/copy_prop_arrays.cpp | 7 +- source/opt/copy_prop_arrays.h | 5 +- source/opt/dead_branch_elim_pass.cpp | 14 ++- source/opt/dead_branch_elim_pass.h | 9 +- source/opt/dead_insert_elim_pass.cpp | 10 +- source/opt/dead_insert_elim_pass.h | 11 ++- source/opt/dead_variable_elimination.cpp | 8 +- source/opt/dead_variable_elimination.h | 4 +- source/opt/decoration_manager.cpp | 6 +- source/opt/decoration_manager.h | 4 +- source/opt/def_use_manager.cpp | 6 +- source/opt/def_use_manager.h | 5 +- source/opt/dominator_analysis.cpp | 4 +- source/opt/dominator_analysis.h | 2 +- source/opt/dominator_tree.cpp | 6 +- source/opt/dominator_tree.h | 4 +- source/opt/eliminate_dead_constant_pass.cpp | 11 ++- source/opt/eliminate_dead_constant_pass.h | 6 +- source/opt/eliminate_dead_functions_pass.cpp | 5 +- source/opt/eliminate_dead_functions_pass.h | 8 +- source/opt/feature_manager.cpp | 6 +- source/opt/feature_manager.h | 6 +- source/opt/flatten_decoration_pass.cpp | 7 +- source/opt/flatten_decoration_pass.h | 6 +- source/opt/fold.cpp | 12 +-- source/opt/fold.h | 8 +- ...ld_spec_constant_op_and_composite_pass.cpp | 10 +- ...fold_spec_constant_op_and_composite_pass.h | 12 +-- source/opt/folding_rules.cpp | 8 +- source/opt/folding_rules.h | 3 +- .../opt/freeze_spec_constant_value_pass.cpp | 4 +- source/opt/freeze_spec_constant_value_pass.h | 6 +- source/opt/function.cpp | 2 +- source/opt/function.h | 7 +- source/opt/if_conversion.cpp | 7 +- source/opt/if_conversion.h | 8 +- source/opt/inline_exhaustive_pass.cpp | 4 +- source/opt/inline_exhaustive_pass.h | 6 +- source/opt/inline_opaque_pass.cpp | 5 +- source/opt/inline_opaque_pass.h | 6 +- source/opt/inline_pass.cpp | 7 +- source/opt/inline_pass.h | 7 +- source/opt/instruction.cpp | 10 +- source/opt/instruction.h | 16 ++-- source/opt/instruction_list.cpp | 2 +- source/opt/instruction_list.h | 10 +- source/opt/ir_builder.h | 13 ++- source/opt/ir_context.cpp | 11 ++- source/opt/ir_context.h | 35 ++++--- source/opt/ir_loader.cpp | 8 +- source/opt/ir_loader.h | 8 +- source/opt/iterator.h | 1 + source/opt/licm_pass.cpp | 7 +- source/opt/licm_pass.h | 11 ++- .../opt/local_access_chain_convert_pass.cpp | 6 +- source/opt/local_access_chain_convert_pass.h | 11 ++- source/opt/local_redundancy_elimination.cpp | 4 +- source/opt/local_redundancy_elimination.h | 8 +- source/opt/local_single_block_elim_pass.cpp | 7 +- source/opt/local_single_block_elim_pass.h | 9 +- source/opt/local_single_store_elim_pass.cpp | 8 +- source/opt/local_single_store_elim_pass.h | 10 +- source/opt/local_ssa_elim_pass.cpp | 8 +- source/opt/local_ssa_elim_pass.h | 10 +- source/opt/loop_dependence.cpp | 8 +- source/opt/loop_dependence.h | 8 +- source/opt/loop_dependence_helpers.cpp | 10 +- source/opt/loop_descriptor.cpp | 21 +++-- source/opt/loop_descriptor.h | 9 +- source/opt/loop_fission.cpp | 7 +- source/opt/loop_fission.h | 12 +-- source/opt/loop_fusion.cpp | 8 +- source/opt/loop_fusion.h | 9 +- source/opt/loop_fusion_pass.cpp | 10 +- source/opt/loop_fusion_pass.h | 2 +- source/opt/loop_peeling.cpp | 14 +-- source/opt/loop_peeling.h | 11 ++- source/opt/loop_unroller.cpp | 11 ++- source/opt/loop_unroller.h | 3 +- source/opt/loop_unswitch_pass.cpp | 20 ++-- source/opt/loop_unswitch_pass.h | 4 +- source/opt/loop_utils.cpp | 13 +-- source/opt/loop_utils.h | 7 +- source/opt/mem_pass.cpp | 16 ++-- source/opt/mem_pass.h | 10 +- source/opt/merge_return_pass.cpp | 16 ++-- source/opt/merge_return_pass.h | 9 +- source/opt/module.cpp | 6 +- source/opt/module.h | 6 +- source/opt/null_pass.h | 4 +- source/opt/optimizer.cpp | 20 ++-- source/opt/pass.cpp | 4 +- source/opt/pass.h | 8 +- source/opt/pass_manager.cpp | 7 +- source/opt/pass_manager.h | 9 +- source/opt/passes.h | 93 ++++++++++--------- source/opt/private_to_local_pass.cpp | 15 ++- source/opt/private_to_local_pass.h | 4 +- source/opt/propagator.cpp | 2 +- source/opt/propagator.h | 5 +- source/opt/reduce_load_size.cpp | 15 ++- source/opt/reduce_load_size.h | 8 +- source/opt/redundancy_elimination.cpp | 4 +- source/opt/redundancy_elimination.h | 10 +- source/opt/reflect.h | 2 +- source/opt/register_pressure.cpp | 15 +-- source/opt/register_pressure.h | 4 +- source/opt/remove_duplicates_pass.cpp | 14 +-- source/opt/remove_duplicates_pass.h | 11 ++- source/opt/replace_invalid_opc.cpp | 3 +- source/opt/replace_invalid_opc.h | 4 +- source/opt/scalar_analysis.cpp | 4 +- source/opt/scalar_analysis.h | 7 +- source/opt/scalar_analysis_nodes.h | 3 +- source/opt/scalar_analysis_simplification.cpp | 2 +- source/opt/scalar_replacement_pass.cpp | 16 ++-- source/opt/scalar_replacement_pass.h | 13 ++- .../set_spec_constant_default_value_pass.cpp | 14 +-- .../set_spec_constant_default_value_pass.h | 8 +- source/opt/simplification_pass.cpp | 4 +- source/opt/simplification_pass.h | 6 +- source/opt/ssa_rewrite_pass.cpp | 12 ++- source/opt/ssa_rewrite_pass.h | 13 ++- source/opt/strength_reduction_pass.cpp | 13 ++- source/opt/strength_reduction_pass.h | 8 +- source/opt/strip_debug_info_pass.cpp | 4 +- source/opt/strip_debug_info_pass.h | 6 +- source/opt/strip_reflect_info_pass.cpp | 7 +- source/opt/strip_reflect_info_pass.h | 6 +- source/opt/type_manager.cpp | 11 ++- source/opt/type_manager.h | 5 +- source/opt/types.cpp | 2 +- source/opt/types.h | 3 +- source/opt/unify_const_pass.cpp | 10 +- source/opt/unify_const_pass.h | 6 +- source/opt/value_number_table.cpp | 6 +- source/opt/value_number_table.h | 3 +- source/opt/vector_dce.cpp | 11 ++- source/opt/vector_dce.h | 7 +- source/opt/workaround1209.cpp | 4 +- source/opt/workaround1209.h | 2 +- source/parsed_operand.cpp | 4 +- source/parsed_operand.h | 1 + source/print.cpp | 2 +- source/spirv_constant.h | 2 +- source/spirv_definition.h | 2 +- source/spirv_endian.cpp | 2 +- source/spirv_stats.cpp | 22 ++--- source/spirv_stats.h | 1 + source/spirv_target_env.cpp | 4 +- source/spirv_validator_options.cpp | 2 +- source/table.cpp | 2 +- source/table.h | 6 +- source/text.cpp | 32 ++++--- source/text.h | 4 +- source/text_handler.cpp | 20 ++-- source/text_handler.h | 11 ++- source/util/bit_stream.cpp | 2 +- source/util/bit_stream.h | 1 + source/util/bit_vector.cpp | 2 +- source/util/hex_float.h | 2 +- source/util/huffman_codec.h | 2 + source/util/ilist.h | 2 +- source/util/move_to_front.h | 1 + source/util/parse_number.cpp | 4 +- source/util/parse_number.h | 2 +- source/util/small_vector.h | 4 +- source/util/string_utils.cpp | 2 +- source/util/string_utils.h | 2 +- source/util/timer.cpp | 2 +- source/val/basic_block.cpp | 2 +- source/val/basic_block.h | 5 +- source/val/construct.cpp | 5 +- source/val/construct.h | 4 +- source/val/decoration.h | 2 +- source/val/function.cpp | 10 +- source/val/function.h | 8 +- source/val/instruction.cpp | 2 +- source/val/instruction.h | 2 +- source/val/validate.h | 1 + source/val/validate_arithmetics.cpp | 2 + source/val/validate_barriers.cpp | 2 + source/val/validate_builtins.cpp | 1 + source/val/validate_capability.cpp | 1 + source/val/validate_decorations.cpp | 1 + source/val/validate_derivatives.cpp | 2 + source/val/validate_ext_inst.cpp | 2 + source/val/validate_id.cpp | 1 + source/val/validate_image.cpp | 2 + source/val/validate_instruction.cpp | 2 +- source/val/validate_interfaces.cpp | 1 + source/val/validate_memory.cpp | 2 + source/val/validation_state.cpp | 13 +-- source/val/validation_state.h | 21 +++-- test/assembly_context_test.cpp | 6 +- test/assembly_format_test.cpp | 2 +- test/binary_destroy_test.cpp | 4 +- test/binary_endianness_test.cpp | 2 +- test/binary_header_get_test.cpp | 2 +- test/binary_parse_test.cpp | 8 +- test/binary_strnlen_s_test.cpp | 2 +- test/binary_to_text.literal_test.cpp | 7 +- test/binary_to_text_test.cpp | 9 +- test/bit_stream.cpp | 4 +- test/c_interface_test.cpp | 7 +- test/comment_test.cpp | 6 +- test/comp/markv_codec_test.cpp | 5 +- test/cpp_interface_test.cpp | 7 +- test/diagnostic_test.cpp | 3 +- test/enum_set_test.cpp | 8 +- test/enum_string_mapping_test.cpp | 6 +- test/ext_inst.debuginfo_test.cpp | 8 +- test/ext_inst.glsl_test.cpp | 5 +- test/ext_inst.opencl_test.cpp | 10 +- test/fix_word_test.cpp | 2 +- .../spvtools_opt_legalization_fuzzer.cpp | 1 + .../spvtools_opt_performance_fuzzer.cpp | 1 + test/fuzzers/spvtools_opt_size_fuzzer.cpp | 1 + test/fuzzers/spvtools_val_fuzzer.cpp | 1 + test/generator_magic_number_test.cpp | 9 +- test/hex_float_test.cpp | 8 +- test/huffman_codec.cpp | 7 +- test/immediate_int_test.cpp | 5 +- test/libspirv_macros_test.cpp | 2 +- test/link/binary_version_test.cpp | 4 +- test/link/entry_points_test.cpp | 4 +- test/link/global_values_amount_test.cpp | 4 +- test/link/ids_limit_test.cpp | 4 +- test/link/linker_fixture.h | 5 +- .../link/matching_imports_to_exports_test.cpp | 4 +- test/link/memory_model_test.cpp | 4 +- test/link/partial_linkage_test.cpp | 4 +- test/link/unique_ids_test.cpp | 5 +- test/log_test.cpp | 9 +- test/move_to_front_test.cpp | 4 +- test/name_mapper_test.cpp | 9 +- test/named_id_test.cpp | 5 +- test/opcode_make_test.cpp | 2 +- test/opcode_require_capabilities_test.cpp | 4 +- test/opcode_split_test.cpp | 2 +- test/opcode_table_get_test.cpp | 5 +- test/operand_capabilities_test.cpp | 6 +- test/operand_pattern_test.cpp | 3 +- test/operand_test.cpp | 4 +- test/opt/aggressive_dead_code_elim_test.cpp | 9 +- test/opt/assembly_builder_test.cpp | 6 +- test/opt/block_merge_test.cpp | 6 +- test/opt/ccp_test.cpp | 9 +- test/opt/cfg_cleanup_test.cpp | 6 +- test/opt/combine_access_chains_test.cpp | 8 +- test/opt/common_uniform_elim_test.cpp | 4 +- test/opt/compact_ids_test.cpp | 10 +- test/opt/constant_manager_test.cpp | 12 ++- test/opt/copy_prop_array_test.cpp | 8 +- test/opt/dead_branch_elim_test.cpp | 6 +- test/opt/dead_insert_elim_test.cpp | 6 +- test/opt/dead_variable_elim_test.cpp | 6 +- test/opt/decoration_manager_test.cpp | 8 +- test/opt/def_use_test.cpp | 23 +++-- test/opt/dominator_tree/common_dominators.cpp | 10 +- test/opt/dominator_tree/generated.cpp | 17 ++-- test/opt/dominator_tree/nested_ifs.cpp | 14 +-- test/opt/dominator_tree/nested_ifs_post.cpp | 15 ++- test/opt/dominator_tree/nested_loops.cpp | 15 ++- .../nested_loops_with_unreachables.cpp | 16 ++-- test/opt/dominator_tree/post.cpp | 16 ++-- test/opt/dominator_tree/simple.cpp | 16 ++-- .../switch_case_fallthrough.cpp | 16 ++-- test/opt/dominator_tree/unreachable_for.cpp | 16 ++-- .../dominator_tree/unreachable_for_post.cpp | 16 ++-- test/opt/eliminate_dead_const_test.cpp | 10 +- test/opt/eliminate_dead_functions_test.cpp | 10 +- test/opt/feature_manager_test.cpp | 10 +- test/opt/flatten_decoration_test.cpp | 8 +- .../opt/fold_spec_const_op_composite_test.cpp | 9 +- test/opt/fold_test.cpp | 22 +++-- test/opt/freeze_spec_const_test.cpp | 8 +- test/opt/function_utils.h | 4 +- test/opt/if_conversion_test.cpp | 8 +- test/opt/inline_opaque_test.cpp | 6 +- test/opt/inline_test.cpp | 8 +- test/opt/insert_extract_elim_test.cpp | 8 +- test/opt/instruction_list_test.cpp | 6 +- test/opt/instruction_test.cpp | 14 +-- test/opt/ir_builder.cpp | 21 +++-- test/opt/ir_context_test.cpp | 17 ++-- test/opt/ir_loader_test.cpp | 12 ++- test/opt/iterator_test.cpp | 4 +- test/opt/line_debug_info_test.cpp | 4 +- test/opt/local_access_chain_convert_test.cpp | 6 +- .../opt/local_redundancy_elimination_test.cpp | 11 ++- test/opt/local_single_block_elim.cpp | 6 +- test/opt/local_single_store_elim_test.cpp | 6 +- test/opt/local_ssa_elim_test.cpp | 7 +- .../dependence_analysis.cpp | 22 ++--- .../dependence_analysis_helpers.cpp | 24 +++-- .../fusion_compatibility.cpp | 9 +- .../opt/loop_optimizations/fusion_illegal.cpp | 9 +- test/opt/loop_optimizations/fusion_legal.cpp | 11 +-- test/opt/loop_optimizations/fusion_pass.cpp | 7 +- .../hoist_all_loop_types.cpp | 7 +- .../hoist_double_nested_loops.cpp | 7 +- .../hoist_from_independent_loops.cpp | 7 +- .../loop_optimizations/hoist_simple_case.cpp | 7 +- .../hoist_single_nested_loops.cpp | 7 +- .../hoist_without_preheader.cpp | 7 +- test/opt/loop_optimizations/lcssa.cpp | 18 ++-- .../loop_optimizations/loop_descriptions.cpp | 15 ++- test/opt/loop_optimizations/loop_fission.cpp | 20 ++-- test/opt/loop_optimizations/nested_loops.cpp | 20 ++-- test/opt/loop_optimizations/peeling.cpp | 15 +-- test/opt/loop_optimizations/peeling_pass.cpp | 15 +-- .../loop_optimizations/unroll_assumptions.cpp | 18 ++-- test/opt/loop_optimizations/unroll_simple.cpp | 18 ++-- test/opt/loop_optimizations/unswitch.cpp | 7 +- test/opt/module_test.cpp | 12 +-- test/opt/module_utils.h | 2 +- test/opt/optimizer_test.cpp | 7 +- test/opt/pass_fixture.h | 15 +-- test/opt/pass_manager_test.cpp | 13 ++- test/opt/pass_merge_return_test.cpp | 8 +- test/opt/pass_remove_duplicates_test.cpp | 8 +- test/opt/pass_test.cpp | 12 +-- test/opt/pass_utils.cpp | 2 +- test/opt/pass_utils.h | 1 + test/opt/private_to_local_test.cpp | 11 ++- test/opt/propagator_test.cpp | 20 ++-- test/opt/reduce_load_size_test.cpp | 6 +- test/opt/redundancy_elimination_test.cpp | 11 ++- test/opt/register_liveness.cpp | 14 +-- test/opt/replace_invalid_opc_test.cpp | 10 +- test/opt/scalar_analysis.cpp | 22 ++--- test/opt/scalar_replacement_test.cpp | 8 +- .../opt/set_spec_const_default_value_test.cpp | 5 +- test/opt/simplification_test.cpp | 7 +- test/opt/strength_reduction_test.cpp | 12 ++- test/opt/strip_debug_info_test.cpp | 6 +- test/opt/strip_reflect_info_test.cpp | 6 +- test/opt/type_manager_test.cpp | 18 ++-- test/opt/types_test.cpp | 8 +- test/opt/unify_const_test.cpp | 10 +- test/opt/utils_test.cpp | 6 +- test/opt/value_table_test.cpp | 9 +- test/opt/vector_dce_test.cpp | 6 +- test/opt/workaround1209_test.cpp | 11 ++- test/parse_number_test.cpp | 1 + test/preserve_numeric_ids_test.cpp | 2 +- test/software_version_test.cpp | 4 +- test/stats/stats_aggregate_test.cpp | 5 +- test/stats/stats_analyzer_test.cpp | 4 +- test/target_env_test.cpp | 6 +- test/test_fixture.h | 5 +- test/text_advance_test.cpp | 4 +- test/text_destroy_test.cpp | 2 +- test/text_literal_test.cpp | 11 ++- test/text_start_new_inst_test.cpp | 4 +- test/text_to_binary.annotation_test.cpp | 7 +- test/text_to_binary.barrier_test.cpp | 5 +- test/text_to_binary.constant_test.cpp | 7 +- test/text_to_binary.control_flow_test.cpp | 6 +- test/text_to_binary.debug_test.cpp | 6 +- ...ext_to_binary.device_side_enqueue_test.cpp | 6 +- test/text_to_binary.extension_test.cpp | 11 ++- test/text_to_binary.function_test.cpp | 6 +- test/text_to_binary.group_test.cpp | 6 +- test/text_to_binary.image_test.cpp | 6 +- test/text_to_binary.literal_test.cpp | 4 +- test/text_to_binary.memory_test.cpp | 7 +- test/text_to_binary.misc_test.cpp | 4 +- test/text_to_binary.mode_setting_test.cpp | 7 +- test/text_to_binary.pipe_storage_test.cpp | 2 +- .../text_to_binary.reserved_sampling_test.cpp | 5 +- .../text_to_binary.subgroup_dispatch_test.cpp | 4 +- test/text_to_binary.type_declaration_test.cpp | 6 +- test/text_to_binary_test.cpp | 6 +- test/text_word_get_test.cpp | 4 +- test/unit_spirv.cpp | 4 +- test/unit_spirv.h | 4 +- test/util/bit_vector_test.cpp | 2 +- test/util/ilist_test.cpp | 4 +- test/util/small_vector_test.cpp | 4 +- test/val/val_adjacency_test.cpp | 4 +- test/val/val_arithmetics_test.cpp | 4 +- test/val/val_atomics_test.cpp | 4 +- test/val/val_barriers_test.cpp | 4 +- test/val/val_bitwise_test.cpp | 4 +- test/val/val_builtins_test.cpp | 6 +- test/val/val_capability_test.cpp | 12 +-- test/val/val_cfg_test.cpp | 6 +- test/val/val_composites_test.cpp | 4 +- test/val/val_conversion_test.cpp | 4 +- test/val/val_data_test.cpp | 4 +- test/val/val_decoration_test.cpp | 7 +- test/val/val_derivatives_test.cpp | 4 +- test/val/val_explicit_reserved_test.cpp | 5 +- test/val/val_ext_inst_test.cpp | 5 +- test/val/val_extensions_test.cpp | 13 +-- test/val/val_fixtures.h | 7 +- test/val/val_id_test.cpp | 7 +- test/val/val_image_test.cpp | 4 +- test/val/val_interfaces_test.cpp | 6 +- test/val/val_layout_test.cpp | 7 +- test/val/val_limits_test.cpp | 4 +- test/val/val_literals_test.cpp | 2 +- test/val/val_logicals_test.cpp | 4 +- test/val/val_non_uniform_test.cpp | 5 +- test/val/val_primitives_test.cpp | 4 +- test/val/val_ssa_test.cpp | 4 +- test/val/val_state_test.cpp | 18 ++-- test/val/val_storage_test.cpp | 2 +- test/val/val_type_unique_test.cpp | 4 +- test/val/val_validation_state_test.cpp | 6 +- test/val/val_version_test.cpp | 5 +- test/val/val_webgpu_test.cpp | 5 +- tools/cfg/bin_to_dot.cpp | 6 +- tools/cfg/bin_to_dot.h | 1 + tools/cfg/cfg.cpp | 3 +- tools/comp/markv.cpp | 4 +- tools/comp/markv_model_factory.cpp | 4 +- tools/comp/markv_model_shader.cpp | 4 +- tools/opt/opt.cpp | 12 +-- tools/stats/stats.cpp | 3 +- tools/stats/stats_analyzer.cpp | 7 +- tools/stats/stats_analyzer.h | 1 + 481 files changed, 2060 insertions(+), 1606 deletions(-) diff --git a/Android.mk b/Android.mk index 163f9a36b9..6c55644473 100644 --- a/Android.mk +++ b/Android.mk @@ -305,7 +305,6 @@ include $(CLEAR_VARS) LOCAL_MODULE := SPIRV-Tools LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/include \ - $(LOCAL_PATH)/source \ $(LOCAL_PATH)/external/spirv-headers/include \ $(SPVTOOLS_OUT_PATH) LOCAL_EXPORT_C_INCLUDES := \ diff --git a/BUILD.gn b/BUILD.gn index f30cafdb09..f19ccf1914 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -262,7 +262,6 @@ config("spvtools_config") { include_dirs = [ ".", "include", - "source", "$target_gen_dir", "${spirv_headers}/include", ] diff --git a/CMakeLists.txt b/CMakeLists.txt index 4229fded83..8e8e3d07ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,7 +101,6 @@ elseif(MSVC) endif() endif() -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/source) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/) option(SPIRV_COLOR_TERMINAL "Enable color terminal output" ON) diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 3f89e8e3dd..ebf4fd325b 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -19,9 +19,6 @@ """ LINT_FILTERS = [ - "-build/include", - "-build/include_order", - "-build/include_what_you_use", "-build/storage_class", "-readability/braces", "-readability/casting", diff --git a/source/assembly_grammar.cpp b/source/assembly_grammar.cpp index f20810d902..4d98e3dab8 100644 --- a/source/assembly_grammar.cpp +++ b/source/assembly_grammar.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "assembly_grammar.h" +#include "source/assembly_grammar.h" #include #include #include -#include "ext_inst.h" -#include "opcode.h" -#include "operand.h" -#include "table.h" +#include "source/ext_inst.h" +#include "source/opcode.h" +#include "source/operand.h" +#include "source/table.h" namespace spvtools { namespace { diff --git a/source/assembly_grammar.h b/source/assembly_grammar.h index 1053396a34..17c2bd3bac 100644 --- a/source/assembly_grammar.h +++ b/source/assembly_grammar.h @@ -15,11 +15,11 @@ #ifndef SOURCE_ASSEMBLY_GRAMMAR_H_ #define SOURCE_ASSEMBLY_GRAMMAR_H_ -#include "enum_set.h" -#include "latest_version_spirv_header.h" -#include "operand.h" +#include "source/enum_set.h" +#include "source/latest_version_spirv_header.h" +#include "source/operand.h" +#include "source/table.h" #include "spirv-tools/libspirv.h" -#include "table.h" namespace spvtools { diff --git a/source/binary.cpp b/source/binary.cpp index 690ef0a54c..6604d80945 100644 --- a/source/binary.cpp +++ b/source/binary.cpp @@ -12,24 +12,25 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "binary.h" +#include "source/binary.h" #include #include #include #include #include +#include #include #include -#include "assembly_grammar.h" -#include "diagnostic.h" -#include "ext_inst.h" -#include "latest_version_spirv_header.h" -#include "opcode.h" -#include "operand.h" -#include "spirv_constant.h" -#include "spirv_endian.h" +#include "source/assembly_grammar.h" +#include "source/diagnostic.h" +#include "source/ext_inst.h" +#include "source/latest_version_spirv_header.h" +#include "source/opcode.h" +#include "source/operand.h" +#include "source/spirv_constant.h" +#include "source/spirv_endian.h" spv_result_t spvBinaryHeaderGet(const spv_const_binary binary, const spv_endianness_t endian, diff --git a/source/binary.h b/source/binary.h index a707bee751..66d24c7e41 100644 --- a/source/binary.h +++ b/source/binary.h @@ -15,8 +15,8 @@ #ifndef SOURCE_BINARY_H_ #define SOURCE_BINARY_H_ +#include "source/spirv_definition.h" #include "spirv-tools/libspirv.h" -#include "spirv_definition.h" // Functions diff --git a/source/comp/markv.h b/source/comp/markv.h index e687773f16..16b4982249 100644 --- a/source/comp/markv.h +++ b/source/comp/markv.h @@ -24,7 +24,7 @@ #include #include -#include "comp/markv_model.h" +#include "source/comp/markv_model.h" #include "spirv-tools/libspirv.hpp" namespace spvtools { diff --git a/source/comp/markv_codec.cpp b/source/comp/markv_codec.cpp index 825f2eb5a3..2956d8ed34 100644 --- a/source/comp/markv_codec.cpp +++ b/source/comp/markv_codec.cpp @@ -26,39 +26,41 @@ #include #include #include +#include #include +#include #include #include #include #include #include +#include #include -#include "latest_version_glsl_std_450_header.h" -#include "latest_version_opencl_std_header.h" -#include "latest_version_spirv_header.h" - -#include "binary.h" -#include "diagnostic.h" -#include "enum_string_mapping.h" -#include "ext_inst.h" -#include "extensions.h" -#include "id_descriptor.h" -#include "instruction.h" -#include "markv.h" -#include "markv_model.h" -#include "opcode.h" -#include "operand.h" #include "source/assembly_grammar.h" +#include "source/binary.h" +#include "source/comp/markv.h" +#include "source/comp/markv_model.h" +#include "source/diagnostic.h" +#include "source/enum_string_mapping.h" +#include "source/ext_inst.h" +#include "source/extensions.h" +#include "source/id_descriptor.h" +#include "source/instruction.h" +#include "source/latest_version_glsl_std_450_header.h" +#include "source/latest_version_opencl_std_header.h" +#include "source/latest_version_spirv_header.h" +#include "source/opcode.h" +#include "source/operand.h" +#include "source/spirv_endian.h" +#include "source/spirv_validator_options.h" +#include "source/util/bit_stream.h" +#include "source/util/huffman_codec.h" +#include "source/util/move_to_front.h" +#include "source/util/parse_number.h" +#include "source/val/instruction.h" +#include "source/val/validate.h" #include "spirv-tools/libspirv.h" -#include "spirv_endian.h" -#include "spirv_validator_options.h" -#include "util/bit_stream.h" -#include "util/huffman_codec.h" -#include "util/move_to_front.h" -#include "util/parse_number.h" -#include "val/instruction.h" -#include "val/validate.h" namespace spvtools { namespace comp { diff --git a/source/comp/markv_model.h b/source/comp/markv_model.h index 9533a5df80..61ccf2343b 100644 --- a/source/comp/markv_model.h +++ b/source/comp/markv_model.h @@ -16,12 +16,15 @@ #define SOURCE_COMP_MARKV_MODEL_H_ #include +#include +#include #include +#include #include -#include "latest_version_spirv_header.h" +#include "source/latest_version_spirv_header.h" +#include "source/util/huffman_codec.h" #include "spirv-tools/libspirv.h" -#include "util/huffman_codec.h" namespace spvtools { namespace comp { diff --git a/source/diagnostic.cpp b/source/diagnostic.cpp index ad9d3836ba..243e93c226 100644 --- a/source/diagnostic.cpp +++ b/source/diagnostic.cpp @@ -12,14 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "diagnostic.h" +#include "source/diagnostic.h" #include #include #include #include +#include -#include "table.h" +#include "source/table.h" // Diagnostic API diff --git a/source/disassemble.cpp b/source/disassemble.cpp index 7bd64a73fe..11842cfc52 100644 --- a/source/disassemble.cpp +++ b/source/disassemble.cpp @@ -21,20 +21,21 @@ #include #include #include - -#include "assembly_grammar.h" -#include "binary.h" -#include "diagnostic.h" -#include "disassemble.h" -#include "ext_inst.h" -#include "name_mapper.h" -#include "opcode.h" -#include "parsed_operand.h" -#include "print.h" +#include + +#include "source/assembly_grammar.h" +#include "source/binary.h" +#include "source/diagnostic.h" +#include "source/disassemble.h" +#include "source/ext_inst.h" +#include "source/name_mapper.h" +#include "source/opcode.h" +#include "source/parsed_operand.h" +#include "source/print.h" +#include "source/spirv_constant.h" +#include "source/spirv_endian.h" +#include "source/util/hex_float.h" #include "spirv-tools/libspirv.h" -#include "spirv_constant.h" -#include "spirv_endian.h" -#include "util/hex_float.h" namespace { diff --git a/source/enum_set.h b/source/enum_set.h index 95cfc497e9..b428effbad 100644 --- a/source/enum_set.h +++ b/source/enum_set.h @@ -21,7 +21,7 @@ #include #include -#include "latest_version_spirv_header.h" +#include "source/latest_version_spirv_header.h" namespace spvtools { diff --git a/source/enum_string_mapping.cpp b/source/enum_string_mapping.cpp index 20bbdfc108..32361a08d3 100644 --- a/source/enum_string_mapping.cpp +++ b/source/enum_string_mapping.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "enum_string_mapping.h" +#include "source/enum_string_mapping.h" #include #include @@ -20,7 +20,7 @@ #include #include -#include "extensions.h" +#include "source/extensions.h" namespace spvtools { diff --git a/source/enum_string_mapping.h b/source/enum_string_mapping.h index e8f00ebfc8..af8f56b82a 100644 --- a/source/enum_string_mapping.h +++ b/source/enum_string_mapping.h @@ -17,8 +17,8 @@ #include -#include "extensions.h" -#include "latest_version_spirv_header.h" +#include "source/extensions.h" +#include "source/latest_version_spirv_header.h" namespace spvtools { diff --git a/source/ext_inst.cpp b/source/ext_inst.cpp index acc6dc658d..a4c00c2fff 100644 --- a/source/ext_inst.cpp +++ b/source/ext_inst.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "ext_inst.h" +#include "source/ext_inst.h" #include #include @@ -22,14 +22,14 @@ // TODO(dneto): DebugInfo.h should probably move to SPIRV-Headers. #include "DebugInfo.h" -#include "latest_version_glsl_std_450_header.h" -#include "latest_version_opencl_std_header.h" -#include "macro.h" -#include "spirv_definition.h" +#include "source/latest_version_glsl_std_450_header.h" +#include "source/latest_version_opencl_std_header.h" +#include "source/macro.h" +#include "source/spirv_definition.h" -#include "debuginfo.insts.inc" // defines opencl_entries -#include "glsl.std.450.insts.inc" // defines glsl_entries -#include "opencl.std.insts.inc" // defines opencl_entries +#include "debuginfo.insts.inc" +#include "glsl.std.450.insts.inc" +#include "opencl.std.insts.inc" #include "spv-amd-gcn-shader.insts.inc" #include "spv-amd-shader-ballot.insts.inc" diff --git a/source/ext_inst.h b/source/ext_inst.h index 18cbf01ead..a821cc2bc7 100644 --- a/source/ext_inst.h +++ b/source/ext_inst.h @@ -15,8 +15,8 @@ #ifndef SOURCE_EXT_INST_H_ #define SOURCE_EXT_INST_H_ +#include "source/table.h" #include "spirv-tools/libspirv.h" -#include "table.h" // Gets the type of the extended instruction set with the specified name. spv_ext_inst_type_t spvExtInstImportTypeGet(const char* name); diff --git a/source/extensions.cpp b/source/extensions.cpp index bf3849cbff..a94db273e7 100644 --- a/source/extensions.cpp +++ b/source/extensions.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "extensions.h" +#include "source/extensions.h" #include #include #include -#include "enum_string_mapping.h" +#include "source/enum_string_mapping.h" namespace spvtools { diff --git a/source/extensions.h b/source/extensions.h index 4b0c9119a1..8023444c31 100644 --- a/source/extensions.h +++ b/source/extensions.h @@ -17,7 +17,7 @@ #include -#include "enum_set.h" +#include "source/enum_set.h" #include "spirv-tools/libspirv.h" namespace spvtools { diff --git a/source/id_descriptor.cpp b/source/id_descriptor.cpp index 9dd4327700..d44ed672c2 100644 --- a/source/id_descriptor.cpp +++ b/source/id_descriptor.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "id_descriptor.h" +#include "source/id_descriptor.h" #include #include -#include "opcode.h" -#include "operand.h" +#include "source/opcode.h" +#include "source/operand.h" namespace spvtools { namespace { diff --git a/source/instruction.h b/source/instruction.h index 439a5ada1d..9e7dccd03b 100644 --- a/source/instruction.h +++ b/source/instruction.h @@ -18,7 +18,7 @@ #include #include -#include "latest_version_spirv_header.h" +#include "source/latest_version_spirv_header.h" #include "spirv-tools/libspirv.h" // Describes an instruction. diff --git a/source/libspirv.cpp b/source/libspirv.cpp index c9976ca4bf..53a4ffb898 100644 --- a/source/libspirv.cpp +++ b/source/libspirv.cpp @@ -14,7 +14,11 @@ #include "spirv-tools/libspirv.hpp" -#include "table.h" +#include +#include +#include + +#include "source/table.h" namespace spvtools { diff --git a/source/link/linker.cpp b/source/link/linker.cpp index 4a7e8063d2..5279c78099 100644 --- a/source/link/linker.cpp +++ b/source/link/linker.cpp @@ -14,26 +14,28 @@ #include "spirv-tools/linker.hpp" +#include #include #include - -#include #include +#include +#include #include #include +#include #include -#include "assembly_grammar.h" -#include "diagnostic.h" -#include "opt/build_module.h" -#include "opt/compact_ids_pass.h" -#include "opt/decoration_manager.h" -#include "opt/ir_loader.h" -#include "opt/make_unique.h" -#include "opt/pass_manager.h" -#include "opt/remove_duplicates_pass.h" +#include "source/assembly_grammar.h" +#include "source/diagnostic.h" +#include "source/opt/build_module.h" +#include "source/opt/compact_ids_pass.h" +#include "source/opt/decoration_manager.h" +#include "source/opt/ir_loader.h" +#include "source/opt/make_unique.h" +#include "source/opt/pass_manager.h" +#include "source/opt/remove_duplicates_pass.h" +#include "source/spirv_target_env.h" #include "spirv-tools/libspirv.hpp" -#include "spirv_target_env.h" namespace spvtools { namespace { diff --git a/source/message.cpp b/source/message.cpp index 030fa4e232..d7e2f3cc25 100644 --- a/source/message.cpp +++ b/source/message.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "message.h" +#include "source/message.h" #include diff --git a/source/name_mapper.cpp b/source/name_mapper.cpp index d41eb31ba5..43fdfb34b5 100644 --- a/source/name_mapper.cpp +++ b/source/name_mapper.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "name_mapper.h" +#include "source/name_mapper.h" #include #include @@ -24,8 +24,8 @@ #include "spirv-tools/libspirv.h" -#include "latest_version_spirv_header.h" -#include "parsed_operand.h" +#include "source/latest_version_spirv_header.h" +#include "source/parsed_operand.h" namespace spvtools { namespace { diff --git a/source/name_mapper.h b/source/name_mapper.h index 2f94d5e01b..6902141b19 100644 --- a/source/name_mapper.h +++ b/source/name_mapper.h @@ -20,7 +20,7 @@ #include #include -#include "assembly_grammar.h" +#include "source/assembly_grammar.h" #include "spirv-tools/libspirv.h" namespace spvtools { diff --git a/source/opcode.cpp b/source/opcode.cpp index f03da6cf11..af34b64605 100644 --- a/source/opcode.cpp +++ b/source/opcode.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opcode.h" +#include "source/opcode.h" #include #include @@ -20,12 +20,12 @@ #include #include -#include "instruction.h" -#include "macro.h" +#include "source/instruction.h" +#include "source/macro.h" +#include "source/spirv_constant.h" +#include "source/spirv_endian.h" +#include "source/spirv_target_env.h" #include "spirv-tools/libspirv.h" -#include "spirv_constant.h" -#include "spirv_endian.h" -#include "spirv_target_env.h" namespace { struct OpcodeDescPtrLen { @@ -33,7 +33,7 @@ struct OpcodeDescPtrLen { uint32_t len; }; -#include "core.insts-unified1.inc" // defines kOpcodeTableEntries_1_3 +#include "core.insts-unified1.inc" static const spv_opcode_table_t kOpcodeTable = {ARRAY_SIZE(kOpcodeTableEntries), kOpcodeTableEntries}; diff --git a/source/opcode.h b/source/opcode.h index 78462043d5..5643a64c8b 100644 --- a/source/opcode.h +++ b/source/opcode.h @@ -15,10 +15,10 @@ #ifndef SOURCE_OPCODE_H_ #define SOURCE_OPCODE_H_ -#include "instruction.h" -#include "latest_version_spirv_header.h" +#include "source/instruction.h" +#include "source/latest_version_spirv_header.h" +#include "source/table.h" #include "spirv-tools/libspirv.h" -#include "table.h" // Returns the name of a registered SPIR-V generator as a null-terminated // string. If the generator is not known, then returns the string "Unknown". diff --git a/source/operand.cpp b/source/operand.cpp index 01e51d2f91..c97b13fc65 100644 --- a/source/operand.cpp +++ b/source/operand.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "operand.h" +#include "source/operand.h" #include #include #include -#include "macro.h" -#include "spirv_constant.h" -#include "spirv_target_env.h" +#include "source/macro.h" +#include "source/spirv_constant.h" +#include "source/spirv_target_env.h" // For now, assume unified1 contains up to SPIR-V 1.3 and no later // SPIR-V version. diff --git a/source/operand.h b/source/operand.h index b25673746f..76f16f7ae5 100644 --- a/source/operand.h +++ b/source/operand.h @@ -16,9 +16,10 @@ #define SOURCE_OPERAND_H_ #include +#include +#include "source/table.h" #include "spirv-tools/libspirv.h" -#include "table.h" // A sequence of operand types. // diff --git a/source/opt/aggressive_dead_code_elim_pass.cpp b/source/opt/aggressive_dead_code_elim_pass.cpp index 54fc8d7177..39970a5634 100644 --- a/source/opt/aggressive_dead_code_elim_pass.cpp +++ b/source/opt/aggressive_dead_code_elim_pass.cpp @@ -15,15 +15,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "aggressive_dead_code_elim_pass.h" - -#include "cfa.h" -#include "iterator.h" -#include "latest_version_glsl_std_450_header.h" -#include "reflect.h" +#include "source/opt/aggressive_dead_code_elim_pass.h" +#include #include +#include "source/cfa.h" +#include "source/latest_version_glsl_std_450_header.h" +#include "source/opt/iterator.h" +#include "source/opt/reflect.h" + namespace spvtools { namespace opt { diff --git a/source/opt/aggressive_dead_code_elim_pass.h b/source/opt/aggressive_dead_code_elim_pass.h index 9c25505c27..73457cee78 100644 --- a/source/opt/aggressive_dead_code_elim_pass.h +++ b/source/opt/aggressive_dead_code_elim_pass.h @@ -17,18 +17,21 @@ #ifndef SOURCE_OPT_AGGRESSIVE_DEAD_CODE_ELIM_PASS_H_ #define SOURCE_OPT_AGGRESSIVE_DEAD_CODE_ELIM_PASS_H_ -#include #include +#include #include #include +#include #include #include #include +#include -#include "basic_block.h" -#include "def_use_manager.h" -#include "mem_pass.h" -#include "module.h" +#include "source/opt/basic_block.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/mem_pass.h" +#include "source/opt/module.h" +#include "source/util/bit_vector.h" namespace spvtools { namespace opt { diff --git a/source/opt/basic_block.cpp b/source/opt/basic_block.cpp index 9d101ba201..1165efd06c 100644 --- a/source/opt/basic_block.cpp +++ b/source/opt/basic_block.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "basic_block.h" -#include "function.h" -#include "ir_context.h" -#include "module.h" -#include "reflect.h" - -#include "make_unique.h" +#include "source/opt/basic_block.h" #include +#include "source/opt/function.h" +#include "source/opt/ir_context.h" +#include "source/opt/make_unique.h" +#include "source/opt/module.h" +#include "source/opt/reflect.h" + namespace spvtools { namespace opt { namespace { diff --git a/source/opt/basic_block.h b/source/opt/basic_block.h index f67b920b3e..9e1706e14f 100644 --- a/source/opt/basic_block.h +++ b/source/opt/basic_block.h @@ -22,12 +22,13 @@ #include #include #include +#include #include #include -#include "instruction.h" -#include "instruction_list.h" -#include "iterator.h" +#include "source/opt/instruction.h" +#include "source/opt/instruction_list.h" +#include "source/opt/iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/block_merge_pass.cpp b/source/opt/block_merge_pass.cpp index 9d5bc5cde7..aa4c1bd924 100644 --- a/source/opt/block_merge_pass.cpp +++ b/source/opt/block_merge_pass.cpp @@ -14,10 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "block_merge_pass.h" +#include "source/opt/block_merge_pass.h" -#include "ir_context.h" -#include "iterator.h" +#include + +#include "source/opt/ir_context.h" +#include "source/opt/iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/block_merge_pass.h b/source/opt/block_merge_pass.h index 08891d400c..0ecde48846 100644 --- a/source/opt/block_merge_pass.h +++ b/source/opt/block_merge_pass.h @@ -24,11 +24,11 @@ #include #include -#include "basic_block.h" -#include "def_use_manager.h" -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include "source/opt/basic_block.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/build_module.cpp b/source/opt/build_module.cpp index e0b2ce1b31..a724994b3f 100644 --- a/source/opt/build_module.cpp +++ b/source/opt/build_module.cpp @@ -12,12 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "build_module.h" +#include "source/opt/build_module.h" -#include "ir_context.h" -#include "ir_loader.h" -#include "make_unique.h" -#include "table.h" +#include +#include + +#include "source/opt/ir_context.h" +#include "source/opt/ir_loader.h" +#include "source/opt/make_unique.h" +#include "source/table.h" namespace spvtools { namespace { diff --git a/source/opt/build_module.h b/source/opt/build_module.h index 71e963c84b..c9d1cf2e45 100644 --- a/source/opt/build_module.h +++ b/source/opt/build_module.h @@ -18,8 +18,8 @@ #include #include -#include "ir_context.h" -#include "module.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" #include "spirv-tools/libspirv.hpp" namespace spvtools { diff --git a/source/opt/ccp_pass.cpp b/source/opt/ccp_pass.cpp index 570d2022b0..a8411d9fe1 100644 --- a/source/opt/ccp_pass.cpp +++ b/source/opt/ccp_pass.cpp @@ -16,13 +16,16 @@ // // Constant propagation with conditional branches, // Wegman and Zadeck, ACM TOPLAS 13(2):181-210. -#include "ccp_pass.h" -#include "fold.h" -#include "function.h" -#include "module.h" -#include "propagator.h" + +#include "source/opt/ccp_pass.h" #include +#include + +#include "source/opt/fold.h" +#include "source/opt/function.h" +#include "source/opt/module.h" +#include "source/opt/propagator.h" namespace spvtools { namespace opt { diff --git a/source/opt/ccp_pass.h b/source/opt/ccp_pass.h index 15a82e1d8a..178fd1281d 100644 --- a/source/opt/ccp_pass.h +++ b/source/opt/ccp_pass.h @@ -15,12 +15,15 @@ #ifndef SOURCE_OPT_CCP_PASS_H_ #define SOURCE_OPT_CCP_PASS_H_ -#include "constants.h" -#include "function.h" -#include "ir_context.h" -#include "mem_pass.h" -#include "module.h" -#include "propagator.h" +#include +#include + +#include "source/opt/constants.h" +#include "source/opt/function.h" +#include "source/opt/ir_context.h" +#include "source/opt/mem_pass.h" +#include "source/opt/module.h" +#include "source/opt/propagator.h" namespace spvtools { namespace opt { diff --git a/source/opt/cfg.cpp b/source/opt/cfg.cpp index fa3e50f335..dcf2b573ff 100644 --- a/source/opt/cfg.cpp +++ b/source/opt/cfg.cpp @@ -12,11 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "cfg.h" -#include "cfa.h" -#include "ir_builder.h" -#include "ir_context.h" -#include "module.h" +#include "source/opt/cfg.h" + +#include +#include + +#include "source/cfa.h" +#include "source/opt/ir_builder.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/cfg.h b/source/opt/cfg.h index f1dff650d2..375d09c5c7 100644 --- a/source/opt/cfg.h +++ b/source/opt/cfg.h @@ -15,12 +15,13 @@ #ifndef SOURCE_OPT_CFG_H_ #define SOURCE_OPT_CFG_H_ -#include "basic_block.h" - #include #include #include #include +#include + +#include "source/opt/basic_block.h" namespace spvtools { namespace opt { diff --git a/source/opt/cfg_cleanup_pass.cpp b/source/opt/cfg_cleanup_pass.cpp index ac99135eca..2d548462b4 100644 --- a/source/opt/cfg_cleanup_pass.cpp +++ b/source/opt/cfg_cleanup_pass.cpp @@ -19,10 +19,10 @@ #include #include -#include "cfg_cleanup_pass.h" +#include "source/opt/cfg_cleanup_pass.h" -#include "function.h" -#include "module.h" +#include "source/opt/function.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/cfg_cleanup_pass.h b/source/opt/cfg_cleanup_pass.h index 065c8dd1f0..afbc67c09f 100644 --- a/source/opt/cfg_cleanup_pass.h +++ b/source/opt/cfg_cleanup_pass.h @@ -15,9 +15,9 @@ #ifndef SOURCE_OPT_CFG_CLEANUP_PASS_H_ #define SOURCE_OPT_CFG_CLEANUP_PASS_H_ -#include "function.h" -#include "mem_pass.h" -#include "module.h" +#include "source/opt/function.h" +#include "source/opt/mem_pass.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/combine_access_chains.cpp b/source/opt/combine_access_chains.cpp index ccefb25809..facfc24b6c 100644 --- a/source/opt/combine_access_chains.cpp +++ b/source/opt/combine_access_chains.cpp @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "combine_access_chains.h" +#include "source/opt/combine_access_chains.h" -#include "constants.h" -#include "ir_builder.h" -#include "ir_context.h" +#include + +#include "source/opt/constants.h" +#include "source/opt/ir_builder.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/combine_access_chains.h b/source/opt/combine_access_chains.h index bbf6de0ec4..75885dadaf 100644 --- a/source/opt/combine_access_chains.h +++ b/source/opt/combine_access_chains.h @@ -15,7 +15,9 @@ #ifndef SOURCE_OPT_COMBINE_ACCESS_CHAINS_H_ #define SOURCE_OPT_COMBINE_ACCESS_CHAINS_H_ -#include "pass.h" +#include + +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/common_uniform_elim_pass.cpp b/source/opt/common_uniform_elim_pass.cpp index e6a2b1c822..f7fe0b9e6b 100644 --- a/source/opt/common_uniform_elim_pass.cpp +++ b/source/opt/common_uniform_elim_pass.cpp @@ -14,9 +14,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "common_uniform_elim_pass.h" -#include "cfa.h" -#include "ir_context.h" +#include "source/opt/common_uniform_elim_pass.h" +#include "source/cfa.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/common_uniform_elim_pass.h b/source/opt/common_uniform_elim_pass.h index e3a6106eb1..e6ef69c5dc 100644 --- a/source/opt/common_uniform_elim_pass.h +++ b/source/opt/common_uniform_elim_pass.h @@ -18,18 +18,22 @@ #define SOURCE_OPT_COMMON_UNIFORM_ELIM_PASS_H_ #include +#include #include +#include #include +#include #include #include #include - -#include "basic_block.h" -#include "decoration_manager.h" -#include "def_use_manager.h" -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include + +#include "source/opt/basic_block.h" +#include "source/opt/decoration_manager.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/compact_ids_pass.cpp b/source/opt/compact_ids_pass.cpp index 7fe58228b4..68b940f1d4 100644 --- a/source/opt/compact_ids_pass.cpp +++ b/source/opt/compact_ids_pass.cpp @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "compact_ids_pass.h" -#include "ir_context.h" +#include "source/opt/compact_ids_pass.h" #include #include +#include "source/opt/ir_context.h" + namespace spvtools { namespace opt { diff --git a/source/opt/compact_ids_pass.h b/source/opt/compact_ids_pass.h index a73f1815cd..d97ae0fa49 100644 --- a/source/opt/compact_ids_pass.h +++ b/source/opt/compact_ids_pass.h @@ -15,9 +15,9 @@ #ifndef SOURCE_OPT_COMPACT_IDS_PASS_H_ #define SOURCE_OPT_COMPACT_IDS_PASS_H_ -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/composite.cpp b/source/opt/composite.cpp index 8d35d05b32..2b4dca2579 100644 --- a/source/opt/composite.cpp +++ b/source/opt/composite.cpp @@ -14,14 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "composite.h" - -#include "ir_context.h" -#include "iterator.h" -#include "spirv/1.2/GLSL.std.450.h" +#include "source/opt/composite.h" #include +#include "source/opt/ir_context.h" +#include "source/opt/iterator.h" +#include "spirv/1.2/GLSL.std.450.h" + namespace spvtools { namespace opt { diff --git a/source/opt/composite.h b/source/opt/composite.h index 376ae34989..3cc036e4d7 100644 --- a/source/opt/composite.h +++ b/source/opt/composite.h @@ -22,11 +22,12 @@ #include #include #include +#include -#include "basic_block.h" -#include "def_use_manager.h" -#include "ir_context.h" -#include "module.h" +#include "source/opt/basic_block.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/const_folding_rules.cpp b/source/opt/const_folding_rules.cpp index 6b94986e93..f6013a3d71 100644 --- a/source/opt/const_folding_rules.cpp +++ b/source/opt/const_folding_rules.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "const_folding_rules.h" +#include "source/opt/const_folding_rules.h" -#include "ir_context.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/const_folding_rules.h b/source/opt/const_folding_rules.h index f1f46e271c..c1865792bc 100644 --- a/source/opt/const_folding_rules.h +++ b/source/opt/const_folding_rules.h @@ -15,9 +15,10 @@ #ifndef SOURCE_OPT_CONST_FOLDING_RULES_H_ #define SOURCE_OPT_CONST_FOLDING_RULES_H_ +#include #include -#include "constants.h" +#include "source/opt/constants.h" namespace spvtools { namespace opt { diff --git a/source/opt/constants.cpp b/source/opt/constants.cpp index ba7fc6b876..b1e4bee40e 100644 --- a/source/opt/constants.cpp +++ b/source/opt/constants.cpp @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "constants.h" -#include "ir_context.h" +#include "source/opt/constants.h" #include #include +#include "source/opt/ir_context.h" + namespace spvtools { namespace opt { namespace analysis { diff --git a/source/opt/constants.h b/source/opt/constants.h index 99e7d1ce91..6fb22a5376 100644 --- a/source/opt/constants.h +++ b/source/opt/constants.h @@ -16,17 +16,18 @@ #define SOURCE_OPT_CONSTANTS_H_ #include +#include #include #include #include #include #include -#include "make_unique.h" -#include "module.h" -#include "type_manager.h" -#include "types.h" -#include "util/hex_float.h" +#include "source/opt/make_unique.h" +#include "source/opt/module.h" +#include "source/opt/type_manager.h" +#include "source/opt/types.h" +#include "source/util/hex_float.h" namespace spvtools { namespace opt { diff --git a/source/opt/copy_prop_arrays.cpp b/source/opt/copy_prop_arrays.cpp index 6fa232feaf..028b237d73 100644 --- a/source/opt/copy_prop_arrays.cpp +++ b/source/opt/copy_prop_arrays.cpp @@ -12,8 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "copy_prop_arrays.h" -#include "ir_builder.h" +#include "source/opt/copy_prop_arrays.h" + +#include + +#include "source/opt/ir_builder.h" namespace spvtools { namespace opt { diff --git a/source/opt/copy_prop_arrays.h b/source/opt/copy_prop_arrays.h index 37a9aad586..abc07165f4 100644 --- a/source/opt/copy_prop_arrays.h +++ b/source/opt/copy_prop_arrays.h @@ -15,7 +15,10 @@ #ifndef SOURCE_OPT_COPY_PROP_ARRAYS_H_ #define SOURCE_OPT_COPY_PROP_ARRAYS_H_ -#include "mem_pass.h" +#include +#include + +#include "source/opt/mem_pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/dead_branch_elim_pass.cpp b/source/opt/dead_branch_elim_pass.cpp index b0a7ab6331..e031d39610 100644 --- a/source/opt/dead_branch_elim_pass.cpp +++ b/source/opt/dead_branch_elim_pass.cpp @@ -15,12 +15,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dead_branch_elim_pass.h" +#include "source/opt/dead_branch_elim_pass.h" -#include "cfa.h" -#include "ir_context.h" -#include "iterator.h" -#include "make_unique.h" +#include +#include +#include + +#include "source/cfa.h" +#include "source/opt/ir_context.h" +#include "source/opt/iterator.h" +#include "source/opt/make_unique.h" namespace spvtools { namespace opt { diff --git a/source/opt/dead_branch_elim_pass.h b/source/opt/dead_branch_elim_pass.h index 42ec801111..4c6fb5c95d 100644 --- a/source/opt/dead_branch_elim_pass.h +++ b/source/opt/dead_branch_elim_pass.h @@ -23,11 +23,12 @@ #include #include #include +#include -#include "basic_block.h" -#include "def_use_manager.h" -#include "mem_pass.h" -#include "module.h" +#include "source/opt/basic_block.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/mem_pass.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/dead_insert_elim_pass.cpp b/source/opt/dead_insert_elim_pass.cpp index 53bdad4eb7..b42588ff73 100644 --- a/source/opt/dead_insert_elim_pass.cpp +++ b/source/opt/dead_insert_elim_pass.cpp @@ -14,15 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dead_insert_elim_pass.h" +#include "source/opt/dead_insert_elim_pass.h" -#include "composite.h" -#include "ir_context.h" -#include "iterator.h" +#include "source/opt/composite.h" +#include "source/opt/ir_context.h" +#include "source/opt/iterator.h" #include "spirv/1.2/GLSL.std.450.h" -#include - namespace spvtools { namespace opt { diff --git a/source/opt/dead_insert_elim_pass.h b/source/opt/dead_insert_elim_pass.h index 5df969d54e..0b111d02c0 100644 --- a/source/opt/dead_insert_elim_pass.h +++ b/source/opt/dead_insert_elim_pass.h @@ -22,12 +22,13 @@ #include #include #include +#include -#include "basic_block.h" -#include "def_use_manager.h" -#include "ir_context.h" -#include "mem_pass.h" -#include "module.h" +#include "source/opt/basic_block.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/mem_pass.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/dead_variable_elimination.cpp b/source/opt/dead_variable_elimination.cpp index bdd97083b7..2837106840 100644 --- a/source/opt/dead_variable_elimination.cpp +++ b/source/opt/dead_variable_elimination.cpp @@ -12,10 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dead_variable_elimination.h" +#include "source/opt/dead_variable_elimination.h" -#include "ir_context.h" -#include "reflect.h" +#include + +#include "source/opt/ir_context.h" +#include "source/opt/reflect.h" namespace spvtools { namespace opt { diff --git a/source/opt/dead_variable_elimination.h b/source/opt/dead_variable_elimination.h index be1f788469..052a754b97 100644 --- a/source/opt/dead_variable_elimination.h +++ b/source/opt/dead_variable_elimination.h @@ -18,8 +18,8 @@ #include #include -#include "decoration_manager.h" -#include "mem_pass.h" +#include "source/opt/decoration_manager.h" +#include "source/opt/mem_pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/decoration_manager.cpp b/source/opt/decoration_manager.cpp index f218e149bf..aeddb88c11 100644 --- a/source/opt/decoration_manager.cpp +++ b/source/opt/decoration_manager.cpp @@ -12,13 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "decoration_manager.h" +#include "source/opt/decoration_manager.h" #include +#include #include #include +#include -#include "ir_context.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/decoration_manager.h b/source/opt/decoration_manager.h index 3becd22f81..4561bfa816 100644 --- a/source/opt/decoration_manager.h +++ b/source/opt/decoration_manager.h @@ -20,8 +20,8 @@ #include #include -#include "instruction.h" -#include "module.h" +#include "source/opt/instruction.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/def_use_manager.cpp b/source/opt/def_use_manager.cpp index c581e39980..4e36493825 100644 --- a/source/opt/def_use_manager.cpp +++ b/source/opt/def_use_manager.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "def_use_manager.h" +#include "source/opt/def_use_manager.h" #include -#include "log.h" -#include "reflect.h" +#include "source/opt/log.h" +#include "source/opt/reflect.h" namespace spvtools { namespace opt { diff --git a/source/opt/def_use_manager.h b/source/opt/def_use_manager.h index 3d23e24b37..0499e82b54 100644 --- a/source/opt/def_use_manager.h +++ b/source/opt/def_use_manager.h @@ -18,10 +18,11 @@ #include #include #include +#include #include -#include "instruction.h" -#include "module.h" +#include "source/opt/instruction.h" +#include "source/opt/module.h" #include "spirv-tools/libspirv.hpp" namespace spvtools { diff --git a/source/opt/dominator_analysis.cpp b/source/opt/dominator_analysis.cpp index f045ee46c7..aef43e69fa 100644 --- a/source/opt/dominator_analysis.cpp +++ b/source/opt/dominator_analysis.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dominator_analysis.h" +#include "source/opt/dominator_analysis.h" #include -#include "ir_context.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/dominator_analysis.h b/source/opt/dominator_analysis.h index eb21d2c283..a94120a55f 100644 --- a/source/opt/dominator_analysis.h +++ b/source/opt/dominator_analysis.h @@ -18,7 +18,7 @@ #include #include -#include "dominator_tree.h" +#include "source/opt/dominator_tree.h" namespace spvtools { namespace opt { diff --git a/source/opt/dominator_tree.cpp b/source/opt/dominator_tree.cpp index df3aae6df8..fc600d24f0 100644 --- a/source/opt/dominator_tree.cpp +++ b/source/opt/dominator_tree.cpp @@ -16,9 +16,9 @@ #include #include -#include "cfa.h" -#include "dominator_tree.h" -#include "ir_context.h" +#include "source/cfa.h" +#include "source/opt/dominator_tree.h" +#include "source/opt/ir_context.h" // Calculates the dominator or postdominator tree for a given function. // 1 - Compute the successors and predecessors for each BasicBlock. We add a diff --git a/source/opt/dominator_tree.h b/source/opt/dominator_tree.h index 18582e8c7f..0024bc508a 100644 --- a/source/opt/dominator_tree.h +++ b/source/opt/dominator_tree.h @@ -21,8 +21,8 @@ #include #include -#include "cfg.h" -#include "tree_iterator.h" +#include "source/opt/cfg.h" +#include "source/opt/tree_iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/eliminate_dead_constant_pass.cpp b/source/opt/eliminate_dead_constant_pass.cpp index 28b84caf11..d368bd1453 100644 --- a/source/opt/eliminate_dead_constant_pass.cpp +++ b/source/opt/eliminate_dead_constant_pass.cpp @@ -12,16 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "eliminate_dead_constant_pass.h" +#include "source/opt/eliminate_dead_constant_pass.h" #include #include #include +#include -#include "def_use_manager.h" -#include "ir_context.h" -#include "log.h" -#include "reflect.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/log.h" +#include "source/opt/reflect.h" namespace spvtools { namespace opt { diff --git a/source/opt/eliminate_dead_constant_pass.h b/source/opt/eliminate_dead_constant_pass.h index 4303295ecf..01692dbf46 100644 --- a/source/opt/eliminate_dead_constant_pass.h +++ b/source/opt/eliminate_dead_constant_pass.h @@ -15,9 +15,9 @@ #ifndef SOURCE_OPT_ELIMINATE_DEAD_CONSTANT_PASS_H_ #define SOURCE_OPT_ELIMINATE_DEAD_CONSTANT_PASS_H_ -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/eliminate_dead_functions_pass.cpp b/source/opt/eliminate_dead_functions_pass.cpp index 383c267a6b..5be983a58f 100644 --- a/source/opt/eliminate_dead_functions_pass.cpp +++ b/source/opt/eliminate_dead_functions_pass.cpp @@ -12,11 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "eliminate_dead_functions_pass.h" -#include "ir_context.h" +#include "source/opt/eliminate_dead_functions_pass.h" #include +#include "source/opt/ir_context.h" + namespace spvtools { namespace opt { diff --git a/source/opt/eliminate_dead_functions_pass.h b/source/opt/eliminate_dead_functions_pass.h index 3967cedb4d..165e9a6b5d 100644 --- a/source/opt/eliminate_dead_functions_pass.h +++ b/source/opt/eliminate_dead_functions_pass.h @@ -15,10 +15,10 @@ #ifndef SOURCE_OPT_ELIMINATE_DEAD_FUNCTIONS_PASS_H_ #define SOURCE_OPT_ELIMINATE_DEAD_FUNCTIONS_PASS_H_ -#include "def_use_manager.h" -#include "function.h" -#include "mem_pass.h" -#include "module.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/function.h" +#include "source/opt/mem_pass.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/feature_manager.cpp b/source/opt/feature_manager.cpp index 15739f3a30..b7fc16a50d 100644 --- a/source/opt/feature_manager.cpp +++ b/source/opt/feature_manager.cpp @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "feature_manager.h" +#include "source/opt/feature_manager.h" + #include #include +#include -#include "enum_string_mapping.h" +#include "source/enum_string_mapping.h" namespace spvtools { namespace opt { diff --git a/source/opt/feature_manager.h b/source/opt/feature_manager.h index 22828470c3..80b2cccf63 100644 --- a/source/opt/feature_manager.h +++ b/source/opt/feature_manager.h @@ -15,9 +15,9 @@ #ifndef SOURCE_OPT_FEATURE_MANAGER_H_ #define SOURCE_OPT_FEATURE_MANAGER_H_ -#include "assembly_grammar.h" -#include "extensions.h" -#include "module.h" +#include "source/assembly_grammar.h" +#include "source/extensions.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/flatten_decoration_pass.cpp b/source/opt/flatten_decoration_pass.cpp index 74c25fcb6a..f4de9116f9 100644 --- a/source/opt/flatten_decoration_pass.cpp +++ b/source/opt/flatten_decoration_pass.cpp @@ -12,14 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "flatten_decoration_pass.h" -#include "ir_context.h" +#include "source/opt/flatten_decoration_pass.h" #include +#include #include #include +#include #include +#include "source/opt/ir_context.h" + namespace spvtools { namespace opt { diff --git a/source/opt/flatten_decoration_pass.h b/source/opt/flatten_decoration_pass.h index 541dabe809..c59821dc25 100644 --- a/source/opt/flatten_decoration_pass.h +++ b/source/opt/flatten_decoration_pass.h @@ -15,9 +15,9 @@ #ifndef SOURCE_OPT_FLATTEN_DECORATION_PASS_H_ #define SOURCE_OPT_FLATTEN_DECORATION_PASS_H_ -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/fold.cpp b/source/opt/fold.cpp index 2007138363..09d7e51224 100644 --- a/source/opt/fold.cpp +++ b/source/opt/fold.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "fold.h" +#include "source/opt/fold.h" #include #include #include -#include "const_folding_rules.h" -#include "def_use_manager.h" -#include "folding_rules.h" -#include "ir_builder.h" -#include "ir_context.h" +#include "source/opt/const_folding_rules.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/folding_rules.h" +#include "source/opt/ir_builder.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/fold.h b/source/opt/fold.h index bb88c0f06d..0dc7c0ebbe 100644 --- a/source/opt/fold.h +++ b/source/opt/fold.h @@ -18,10 +18,10 @@ #include #include -#include "const_folding_rules.h" -#include "constants.h" -#include "def_use_manager.h" -#include "folding_rules.h" +#include "source/opt/const_folding_rules.h" +#include "source/opt/constants.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/folding_rules.h" namespace spvtools { namespace opt { diff --git a/source/opt/fold_spec_constant_op_and_composite_pass.cpp b/source/opt/fold_spec_constant_op_and_composite_pass.cpp index 3f394e748d..4692d15000 100644 --- a/source/opt/fold_spec_constant_op_and_composite_pass.cpp +++ b/source/opt/fold_spec_constant_op_and_composite_pass.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "fold_spec_constant_op_and_composite_pass.h" +#include "source/opt/fold_spec_constant_op_and_composite_pass.h" #include #include #include -#include "constants.h" -#include "fold.h" -#include "ir_context.h" -#include "make_unique.h" +#include "source/opt/constants.h" +#include "source/opt/fold.h" +#include "source/opt/ir_context.h" +#include "source/opt/make_unique.h" namespace spvtools { namespace opt { diff --git a/source/opt/fold_spec_constant_op_and_composite_pass.h b/source/opt/fold_spec_constant_op_and_composite_pass.h index efc959c3a6..16271251f4 100644 --- a/source/opt/fold_spec_constant_op_and_composite_pass.h +++ b/source/opt/fold_spec_constant_op_and_composite_pass.h @@ -19,12 +19,12 @@ #include #include -#include "constants.h" -#include "def_use_manager.h" -#include "ir_context.h" -#include "module.h" -#include "pass.h" -#include "type_manager.h" +#include "source/opt/constants.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" +#include "source/opt/type_manager.h" namespace spvtools { namespace opt { diff --git a/source/opt/folding_rules.cpp b/source/opt/folding_rules.cpp index 7faa3610a7..c64cedfb19 100644 --- a/source/opt/folding_rules.cpp +++ b/source/opt/folding_rules.cpp @@ -12,12 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "folding_rules.h" +#include "source/opt/folding_rules.h" #include +#include +#include -#include "ir_context.h" -#include "latest_version_glsl_std_450_header.h" +#include "source/latest_version_glsl_std_450_header.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/folding_rules.h b/source/opt/folding_rules.h index 9c19dbb512..33fdbffe94 100644 --- a/source/opt/folding_rules.h +++ b/source/opt/folding_rules.h @@ -16,9 +16,10 @@ #define SOURCE_OPT_FOLDING_RULES_H_ #include +#include #include -#include "constants.h" +#include "source/opt/constants.h" namespace spvtools { namespace opt { diff --git a/source/opt/freeze_spec_constant_value_pass.cpp b/source/opt/freeze_spec_constant_value_pass.cpp index 60de4b2b6c..10e98fd8b7 100644 --- a/source/opt/freeze_spec_constant_value_pass.cpp +++ b/source/opt/freeze_spec_constant_value_pass.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "freeze_spec_constant_value_pass.h" -#include "ir_context.h" +#include "source/opt/freeze_spec_constant_value_pass.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/freeze_spec_constant_value_pass.h b/source/opt/freeze_spec_constant_value_pass.h index 308adab364..0663adf401 100644 --- a/source/opt/freeze_spec_constant_value_pass.h +++ b/source/opt/freeze_spec_constant_value_pass.h @@ -15,9 +15,9 @@ #ifndef SOURCE_OPT_FREEZE_SPEC_CONSTANT_VALUE_PASS_H_ #define SOURCE_OPT_FREEZE_SPEC_CONSTANT_VALUE_PASS_H_ -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/function.cpp b/source/opt/function.cpp index 0fbf1e9f85..c6894c6810 100644 --- a/source/opt/function.cpp +++ b/source/opt/function.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "function.h" +#include "source/opt/function.h" #include #include diff --git a/source/opt/function.h b/source/opt/function.h index da5ee3eac5..4dc5d25a69 100644 --- a/source/opt/function.h +++ b/source/opt/function.h @@ -18,12 +18,13 @@ #include #include #include +#include #include #include -#include "basic_block.h" -#include "instruction.h" -#include "iterator.h" +#include "source/opt/basic_block.h" +#include "source/opt/instruction.h" +#include "source/opt/iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/if_conversion.cpp b/source/opt/if_conversion.cpp index 2e59951927..7a3717f985 100644 --- a/source/opt/if_conversion.cpp +++ b/source/opt/if_conversion.cpp @@ -12,9 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "if_conversion.h" +#include "source/opt/if_conversion.h" -#include "value_number_table.h" +#include +#include + +#include "source/opt/value_number_table.h" namespace spvtools { namespace opt { diff --git a/source/opt/if_conversion.h b/source/opt/if_conversion.h index 30ad48b117..609bdf3926 100644 --- a/source/opt/if_conversion.h +++ b/source/opt/if_conversion.h @@ -15,10 +15,10 @@ #ifndef SOURCE_OPT_IF_CONVERSION_H_ #define SOURCE_OPT_IF_CONVERSION_H_ -#include "basic_block.h" -#include "ir_builder.h" -#include "pass.h" -#include "types.h" +#include "source/opt/basic_block.h" +#include "source/opt/ir_builder.h" +#include "source/opt/pass.h" +#include "source/opt/types.h" namespace spvtools { namespace opt { diff --git a/source/opt/inline_exhaustive_pass.cpp b/source/opt/inline_exhaustive_pass.cpp index a5399f7e38..5714cd867d 100644 --- a/source/opt/inline_exhaustive_pass.cpp +++ b/source/opt/inline_exhaustive_pass.cpp @@ -14,7 +14,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "inline_exhaustive_pass.h" +#include "source/opt/inline_exhaustive_pass.h" + +#include namespace spvtools { namespace opt { diff --git a/source/opt/inline_exhaustive_pass.h b/source/opt/inline_exhaustive_pass.h index 87ebd7a611..103e091e00 100644 --- a/source/opt/inline_exhaustive_pass.h +++ b/source/opt/inline_exhaustive_pass.h @@ -23,9 +23,9 @@ #include #include -#include "def_use_manager.h" -#include "inline_pass.h" -#include "module.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/inline_pass.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/inline_opaque_pass.cpp b/source/opt/inline_opaque_pass.cpp index 03d74a9fd5..c2c3719fe0 100644 --- a/source/opt/inline_opaque_pass.cpp +++ b/source/opt/inline_opaque_pass.cpp @@ -14,11 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "inline_opaque_pass.h" +#include "source/opt/inline_opaque_pass.h" + +#include namespace spvtools { namespace opt { - namespace { const uint32_t kTypePointerTypeIdInIdx = 1; diff --git a/source/opt/inline_opaque_pass.h b/source/opt/inline_opaque_pass.h index 1c36aaf173..aad43fd6a3 100644 --- a/source/opt/inline_opaque_pass.h +++ b/source/opt/inline_opaque_pass.h @@ -23,9 +23,9 @@ #include #include -#include "def_use_manager.h" -#include "inline_pass.h" -#include "module.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/inline_pass.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/inline_pass.cpp b/source/opt/inline_pass.cpp index 665f3a7b6a..6db027cc03 100644 --- a/source/opt/inline_pass.cpp +++ b/source/opt/inline_pass.cpp @@ -14,9 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "inline_pass.h" +#include "source/opt/inline_pass.h" -#include "cfa.h" +#include +#include + +#include "source/cfa.h" // Indices of operands in SPIR-V instructions diff --git a/source/opt/inline_pass.h b/source/opt/inline_pass.h index fedfc433cd..55369c98cb 100644 --- a/source/opt/inline_pass.h +++ b/source/opt/inline_pass.h @@ -20,12 +20,13 @@ #include #include #include +#include #include #include -#include "decoration_manager.h" -#include "module.h" -#include "pass.h" +#include "source/opt/decoration_manager.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/instruction.cpp b/source/opt/instruction.cpp index ea75657fd6..4cfa41d8e4 100644 --- a/source/opt/instruction.cpp +++ b/source/opt/instruction.cpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "instruction.h" +#include "source/opt/instruction.h" #include -#include "disassemble.h" -#include "fold.h" -#include "ir_context.h" -#include "reflect.h" +#include "source/disassemble.h" +#include "source/opt/fold.h" +#include "source/opt/ir_context.h" +#include "source/opt/reflect.h" namespace spvtools { namespace opt { diff --git a/source/opt/instruction.h b/source/opt/instruction.h index 6c492d45d6..2533ba2723 100644 --- a/source/opt/instruction.h +++ b/source/opt/instruction.h @@ -17,17 +17,19 @@ #include #include +#include +#include #include #include -#include "opcode.h" -#include "operand.h" -#include "util/ilist_node.h" -#include "util/small_vector.h" +#include "source/opcode.h" +#include "source/operand.h" +#include "source/util/ilist_node.h" +#include "source/util/small_vector.h" -#include "latest_version_glsl_std_450_header.h" -#include "latest_version_spirv_header.h" -#include "reflect.h" +#include "source/latest_version_glsl_std_450_header.h" +#include "source/latest_version_spirv_header.h" +#include "source/opt/reflect.h" #include "spirv-tools/libspirv.h" namespace spvtools { diff --git a/source/opt/instruction_list.cpp b/source/opt/instruction_list.cpp index dfaaba4df4..385a136ec7 100644 --- a/source/opt/instruction_list.cpp +++ b/source/opt/instruction_list.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "instruction_list.h" +#include "source/opt/instruction_list.h" namespace spvtools { namespace opt { diff --git a/source/opt/instruction_list.h b/source/opt/instruction_list.h index 6ea70647c4..ea1cc7c46c 100644 --- a/source/opt/instruction_list.h +++ b/source/opt/instruction_list.h @@ -18,14 +18,14 @@ #include #include +#include #include #include -#include "instruction.h" -#include "operand.h" -#include "util/ilist.h" - -#include "latest_version_spirv_header.h" +#include "source/latest_version_spirv_header.h" +#include "source/operand.h" +#include "source/opt/instruction.h" +#include "source/util/ilist.h" #include "spirv-tools/libspirv.h" namespace spvtools { diff --git a/source/opt/ir_builder.h b/source/opt/ir_builder.h index 46f2e86dde..2dab76e52a 100644 --- a/source/opt/ir_builder.h +++ b/source/opt/ir_builder.h @@ -15,10 +15,15 @@ #ifndef SOURCE_OPT_IR_BUILDER_H_ #define SOURCE_OPT_IR_BUILDER_H_ -#include "opt/basic_block.h" -#include "opt/constants.h" -#include "opt/instruction.h" -#include "opt/ir_context.h" +#include +#include +#include +#include + +#include "source/opt/basic_block.h" +#include "source/opt/constants.h" +#include "source/opt/instruction.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/ir_context.cpp b/source/opt/ir_context.cpp index ad0cad77f9..de0075855a 100644 --- a/source/opt/ir_context.cpp +++ b/source/opt/ir_context.cpp @@ -12,14 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "ir_context.h" -#include "latest_version_glsl_std_450_header.h" -#include "log.h" -#include "mem_pass.h" -#include "reflect.h" +#include "source/opt/ir_context.h" #include +#include "source/latest_version_glsl_std_450_header.h" +#include "source/opt/log.h" +#include "source/opt/mem_pass.h" +#include "source/opt/reflect.h" + namespace spvtools { namespace opt { diff --git a/source/opt/ir_context.h b/source/opt/ir_context.h index 29a3abfd61..95b5db52d2 100644 --- a/source/opt/ir_context.h +++ b/source/opt/ir_context.h @@ -15,25 +15,30 @@ #ifndef SOURCE_OPT_IR_CONTEXT_H_ #define SOURCE_OPT_IR_CONTEXT_H_ -#include "assembly_grammar.h" -#include "cfg.h" -#include "constants.h" -#include "decoration_manager.h" -#include "def_use_manager.h" -#include "dominator_analysis.h" -#include "feature_manager.h" -#include "fold.h" -#include "loop_descriptor.h" -#include "module.h" -#include "register_pressure.h" -#include "scalar_analysis.h" -#include "type_manager.h" -#include "value_number_table.h" - #include #include #include +#include +#include +#include #include +#include +#include + +#include "source/assembly_grammar.h" +#include "source/opt/cfg.h" +#include "source/opt/constants.h" +#include "source/opt/decoration_manager.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/feature_manager.h" +#include "source/opt/fold.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/module.h" +#include "source/opt/register_pressure.h" +#include "source/opt/scalar_analysis.h" +#include "source/opt/type_manager.h" +#include "source/opt/value_number_table.h" namespace spvtools { namespace opt { diff --git a/source/opt/ir_loader.cpp b/source/opt/ir_loader.cpp index b12ebbe829..3d7412d8fa 100644 --- a/source/opt/ir_loader.cpp +++ b/source/opt/ir_loader.cpp @@ -12,10 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "ir_loader.h" +#include "source/opt/ir_loader.h" -#include "log.h" -#include "reflect.h" +#include + +#include "source/opt/log.h" +#include "source/opt/reflect.h" namespace spvtools { namespace opt { diff --git a/source/opt/ir_loader.h b/source/opt/ir_loader.h index 45f5e6f272..940d7b0db0 100644 --- a/source/opt/ir_loader.h +++ b/source/opt/ir_loader.h @@ -16,10 +16,12 @@ #define SOURCE_OPT_IR_LOADER_H_ #include +#include +#include -#include "basic_block.h" -#include "instruction.h" -#include "module.h" +#include "source/opt/basic_block.h" +#include "source/opt/instruction.h" +#include "source/opt/module.h" #include "spirv-tools/libspirv.hpp" namespace spvtools { diff --git a/source/opt/iterator.h b/source/opt/iterator.h index 326b6dccd2..444d457c5c 100644 --- a/source/opt/iterator.h +++ b/source/opt/iterator.h @@ -19,6 +19,7 @@ #include #include #include +#include #include namespace spvtools { diff --git a/source/opt/licm_pass.cpp b/source/opt/licm_pass.cpp index 84871138ff..d8256679e3 100644 --- a/source/opt/licm_pass.cpp +++ b/source/opt/licm_pass.cpp @@ -12,13 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/licm_pass.h" -#include "opt/module.h" -#include "opt/pass.h" +#include "source/opt/licm_pass.h" #include #include +#include "source/opt/module.h" +#include "source/opt/pass.h" + namespace spvtools { namespace opt { diff --git a/source/opt/licm_pass.h b/source/opt/licm_pass.h index c7d6bc6ea6..a17450043a 100644 --- a/source/opt/licm_pass.h +++ b/source/opt/licm_pass.h @@ -15,12 +15,13 @@ #ifndef SOURCE_OPT_LICM_PASS_H_ #define SOURCE_OPT_LICM_PASS_H_ -#include "opt/basic_block.h" -#include "opt/instruction.h" -#include "opt/loop_descriptor.h" -#include "opt/pass.h" - #include +#include + +#include "source/opt/basic_block.h" +#include "source/opt/instruction.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/local_access_chain_convert_pass.cpp b/source/opt/local_access_chain_convert_pass.cpp index 26108a729a..20e1030b87 100644 --- a/source/opt/local_access_chain_convert_pass.cpp +++ b/source/opt/local_access_chain_convert_pass.cpp @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "local_access_chain_convert_pass.h" +#include "source/opt/local_access_chain_convert_pass.h" -#include "ir_context.h" -#include "iterator.h" +#include "source/opt/ir_context.h" +#include "source/opt/iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/local_access_chain_convert_pass.h b/source/opt/local_access_chain_convert_pass.h index 656bad8c75..fc59361606 100644 --- a/source/opt/local_access_chain_convert_pass.h +++ b/source/opt/local_access_chain_convert_pass.h @@ -19,15 +19,18 @@ #include #include +#include #include +#include #include #include #include +#include -#include "basic_block.h" -#include "def_use_manager.h" -#include "mem_pass.h" -#include "module.h" +#include "source/opt/basic_block.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/mem_pass.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/local_redundancy_elimination.cpp b/source/opt/local_redundancy_elimination.cpp index 85c1a083a6..9539e65566 100644 --- a/source/opt/local_redundancy_elimination.cpp +++ b/source/opt/local_redundancy_elimination.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "local_redundancy_elimination.h" +#include "source/opt/local_redundancy_elimination.h" -#include "value_number_table.h" +#include "source/opt/value_number_table.h" namespace spvtools { namespace opt { diff --git a/source/opt/local_redundancy_elimination.h b/source/opt/local_redundancy_elimination.h index e822da349b..9f55c8bfea 100644 --- a/source/opt/local_redundancy_elimination.h +++ b/source/opt/local_redundancy_elimination.h @@ -15,9 +15,11 @@ #ifndef SOURCE_OPT_LOCAL_REDUNDANCY_ELIMINATION_H_ #define SOURCE_OPT_LOCAL_REDUNDANCY_ELIMINATION_H_ -#include "ir_context.h" -#include "pass.h" -#include "value_number_table.h" +#include + +#include "source/opt/ir_context.h" +#include "source/opt/pass.h" +#include "source/opt/value_number_table.h" namespace spvtools { namespace opt { diff --git a/source/opt/local_single_block_elim_pass.cpp b/source/opt/local_single_block_elim_pass.cpp index 5a2ec8cd06..19dde6a11c 100644 --- a/source/opt/local_single_block_elim_pass.cpp +++ b/source/opt/local_single_block_elim_pass.cpp @@ -14,13 +14,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "local_single_block_elim_pass.h" +#include "source/opt/local_single_block_elim_pass.h" -#include "iterator.h" +#include + +#include "source/opt/iterator.h" namespace spvtools { namespace opt { - namespace { const uint32_t kStoreValIdInIdx = 1; diff --git a/source/opt/local_single_block_elim_pass.h b/source/opt/local_single_block_elim_pass.h index 2f75f20094..3dead98347 100644 --- a/source/opt/local_single_block_elim_pass.h +++ b/source/opt/local_single_block_elim_pass.h @@ -20,14 +20,15 @@ #include #include #include +#include #include #include #include -#include "basic_block.h" -#include "def_use_manager.h" -#include "mem_pass.h" -#include "module.h" +#include "source/opt/basic_block.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/mem_pass.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/local_single_store_elim_pass.cpp b/source/opt/local_single_store_elim_pass.cpp index 66c1505e35..4c837fc73f 100644 --- a/source/opt/local_single_store_elim_pass.cpp +++ b/source/opt/local_single_store_elim_pass.cpp @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "local_single_store_elim_pass.h" +#include "source/opt/local_single_store_elim_pass.h" -#include "cfa.h" -#include "iterator.h" -#include "latest_version_glsl_std_450_header.h" +#include "source/cfa.h" +#include "source/latest_version_glsl_std_450_header.h" +#include "source/opt/iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/local_single_store_elim_pass.h b/source/opt/local_single_store_elim_pass.h index 8f83117250..d3d64b829a 100644 --- a/source/opt/local_single_store_elim_pass.h +++ b/source/opt/local_single_store_elim_pass.h @@ -20,14 +20,16 @@ #include #include #include +#include #include #include #include +#include -#include "basic_block.h" -#include "def_use_manager.h" -#include "mem_pass.h" -#include "module.h" +#include "source/opt/basic_block.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/mem_pass.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/local_ssa_elim_pass.cpp b/source/opt/local_ssa_elim_pass.cpp index 872d26b3e0..ec7326ed0e 100644 --- a/source/opt/local_ssa_elim_pass.cpp +++ b/source/opt/local_ssa_elim_pass.cpp @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "local_ssa_elim_pass.h" +#include "source/opt/local_ssa_elim_pass.h" -#include "cfa.h" -#include "iterator.h" -#include "ssa_rewrite_pass.h" +#include "source/cfa.h" +#include "source/opt/iterator.h" +#include "source/opt/ssa_rewrite_pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/local_ssa_elim_pass.h b/source/opt/local_ssa_elim_pass.h index 29e92ffa92..63d3c33bac 100644 --- a/source/opt/local_ssa_elim_pass.h +++ b/source/opt/local_ssa_elim_pass.h @@ -20,14 +20,16 @@ #include #include #include +#include #include #include #include +#include -#include "basic_block.h" -#include "def_use_manager.h" -#include "mem_pass.h" -#include "module.h" +#include "source/opt/basic_block.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/mem_pass.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_dependence.cpp b/source/opt/loop_dependence.cpp index 82dbd1c05c..d8de699bf7 100644 --- a/source/opt/loop_dependence.cpp +++ b/source/opt/loop_dependence.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/loop_dependence.h" +#include "source/opt/loop_dependence.h" #include #include @@ -21,9 +21,9 @@ #include #include -#include "opt/instruction.h" -#include "opt/scalar_analysis.h" -#include "opt/scalar_analysis_nodes.h" +#include "source/opt/instruction.h" +#include "source/opt/scalar_analysis.h" +#include "source/opt/scalar_analysis_nodes.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_dependence.h b/source/opt/loop_dependence.h index 99324e82cd..582c8d0acb 100644 --- a/source/opt/loop_dependence.h +++ b/source/opt/loop_dependence.h @@ -26,10 +26,10 @@ #include #include -#include "opt/instruction.h" -#include "opt/ir_context.h" -#include "opt/loop_descriptor.h" -#include "opt/scalar_analysis.h" +#include "source/opt/instruction.h" +#include "source/opt/ir_context.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/scalar_analysis.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_dependence_helpers.cpp b/source/opt/loop_dependence_helpers.cpp index 979d03a8e1..de27a0a724 100644 --- a/source/opt/loop_dependence_helpers.cpp +++ b/source/opt/loop_dependence_helpers.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/loop_dependence.h" +#include "source/opt/loop_dependence.h" #include #include @@ -21,10 +21,10 @@ #include #include -#include "opt/basic_block.h" -#include "opt/instruction.h" -#include "opt/scalar_analysis.h" -#include "opt/scalar_analysis_nodes.h" +#include "source/opt/basic_block.h" +#include "source/opt/instruction.h" +#include "source/opt/scalar_analysis.h" +#include "source/opt/scalar_analysis_nodes.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_descriptor.cpp b/source/opt/loop_descriptor.cpp index ec05ba6be9..656ea125bb 100644 --- a/source/opt/loop_descriptor.cpp +++ b/source/opt/loop_descriptor.cpp @@ -12,21 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/loop_descriptor.h" +#include "source/opt/loop_descriptor.h" + #include #include +#include +#include #include #include #include -#include "constants.h" -#include "opt/cfg.h" -#include "opt/dominator_tree.h" -#include "opt/ir_builder.h" -#include "opt/ir_context.h" -#include "opt/iterator.h" -#include "opt/make_unique.h" -#include "opt/tree_iterator.h" +#include "source/opt/cfg.h" +#include "source/opt/constants.h" +#include "source/opt/dominator_tree.h" +#include "source/opt/ir_builder.h" +#include "source/opt/ir_context.h" +#include "source/opt/iterator.h" +#include "source/opt/make_unique.h" +#include "source/opt/tree_iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_descriptor.h b/source/opt/loop_descriptor.h index 8e4979c409..45a175a0ca 100644 --- a/source/opt/loop_descriptor.h +++ b/source/opt/loop_descriptor.h @@ -21,12 +21,13 @@ #include #include #include +#include #include -#include "opt/basic_block.h" -#include "opt/dominator_analysis.h" -#include "opt/module.h" -#include "opt/tree_iterator.h" +#include "source/opt/basic_block.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/module.h" +#include "source/opt/tree_iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_fission.cpp b/source/opt/loop_fission.cpp index 7657ad6a4e..0052406dd7 100644 --- a/source/opt/loop_fission.cpp +++ b/source/opt/loop_fission.cpp @@ -12,8 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/loop_fission.h" -#include "opt/register_pressure.h" +#include "source/opt/loop_fission.h" + +#include + +#include "source/opt/register_pressure.h" // Implement loop fission with an optional parameter to split only // if the register pressure in a given loop meets a certain criteria. This is diff --git a/source/opt/loop_fission.h b/source/opt/loop_fission.h index d71697521d..ef886c9655 100644 --- a/source/opt/loop_fission.h +++ b/source/opt/loop_fission.h @@ -21,12 +21,12 @@ #include #include -#include "cfg.h" -#include "module.h" -#include "opt/loop_dependence.h" -#include "opt/loop_utils.h" -#include "pass.h" -#include "tree_iterator.h" +#include "source/opt/cfg.h" +#include "source/opt/loop_dependence.h" +#include "source/opt/loop_utils.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" +#include "source/opt/tree_iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_fusion.cpp b/source/opt/loop_fusion.cpp index 350b27b87a..07d171a0af 100644 --- a/source/opt/loop_fusion.cpp +++ b/source/opt/loop_fusion.cpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/loop_fusion.h" +#include "source/opt/loop_fusion.h" #include #include -#include "opt/ir_context.h" -#include "opt/loop_dependence.h" -#include "opt/loop_descriptor.h" +#include "source/opt/ir_context.h" +#include "source/opt/loop_dependence.h" +#include "source/opt/loop_descriptor.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_fusion.h b/source/opt/loop_fusion.h index 343e023ba8..d61d6783c8 100644 --- a/source/opt/loop_fusion.h +++ b/source/opt/loop_fusion.h @@ -17,12 +17,13 @@ #include #include +#include #include -#include "opt/ir_context.h" -#include "opt/loop_descriptor.h" -#include "opt/loop_utils.h" -#include "opt/scalar_analysis.h" +#include "source/opt/ir_context.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/loop_utils.h" +#include "source/opt/scalar_analysis.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_fusion_pass.cpp b/source/opt/loop_fusion_pass.cpp index 46bfdc67ca..bd8444ae56 100644 --- a/source/opt/loop_fusion_pass.cpp +++ b/source/opt/loop_fusion_pass.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/loop_fusion_pass.h" +#include "source/opt/loop_fusion_pass.h" -#include "opt/ir_context.h" -#include "opt/loop_descriptor.h" -#include "opt/loop_fusion.h" -#include "opt/register_pressure.h" +#include "source/opt/ir_context.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/loop_fusion.h" +#include "source/opt/register_pressure.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_fusion_pass.h b/source/opt/loop_fusion_pass.h index 99dd67d725..3a0be60004 100644 --- a/source/opt/loop_fusion_pass.h +++ b/source/opt/loop_fusion_pass.h @@ -15,7 +15,7 @@ #ifndef SOURCE_OPT_LOOP_FUSION_PASS_H_ #define SOURCE_OPT_LOOP_FUSION_PASS_H_ -#include "opt/pass.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_peeling.cpp b/source/opt/loop_peeling.cpp index 274aa66d09..7d27480ae2 100644 --- a/source/opt/loop_peeling.cpp +++ b/source/opt/loop_peeling.cpp @@ -19,13 +19,13 @@ #include #include -#include "ir_builder.h" -#include "ir_context.h" -#include "loop_descriptor.h" -#include "loop_peeling.h" -#include "loop_utils.h" -#include "scalar_analysis.h" -#include "scalar_analysis_nodes.h" +#include "source/opt/ir_builder.h" +#include "source/opt/ir_context.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/loop_peeling.h" +#include "source/opt/loop_utils.h" +#include "source/opt/scalar_analysis.h" +#include "source/opt/scalar_analysis_nodes.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_peeling.h b/source/opt/loop_peeling.h index 08af223b25..413f896f25 100644 --- a/source/opt/loop_peeling.h +++ b/source/opt/loop_peeling.h @@ -18,16 +18,17 @@ #include #include #include +#include #include #include #include #include -#include "opt/ir_context.h" -#include "opt/loop_descriptor.h" -#include "opt/loop_utils.h" -#include "opt/pass.h" -#include "opt/scalar_analysis.h" +#include "source/opt/ir_context.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/loop_utils.h" +#include "source/opt/pass.h" +#include "source/opt/scalar_analysis.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_unroller.cpp b/source/opt/loop_unroller.cpp index 16bde30708..587615edf3 100644 --- a/source/opt/loop_unroller.cpp +++ b/source/opt/loop_unroller.cpp @@ -12,12 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/loop_unroller.h" +#include "source/opt/loop_unroller.h" + +#include #include #include +#include #include -#include "opt/ir_builder.h" -#include "opt/loop_utils.h" +#include + +#include "source/opt/ir_builder.h" +#include "source/opt/loop_utils.h" // Implements loop util unrolling functionality for fully and partially // unrolling loops. Given a factor it will duplicate the loop that many times, diff --git a/source/opt/loop_unroller.h b/source/opt/loop_unroller.h index 080a1dfd57..98f4d475eb 100644 --- a/source/opt/loop_unroller.h +++ b/source/opt/loop_unroller.h @@ -14,7 +14,8 @@ #ifndef SOURCE_OPT_LOOP_UNROLLER_H_ #define SOURCE_OPT_LOOP_UNROLLER_H_ -#include "opt/pass.h" + +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_unswitch_pass.cpp b/source/opt/loop_unswitch_pass.cpp index b9eb61bc15..8215cb698c 100644 --- a/source/opt/loop_unswitch_pass.cpp +++ b/source/opt/loop_unswitch_pass.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "loop_unswitch_pass.h" +#include "source/opt/loop_unswitch_pass.h" #include #include @@ -23,16 +23,16 @@ #include #include -#include "basic_block.h" -#include "dominator_tree.h" -#include "fold.h" -#include "function.h" -#include "instruction.h" -#include "ir_builder.h" -#include "ir_context.h" -#include "loop_descriptor.h" +#include "source/opt/basic_block.h" +#include "source/opt/dominator_tree.h" +#include "source/opt/fold.h" +#include "source/opt/function.h" +#include "source/opt/instruction.h" +#include "source/opt/ir_builder.h" +#include "source/opt/ir_context.h" +#include "source/opt/loop_descriptor.h" -#include "loop_utils.h" +#include "source/opt/loop_utils.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_unswitch_pass.h b/source/opt/loop_unswitch_pass.h index 93fd1c0ef1..3ecdd61162 100644 --- a/source/opt/loop_unswitch_pass.h +++ b/source/opt/loop_unswitch_pass.h @@ -15,8 +15,8 @@ #ifndef SOURCE_OPT_LOOP_UNSWITCH_PASS_H_ #define SOURCE_OPT_LOOP_UNSWITCH_PASS_H_ -#include "opt/loop_descriptor.h" -#include "opt/pass.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_utils.cpp b/source/opt/loop_utils.cpp index 96644b5d6d..482335f3bf 100644 --- a/source/opt/loop_utils.cpp +++ b/source/opt/loop_utils.cpp @@ -16,14 +16,15 @@ #include #include #include +#include #include -#include "cfa.h" -#include "opt/cfg.h" -#include "opt/ir_builder.h" -#include "opt/ir_context.h" -#include "opt/loop_descriptor.h" -#include "opt/loop_utils.h" +#include "source/cfa.h" +#include "source/opt/cfg.h" +#include "source/opt/ir_builder.h" +#include "source/opt/ir_context.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/loop_utils.h" namespace spvtools { namespace opt { diff --git a/source/opt/loop_utils.h b/source/opt/loop_utils.h index 45cffd4bf0..a4e61900bc 100644 --- a/source/opt/loop_utils.h +++ b/source/opt/loop_utils.h @@ -14,11 +14,14 @@ #ifndef SOURCE_OPT_LOOP_UTILS_H_ #define SOURCE_OPT_LOOP_UTILS_H_ + #include #include +#include #include -#include "opt/ir_context.h" -#include "opt/loop_descriptor.h" + +#include "source/opt/ir_context.h" +#include "source/opt/loop_descriptor.h" namespace spvtools { diff --git a/source/opt/mem_pass.cpp b/source/opt/mem_pass.cpp index 41c29d64f5..c65e04938a 100644 --- a/source/opt/mem_pass.cpp +++ b/source/opt/mem_pass.cpp @@ -14,13 +14,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "mem_pass.h" +#include "source/opt/mem_pass.h" -#include "basic_block.h" -#include "cfa.h" -#include "dominator_analysis.h" -#include "ir_context.h" -#include "iterator.h" +#include +#include +#include + +#include "source/cfa.h" +#include "source/opt/basic_block.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/ir_context.h" +#include "source/opt/iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/mem_pass.h b/source/opt/mem_pass.h index 136da0c82c..67ce26b139 100644 --- a/source/opt/mem_pass.h +++ b/source/opt/mem_pass.h @@ -25,11 +25,11 @@ #include #include -#include "basic_block.h" -#include "def_use_manager.h" -#include "dominator_analysis.h" -#include "module.h" -#include "pass.h" +#include "source/opt/basic_block.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/merge_return_pass.cpp b/source/opt/merge_return_pass.cpp index 82ded202eb..c0323ff5f5 100644 --- a/source/opt/merge_return_pass.cpp +++ b/source/opt/merge_return_pass.cpp @@ -12,13 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "merge_return_pass.h" +#include "source/opt/merge_return_pass.h" -#include "instruction.h" -#include "ir_builder.h" -#include "ir_context.h" -#include "make_unique.h" -#include "reflect.h" +#include +#include +#include + +#include "source/opt/instruction.h" +#include "source/opt/ir_builder.h" +#include "source/opt/ir_context.h" +#include "source/opt/make_unique.h" +#include "source/opt/reflect.h" namespace spvtools { namespace opt { diff --git a/source/opt/merge_return_pass.h b/source/opt/merge_return_pass.h index a98ef52cc4..0c7a3b48aa 100644 --- a/source/opt/merge_return_pass.h +++ b/source/opt/merge_return_pass.h @@ -15,13 +15,14 @@ #ifndef SOURCE_OPT_MERGE_RETURN_PASS_H_ #define SOURCE_OPT_MERGE_RETURN_PASS_H_ -#include "basic_block.h" -#include "function.h" -#include "mem_pass.h" - +#include #include #include +#include "source/opt/basic_block.h" +#include "source/opt/function.h" +#include "source/opt/mem_pass.h" + namespace spvtools { namespace opt { diff --git a/source/opt/module.cpp b/source/opt/module.cpp index 924d983788..6d024b5bcb 100644 --- a/source/opt/module.cpp +++ b/source/opt/module.cpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "module.h" +#include "source/opt/module.h" #include #include #include -#include "operand.h" -#include "reflect.h" +#include "source/operand.h" +#include "source/opt/reflect.h" namespace spvtools { namespace opt { diff --git a/source/opt/module.h b/source/opt/module.h index 0c95bd830e..eca8cc7798 100644 --- a/source/opt/module.h +++ b/source/opt/module.h @@ -20,9 +20,9 @@ #include #include -#include "function.h" -#include "instruction.h" -#include "iterator.h" +#include "source/opt/function.h" +#include "source/opt/instruction.h" +#include "source/opt/iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/null_pass.h b/source/opt/null_pass.h index b437679146..2b5974fb9b 100644 --- a/source/opt/null_pass.h +++ b/source/opt/null_pass.h @@ -15,8 +15,8 @@ #ifndef SOURCE_OPT_NULL_PASS_H_ #define SOURCE_OPT_NULL_PASS_H_ -#include "module.h" -#include "pass.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/optimizer.cpp b/source/opt/optimizer.cpp index 60791ca071..f46306e8ec 100644 --- a/source/opt/optimizer.cpp +++ b/source/opt/optimizer.cpp @@ -14,13 +14,19 @@ #include "spirv-tools/optimizer.hpp" -#include "build_module.h" -#include "log.h" -#include "make_unique.h" -#include "pass_manager.h" -#include "passes.h" -#include "reduce_load_size.h" -#include "simplification_pass.h" +#include +#include +#include +#include +#include + +#include "source/opt/build_module.h" +#include "source/opt/log.h" +#include "source/opt/make_unique.h" +#include "source/opt/pass_manager.h" +#include "source/opt/passes.h" +#include "source/opt/reduce_load_size.h" +#include "source/opt/simplification_pass.h" namespace spvtools { diff --git a/source/opt/pass.cpp b/source/opt/pass.cpp index c346ac4425..4c4a232c6c 100644 --- a/source/opt/pass.cpp +++ b/source/opt/pass.cpp @@ -14,9 +14,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass.h" +#include "source/opt/pass.h" -#include "iterator.h" +#include "source/opt/iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/pass.h b/source/opt/pass.h index 62fc15e805..df1745099d 100644 --- a/source/opt/pass.h +++ b/source/opt/pass.h @@ -22,10 +22,10 @@ #include #include -#include "basic_block.h" -#include "def_use_manager.h" -#include "ir_context.h" -#include "module.h" +#include "source/opt/basic_block.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" #include "spirv-tools/libspirv.hpp" namespace spvtools { diff --git a/source/opt/pass_manager.cpp b/source/opt/pass_manager.cpp index c02faeeaf9..fa1e1d8a81 100644 --- a/source/opt/pass_manager.cpp +++ b/source/opt/pass_manager.cpp @@ -12,14 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_manager.h" +#include "source/opt/pass_manager.h" #include +#include #include -#include "ir_context.h" +#include "source/opt/ir_context.h" +#include "source/util/timer.h" #include "spirv-tools/libspirv.hpp" -#include "util/timer.h" namespace spvtools { diff --git a/source/opt/pass_manager.h b/source/opt/pass_manager.h index be57678388..ed88aa17c8 100644 --- a/source/opt/pass_manager.h +++ b/source/opt/pass_manager.h @@ -17,13 +17,14 @@ #include #include +#include #include -#include "log.h" -#include "module.h" -#include "pass.h" +#include "source/opt/log.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" -#include "ir_context.h" +#include "source/opt/ir_context.h" #include "spirv-tools/libspirv.hpp" namespace spvtools { diff --git a/source/opt/passes.h b/source/opt/passes.h index 221dfe57cf..42106c8f7b 100644 --- a/source/opt/passes.h +++ b/source/opt/passes.h @@ -17,50 +17,51 @@ // A single header to include all passes. -#include "aggressive_dead_code_elim_pass.h" -#include "block_merge_pass.h" -#include "ccp_pass.h" -#include "cfg_cleanup_pass.h" -#include "combine_access_chains.h" -#include "common_uniform_elim_pass.h" -#include "compact_ids_pass.h" -#include "copy_prop_arrays.h" -#include "dead_branch_elim_pass.h" -#include "dead_insert_elim_pass.h" -#include "dead_variable_elimination.h" -#include "eliminate_dead_constant_pass.h" -#include "eliminate_dead_functions_pass.h" -#include "flatten_decoration_pass.h" -#include "fold_spec_constant_op_and_composite_pass.h" -#include "freeze_spec_constant_value_pass.h" -#include "if_conversion.h" -#include "inline_exhaustive_pass.h" -#include "inline_opaque_pass.h" -#include "licm_pass.h" -#include "local_access_chain_convert_pass.h" -#include "local_redundancy_elimination.h" -#include "local_single_block_elim_pass.h" -#include "local_single_store_elim_pass.h" -#include "local_ssa_elim_pass.h" -#include "loop_fission.h" -#include "loop_fusion_pass.h" -#include "loop_peeling.h" -#include "loop_unroller.h" -#include "loop_unswitch_pass.h" -#include "merge_return_pass.h" -#include "null_pass.h" -#include "private_to_local_pass.h" -#include "reduce_load_size.h" -#include "redundancy_elimination.h" -#include "remove_duplicates_pass.h" -#include "replace_invalid_opc.h" -#include "scalar_replacement_pass.h" -#include "set_spec_constant_default_value_pass.h" -#include "ssa_rewrite_pass.h" -#include "strength_reduction_pass.h" -#include "strip_debug_info_pass.h" -#include "strip_reflect_info_pass.h" -#include "unify_const_pass.h" -#include "vector_dce.h" -#include "workaround1209.h" +#include "source/opt/aggressive_dead_code_elim_pass.h" +#include "source/opt/block_merge_pass.h" +#include "source/opt/ccp_pass.h" +#include "source/opt/cfg_cleanup_pass.h" +#include "source/opt/combine_access_chains.h" +#include "source/opt/common_uniform_elim_pass.h" +#include "source/opt/compact_ids_pass.h" +#include "source/opt/copy_prop_arrays.h" +#include "source/opt/dead_branch_elim_pass.h" +#include "source/opt/dead_insert_elim_pass.h" +#include "source/opt/dead_variable_elimination.h" +#include "source/opt/eliminate_dead_constant_pass.h" +#include "source/opt/eliminate_dead_functions_pass.h" +#include "source/opt/flatten_decoration_pass.h" +#include "source/opt/fold_spec_constant_op_and_composite_pass.h" +#include "source/opt/freeze_spec_constant_value_pass.h" +#include "source/opt/if_conversion.h" +#include "source/opt/inline_exhaustive_pass.h" +#include "source/opt/inline_opaque_pass.h" +#include "source/opt/licm_pass.h" +#include "source/opt/local_access_chain_convert_pass.h" +#include "source/opt/local_redundancy_elimination.h" +#include "source/opt/local_single_block_elim_pass.h" +#include "source/opt/local_single_store_elim_pass.h" +#include "source/opt/local_ssa_elim_pass.h" +#include "source/opt/loop_fission.h" +#include "source/opt/loop_fusion_pass.h" +#include "source/opt/loop_peeling.h" +#include "source/opt/loop_unroller.h" +#include "source/opt/loop_unswitch_pass.h" +#include "source/opt/merge_return_pass.h" +#include "source/opt/null_pass.h" +#include "source/opt/private_to_local_pass.h" +#include "source/opt/reduce_load_size.h" +#include "source/opt/redundancy_elimination.h" +#include "source/opt/remove_duplicates_pass.h" +#include "source/opt/replace_invalid_opc.h" +#include "source/opt/scalar_replacement_pass.h" +#include "source/opt/set_spec_constant_default_value_pass.h" +#include "source/opt/ssa_rewrite_pass.h" +#include "source/opt/strength_reduction_pass.h" +#include "source/opt/strip_debug_info_pass.h" +#include "source/opt/strip_reflect_info_pass.h" +#include "source/opt/unify_const_pass.h" +#include "source/opt/vector_dce.h" +#include "source/opt/workaround1209.h" + #endif // SOURCE_OPT_PASSES_H_ diff --git a/source/opt/private_to_local_pass.cpp b/source/opt/private_to_local_pass.cpp index 9f498d513c..02909a72b5 100644 --- a/source/opt/private_to_local_pass.cpp +++ b/source/opt/private_to_local_pass.cpp @@ -12,17 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "private_to_local_pass.h" +#include "source/opt/private_to_local_pass.h" -#include "ir_context.h" +#include +#include +#include +#include "source/opt/ir_context.h" + +namespace spvtools { +namespace opt { namespace { + const uint32_t kVariableStorageClassInIdx = 0; const uint32_t kSpvTypePointerTypeIdInIdx = 1; -} // namespace -namespace spvtools { -namespace opt { +} // namespace Pass::Status PrivateToLocalPass::Process() { bool modified = false; diff --git a/source/opt/private_to_local_pass.h b/source/opt/private_to_local_pass.h index 159d368b17..f706e6e91a 100644 --- a/source/opt/private_to_local_pass.h +++ b/source/opt/private_to_local_pass.h @@ -15,8 +15,8 @@ #ifndef SOURCE_OPT_PRIVATE_TO_LOCAL_PASS_H_ #define SOURCE_OPT_PRIVATE_TO_LOCAL_PASS_H_ -#include "ir_context.h" -#include "pass.h" +#include "source/opt/ir_context.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/propagator.cpp b/source/opt/propagator.cpp index bfaa811b5e..6a1f1aafbc 100644 --- a/source/opt/propagator.cpp +++ b/source/opt/propagator.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "propagator.h" +#include "source/opt/propagator.h" namespace spvtools { namespace opt { diff --git a/source/opt/propagator.h b/source/opt/propagator.h index 2dc2c5077f..ac7c0e7eac 100644 --- a/source/opt/propagator.h +++ b/source/opt/propagator.h @@ -20,10 +20,11 @@ #include #include #include +#include #include -#include "ir_context.h" -#include "module.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/source/opt/reduce_load_size.cpp b/source/opt/reduce_load_size.cpp index e82a9e285b..b692c6b544 100644 --- a/source/opt/reduce_load_size.cpp +++ b/source/opt/reduce_load_size.cpp @@ -12,18 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "reduce_load_size.h" -#include +#include "source/opt/reduce_load_size.h" -#include "instruction.h" -#include "ir_builder.h" -#include "ir_context.h" +#include +#include + +#include "source/opt/instruction.h" +#include "source/opt/ir_builder.h" +#include "source/opt/ir_context.h" +#include "source/util/bit_vector.h" namespace { + const uint32_t kExtractCompositeIdInIdx = 0; const uint32_t kVariableStorageClassInIdx = 0; const uint32_t kLoadPointerInIdx = 0; const double kThreshold = 0.9; + } // namespace namespace spvtools { diff --git a/source/opt/reduce_load_size.h b/source/opt/reduce_load_size.h index 1071f1dedc..724a430bbf 100644 --- a/source/opt/reduce_load_size.h +++ b/source/opt/reduce_load_size.h @@ -15,9 +15,11 @@ #ifndef SOURCE_OPT_REDUCE_LOAD_SIZE_H_ #define SOURCE_OPT_REDUCE_LOAD_SIZE_H_ -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include + +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/redundancy_elimination.cpp b/source/opt/redundancy_elimination.cpp index 294b84d534..362e54dc6b 100644 --- a/source/opt/redundancy_elimination.cpp +++ b/source/opt/redundancy_elimination.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "redundancy_elimination.h" +#include "source/opt/redundancy_elimination.h" -#include "value_number_table.h" +#include "source/opt/value_number_table.h" namespace spvtools { namespace opt { diff --git a/source/opt/redundancy_elimination.h b/source/opt/redundancy_elimination.h index 5cd30fbcc3..91809b5d57 100644 --- a/source/opt/redundancy_elimination.h +++ b/source/opt/redundancy_elimination.h @@ -15,10 +15,12 @@ #ifndef SOURCE_OPT_REDUNDANCY_ELIMINATION_H_ #define SOURCE_OPT_REDUNDANCY_ELIMINATION_H_ -#include "ir_context.h" -#include "local_redundancy_elimination.h" -#include "pass.h" -#include "value_number_table.h" +#include + +#include "source/opt/ir_context.h" +#include "source/opt/local_redundancy_elimination.h" +#include "source/opt/pass.h" +#include "source/opt/value_number_table.h" namespace spvtools { namespace opt { diff --git a/source/opt/reflect.h b/source/opt/reflect.h index 8dc11942f1..fb2de7b151 100644 --- a/source/opt/reflect.h +++ b/source/opt/reflect.h @@ -15,7 +15,7 @@ #ifndef SOURCE_OPT_REFLECT_H_ #define SOURCE_OPT_REFLECT_H_ -#include "latest_version_spirv_header.h" +#include "source/latest_version_spirv_header.h" namespace spvtools { namespace opt { diff --git a/source/opt/register_pressure.cpp b/source/opt/register_pressure.cpp index 729755c29c..34dac1d7b1 100644 --- a/source/opt/register_pressure.cpp +++ b/source/opt/register_pressure.cpp @@ -12,16 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "register_pressure.h" +#include "source/opt/register_pressure.h" +#include #include -#include "cfg.h" -#include "def_use_manager.h" -#include "dominator_tree.h" -#include "function.h" -#include "ir_context.h" -#include "iterator.h" +#include "source/opt/cfg.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/dominator_tree.h" +#include "source/opt/function.h" +#include "source/opt/ir_context.h" +#include "source/opt/iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/register_pressure.h b/source/opt/register_pressure.h index be83f00811..cb3d2e2703 100644 --- a/source/opt/register_pressure.h +++ b/source/opt/register_pressure.h @@ -20,8 +20,8 @@ #include #include -#include "function.h" -#include "types.h" +#include "source/opt/function.h" +#include "source/opt/types.h" namespace spvtools { namespace opt { diff --git a/source/opt/remove_duplicates_pass.cpp b/source/opt/remove_duplicates_pass.cpp index bfbab4d671..a37e9df9e7 100644 --- a/source/opt/remove_duplicates_pass.cpp +++ b/source/opt/remove_duplicates_pass.cpp @@ -12,20 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "remove_duplicates_pass.h" - -#include +#include "source/opt/remove_duplicates_pass.h" #include +#include #include +#include #include #include #include -#include "decoration_manager.h" -#include "ir_context.h" -#include "opcode.h" -#include "reflect.h" +#include "source/opcode.h" +#include "source/opt/decoration_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/reflect.h" namespace spvtools { namespace opt { diff --git a/source/opt/remove_duplicates_pass.h b/source/opt/remove_duplicates_pass.h index 08e6c13a3d..8554a987dc 100644 --- a/source/opt/remove_duplicates_pass.h +++ b/source/opt/remove_duplicates_pass.h @@ -16,12 +16,13 @@ #define SOURCE_OPT_REMOVE_DUPLICATES_PASS_H_ #include +#include -#include "decoration_manager.h" -#include "def_use_manager.h" -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include "source/opt/decoration_manager.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/replace_invalid_opc.cpp b/source/opt/replace_invalid_opc.cpp index 711405fb6f..4e0f24f467 100644 --- a/source/opt/replace_invalid_opc.cpp +++ b/source/opt/replace_invalid_opc.cpp @@ -12,9 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "replace_invalid_opc.h" +#include "source/opt/replace_invalid_opc.h" #include +#include namespace spvtools { namespace opt { diff --git a/source/opt/replace_invalid_opc.h b/source/opt/replace_invalid_opc.h index ef5a2745d7..4d46405821 100644 --- a/source/opt/replace_invalid_opc.h +++ b/source/opt/replace_invalid_opc.h @@ -15,7 +15,9 @@ #ifndef SOURCE_OPT_REPLACE_INVALID_OPC_H_ #define SOURCE_OPT_REPLACE_INVALID_OPC_H_ -#include "pass.h" +#include + +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/scalar_analysis.cpp b/source/opt/scalar_analysis.cpp index c124a3ffa0..38555e649e 100644 --- a/source/opt/scalar_analysis.cpp +++ b/source/opt/scalar_analysis.cpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/scalar_analysis.h" +#include "source/opt/scalar_analysis.h" #include #include #include #include -#include "opt/ir_context.h" +#include "source/opt/ir_context.h" // Transforms a given scalar operation instruction into a DAG representation. // diff --git a/source/opt/scalar_analysis.h b/source/opt/scalar_analysis.h index f33f612802..fb6d631f56 100644 --- a/source/opt/scalar_analysis.h +++ b/source/opt/scalar_analysis.h @@ -20,11 +20,12 @@ #include #include #include +#include #include -#include "opt/basic_block.h" -#include "opt/instruction.h" -#include "opt/scalar_analysis_nodes.h" +#include "source/opt/basic_block.h" +#include "source/opt/instruction.h" +#include "source/opt/scalar_analysis_nodes.h" namespace spvtools { namespace opt { diff --git a/source/opt/scalar_analysis_nodes.h b/source/opt/scalar_analysis_nodes.h index 59cd725b1f..450522ec3f 100644 --- a/source/opt/scalar_analysis_nodes.h +++ b/source/opt/scalar_analysis_nodes.h @@ -19,7 +19,8 @@ #include #include #include -#include "opt/tree_iterator.h" + +#include "source/opt/tree_iterator.h" namespace spvtools { namespace opt { diff --git a/source/opt/scalar_analysis_simplification.cpp b/source/opt/scalar_analysis_simplification.cpp index 58b08ea7c4..52f2d6ad90 100644 --- a/source/opt/scalar_analysis_simplification.cpp +++ b/source/opt/scalar_analysis_simplification.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/scalar_analysis.h" +#include "source/opt/scalar_analysis.h" #include #include diff --git a/source/opt/scalar_replacement_pass.cpp b/source/opt/scalar_replacement_pass.cpp index b3e9c52c1b..c0ec12851a 100644 --- a/source/opt/scalar_replacement_pass.cpp +++ b/source/opt/scalar_replacement_pass.cpp @@ -12,16 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "scalar_replacement_pass.h" - -#include "enum_string_mapping.h" -#include "extensions.h" -#include "make_unique.h" -#include "reflect.h" -#include "types.h" +#include "source/opt/scalar_replacement_pass.h" +#include #include #include +#include + +#include "source/enum_string_mapping.h" +#include "source/extensions.h" +#include "source/opt/make_unique.h" +#include "source/opt/reflect.h" +#include "source/opt/types.h" namespace spvtools { namespace opt { diff --git a/source/opt/scalar_replacement_pass.h b/source/opt/scalar_replacement_pass.h index 143d5783dc..c89bbc4015 100644 --- a/source/opt/scalar_replacement_pass.h +++ b/source/opt/scalar_replacement_pass.h @@ -16,12 +16,15 @@ #define SOURCE_OPT_SCALAR_REPLACEMENT_PASS_H_ #include - -#include "function.h" -#include "pass.h" -#include "type_manager.h" - +#include #include +#include +#include +#include + +#include "source/opt/function.h" +#include "source/opt/pass.h" +#include "source/opt/type_manager.h" namespace spvtools { namespace opt { diff --git a/source/opt/set_spec_constant_default_value_pass.cpp b/source/opt/set_spec_constant_default_value_pass.cpp index fe97582b79..7927b605c3 100644 --- a/source/opt/set_spec_constant_default_value_pass.cpp +++ b/source/opt/set_spec_constant_default_value_pass.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "set_spec_constant_default_value_pass.h" +#include "source/opt/set_spec_constant_default_value_pass.h" #include #include @@ -20,13 +20,13 @@ #include #include -#include "def_use_manager.h" -#include "ir_context.h" -#include "make_unique.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/make_unique.h" +#include "source/opt/type_manager.h" +#include "source/opt/types.h" +#include "source/util/parse_number.h" #include "spirv-tools/libspirv.h" -#include "type_manager.h" -#include "types.h" -#include "util/parse_number.h" namespace spvtools { namespace opt { diff --git a/source/opt/set_spec_constant_default_value_pass.h b/source/opt/set_spec_constant_default_value_pass.h index a1a6da4830..8bd1787cc2 100644 --- a/source/opt/set_spec_constant_default_value_pass.h +++ b/source/opt/set_spec_constant_default_value_pass.h @@ -18,10 +18,12 @@ #include #include #include +#include +#include -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/simplification_pass.cpp b/source/opt/simplification_pass.cpp index 81ceb8657b..5fbafbdd1c 100644 --- a/source/opt/simplification_pass.cpp +++ b/source/opt/simplification_pass.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "simplification_pass.h" +#include "source/opt/simplification_pass.h" #include #include #include -#include "fold.h" +#include "source/opt/fold.h" namespace spvtools { namespace opt { diff --git a/source/opt/simplification_pass.h b/source/opt/simplification_pass.h index 6997f7dfd0..348c96a033 100644 --- a/source/opt/simplification_pass.h +++ b/source/opt/simplification_pass.h @@ -15,9 +15,9 @@ #ifndef SOURCE_OPT_SIMPLIFICATION_PASS_H_ #define SOURCE_OPT_SIMPLIFICATION_PASS_H_ -#include "function.h" -#include "ir_context.h" -#include "pass.h" +#include "source/opt/function.h" +#include "source/opt/ir_context.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/ssa_rewrite_pass.cpp b/source/opt/ssa_rewrite_pass.cpp index 995b750c22..8c3f6269e1 100644 --- a/source/opt/ssa_rewrite_pass.cpp +++ b/source/opt/ssa_rewrite_pass.cpp @@ -39,14 +39,16 @@ // some Phi instructions may be dead // (https://en.wikipedia.org/wiki/Static_single_assignment_form). -#include "ssa_rewrite_pass.h" -#include "cfg.h" -#include "make_unique.h" -#include "mem_pass.h" -#include "opcode.h" +#include "source/opt/ssa_rewrite_pass.h" +#include #include +#include "source/opcode.h" +#include "source/opt/cfg.h" +#include "source/opt/make_unique.h" +#include "source/opt/mem_pass.h" + // Debug logging (0: Off, 1-N: Verbosity level). Replace this with the // implementation done for // https://github.com/KhronosGroup/SPIRV-Tools/issues/1351 diff --git a/source/opt/ssa_rewrite_pass.h b/source/opt/ssa_rewrite_pass.h index e7edbbacc8..c0373dc067 100644 --- a/source/opt/ssa_rewrite_pass.h +++ b/source/opt/ssa_rewrite_pass.h @@ -15,11 +15,16 @@ #ifndef SOURCE_OPT_SSA_REWRITE_PASS_H_ #define SOURCE_OPT_SSA_REWRITE_PASS_H_ -#include "basic_block.h" -#include "ir_context.h" -#include "mem_pass.h" - +#include +#include #include +#include +#include +#include + +#include "source/opt/basic_block.h" +#include "source/opt/ir_context.h" +#include "source/opt/mem_pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/strength_reduction_pass.cpp b/source/opt/strength_reduction_pass.cpp index fa4b32177f..ab7c4eb8dd 100644 --- a/source/opt/strength_reduction_pass.cpp +++ b/source/opt/strength_reduction_pass.cpp @@ -12,18 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "strength_reduction_pass.h" +#include "source/opt/strength_reduction_pass.h" #include #include #include +#include #include #include +#include +#include -#include "def_use_manager.h" -#include "ir_context.h" -#include "log.h" -#include "reflect.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/log.h" +#include "source/opt/reflect.h" namespace { // Count the number of trailing zeros in the binary representation of diff --git a/source/opt/strength_reduction_pass.h b/source/opt/strength_reduction_pass.h index d7218ebcce..8dfeb307bf 100644 --- a/source/opt/strength_reduction_pass.h +++ b/source/opt/strength_reduction_pass.h @@ -15,10 +15,10 @@ #ifndef SOURCE_OPT_STRENGTH_REDUCTION_PASS_H_ #define SOURCE_OPT_STRENGTH_REDUCTION_PASS_H_ -#include "def_use_manager.h" -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/strip_debug_info_pass.cpp b/source/opt/strip_debug_info_pass.cpp index c98a227455..5d9c5fec8a 100644 --- a/source/opt/strip_debug_info_pass.cpp +++ b/source/opt/strip_debug_info_pass.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "strip_debug_info_pass.h" -#include "ir_context.h" +#include "source/opt/strip_debug_info_pass.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/strip_debug_info_pass.h b/source/opt/strip_debug_info_pass.h index 46373ccc03..47a2cd4090 100644 --- a/source/opt/strip_debug_info_pass.h +++ b/source/opt/strip_debug_info_pass.h @@ -15,9 +15,9 @@ #ifndef SOURCE_OPT_STRIP_DEBUG_INFO_PASS_H_ #define SOURCE_OPT_STRIP_DEBUG_INFO_PASS_H_ -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/strip_reflect_info_pass.cpp b/source/opt/strip_reflect_info_pass.cpp index fab2e3d872..14ce31ff32 100644 --- a/source/opt/strip_reflect_info_pass.cpp +++ b/source/opt/strip_reflect_info_pass.cpp @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "strip_reflect_info_pass.h" +#include "source/opt/strip_reflect_info_pass.h" #include +#include -#include "instruction.h" -#include "ir_context.h" +#include "source/opt/instruction.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/strip_reflect_info_pass.h b/source/opt/strip_reflect_info_pass.h index 1c0fa178d4..935a605e39 100644 --- a/source/opt/strip_reflect_info_pass.h +++ b/source/opt/strip_reflect_info_pass.h @@ -15,9 +15,9 @@ #ifndef SOURCE_OPT_STRIP_REFLECT_INFO_PASS_H_ #define SOURCE_OPT_STRIP_REFLECT_INFO_PASS_H_ -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/type_manager.cpp b/source/opt/type_manager.cpp index 7f615a28ac..c63529275d 100644 --- a/source/opt/type_manager.cpp +++ b/source/opt/type_manager.cpp @@ -12,16 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "type_manager.h" +#include "source/opt/type_manager.h" +#include #include #include #include -#include "ir_context.h" -#include "log.h" -#include "make_unique.h" -#include "reflect.h" +#include "source/opt/ir_context.h" +#include "source/opt/log.h" +#include "source/opt/make_unique.h" +#include "source/opt/reflect.h" namespace spvtools { namespace opt { diff --git a/source/opt/type_manager.h b/source/opt/type_manager.h index 10292a7b0b..c44969e84f 100644 --- a/source/opt/type_manager.h +++ b/source/opt/type_manager.h @@ -18,11 +18,12 @@ #include #include #include +#include #include -#include "module.h" +#include "source/opt/module.h" +#include "source/opt/types.h" #include "spirv-tools/libspirv.hpp" -#include "types.h" namespace spvtools { namespace opt { diff --git a/source/opt/types.cpp b/source/opt/types.cpp index e5d90d09eb..6045ff2bf7 100644 --- a/source/opt/types.cpp +++ b/source/opt/types.cpp @@ -18,7 +18,7 @@ #include #include -#include "types.h" +#include "source/opt/types.h" namespace spvtools { namespace opt { diff --git a/source/opt/types.h b/source/opt/types.h index d88df00f08..625f342a68 100644 --- a/source/opt/types.h +++ b/source/opt/types.h @@ -23,9 +23,10 @@ #include #include #include +#include #include -#include "latest_version_spirv_header.h" +#include "source/latest_version_spirv_header.h" #include "spirv-tools/libspirv.h" namespace spvtools { diff --git a/source/opt/unify_const_pass.cpp b/source/opt/unify_const_pass.cpp index 83bd6c0fa6..c52f34acb9 100644 --- a/source/opt/unify_const_pass.cpp +++ b/source/opt/unify_const_pass.cpp @@ -12,14 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unify_const_pass.h" +#include "source/opt/unify_const_pass.h" +#include #include #include +#include -#include "def_use_manager.h" -#include "ir_context.h" -#include "make_unique.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/make_unique.h" namespace spvtools { namespace opt { diff --git a/source/opt/unify_const_pass.h b/source/opt/unify_const_pass.h index e35f9914c1..f2b7897ccd 100644 --- a/source/opt/unify_const_pass.h +++ b/source/opt/unify_const_pass.h @@ -15,9 +15,9 @@ #ifndef SOURCE_OPT_UNIFY_CONST_PASS_H_ #define SOURCE_OPT_UNIFY_CONST_PASS_H_ -#include "ir_context.h" -#include "module.h" -#include "pass.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/opt/value_number_table.cpp b/source/opt/value_number_table.cpp index 165540f534..1bac63fabe 100644 --- a/source/opt/value_number_table.cpp +++ b/source/opt/value_number_table.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "value_number_table.h" +#include "source/opt/value_number_table.h" #include -#include "cfg.h" -#include "ir_context.h" +#include "source/opt/cfg.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/source/opt/value_number_table.h b/source/opt/value_number_table.h index 35dcaf72fa..39129ffa35 100644 --- a/source/opt/value_number_table.h +++ b/source/opt/value_number_table.h @@ -17,7 +17,8 @@ #include #include -#include "instruction.h" + +#include "source/opt/instruction.h" namespace spvtools { namespace opt { diff --git a/source/opt/vector_dce.cpp b/source/opt/vector_dce.cpp index 8738fccf96..911242e058 100644 --- a/source/opt/vector_dce.cpp +++ b/source/opt/vector_dce.cpp @@ -12,16 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "vector_dce.h" +#include "source/opt/vector_dce.h" +#include + +namespace spvtools { +namespace opt { namespace { + const uint32_t kExtractCompositeIdInIdx = 0; const uint32_t kInsertObjectIdInIdx = 0; const uint32_t kInsertCompositeIdInIdx = 1; -} // namespace -namespace spvtools { -namespace opt { +} // namespace Pass::Status VectorDCE::Process() { bool modified = false; diff --git a/source/opt/vector_dce.h b/source/opt/vector_dce.h index 960deb76e1..48886998da 100644 --- a/source/opt/vector_dce.h +++ b/source/opt/vector_dce.h @@ -15,8 +15,11 @@ #ifndef SOURCE_OPT_VECTOR_DCE_H_ #define SOURCE_OPT_VECTOR_DCE_H_ -#include -#include "mem_pass.h" +#include +#include + +#include "source/opt/mem_pass.h" +#include "source/util/bit_vector.h" namespace spvtools { namespace opt { diff --git a/source/opt/workaround1209.cpp b/source/opt/workaround1209.cpp index fae08b8360..d6e9d2cf72 100644 --- a/source/opt/workaround1209.cpp +++ b/source/opt/workaround1209.cpp @@ -12,10 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "workaround1209.h" +#include "source/opt/workaround1209.h" #include +#include #include +#include namespace spvtools { namespace opt { diff --git a/source/opt/workaround1209.h b/source/opt/workaround1209.h index 22d9f9c96e..9a1f88d93c 100644 --- a/source/opt/workaround1209.h +++ b/source/opt/workaround1209.h @@ -15,7 +15,7 @@ #ifndef SOURCE_OPT_WORKAROUND1209_H_ #define SOURCE_OPT_WORKAROUND1209_H_ -#include "pass.h" +#include "source/opt/pass.h" namespace spvtools { namespace opt { diff --git a/source/parsed_operand.cpp b/source/parsed_operand.cpp index 3f10d822ea..3bb4dd0161 100644 --- a/source/parsed_operand.cpp +++ b/source/parsed_operand.cpp @@ -14,10 +14,10 @@ // This file contains utility functions for spv_parsed_operand_t. -#include "parsed_operand.h" +#include "source/parsed_operand.h" #include -#include "util/hex_float.h" +#include "source/util/hex_float.h" namespace spvtools { diff --git a/source/parsed_operand.h b/source/parsed_operand.h index 779677efaf..bab8611077 100644 --- a/source/parsed_operand.h +++ b/source/parsed_operand.h @@ -16,6 +16,7 @@ #define SOURCE_PARSED_OPERAND_H_ #include + #include "spirv-tools/libspirv.h" namespace spvtools { diff --git a/source/print.cpp b/source/print.cpp index f03c2d6892..f75e2d4573 100644 --- a/source/print.cpp +++ b/source/print.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "print.h" +#include "source/print.h" #if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC) || \ defined(SPIRV_FREEBSD) diff --git a/source/spirv_constant.h b/source/spirv_constant.h index d705ff2cef..39771ccb26 100644 --- a/source/spirv_constant.h +++ b/source/spirv_constant.h @@ -15,7 +15,7 @@ #ifndef SOURCE_SPIRV_CONSTANT_H_ #define SOURCE_SPIRV_CONSTANT_H_ -#include "latest_version_spirv_header.h" +#include "source/latest_version_spirv_header.h" #include "spirv-tools/libspirv.h" // Version number macros. diff --git a/source/spirv_definition.h b/source/spirv_definition.h index 2513944ca5..63a4ef0db2 100644 --- a/source/spirv_definition.h +++ b/source/spirv_definition.h @@ -17,7 +17,7 @@ #include -#include "latest_version_spirv_header.h" +#include "source/latest_version_spirv_header.h" #define spvIsInBitfield(value, bitfield) ((value) == ((value)&bitfield)) diff --git a/source/spirv_endian.cpp b/source/spirv_endian.cpp index 56eaac855f..1d77091784 100644 --- a/source/spirv_endian.cpp +++ b/source/spirv_endian.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "spirv_endian.h" +#include "source/spirv_endian.h" #include diff --git a/source/spirv_stats.cpp b/source/spirv_stats.cpp index 9720d5502b..bf4107a147 100644 --- a/source/spirv_stats.cpp +++ b/source/spirv_stats.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "spirv_stats.h" +#include "source/spirv_stats.h" #include @@ -20,17 +20,17 @@ #include #include -#include "diagnostic.h" -#include "enum_string_mapping.h" -#include "extensions.h" -#include "id_descriptor.h" -#include "instruction.h" -#include "opcode.h" -#include "operand.h" +#include "source/diagnostic.h" +#include "source/enum_string_mapping.h" +#include "source/extensions.h" +#include "source/id_descriptor.h" +#include "source/instruction.h" +#include "source/opcode.h" +#include "source/operand.h" +#include "source/val/instruction.h" +#include "source/val/validate.h" +#include "source/val/validation_state.h" #include "spirv-tools/libspirv.h" -#include "val/instruction.h" -#include "val/validate.h" -#include "val/validation_state.h" namespace spvtools { namespace { diff --git a/source/spirv_stats.h b/source/spirv_stats.h index fd661d4dc1..348bba161e 100644 --- a/source/spirv_stats.h +++ b/source/spirv_stats.h @@ -18,6 +18,7 @@ #include #include #include +#include #include #include "spirv-tools/libspirv.hpp" diff --git a/source/spirv_target_env.cpp b/source/spirv_target_env.cpp index 3a8766d7bb..7a11630c72 100644 --- a/source/spirv_target_env.cpp +++ b/source/spirv_target_env.cpp @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "source/spirv_target_env.h" + #include #include +#include "source/spirv_constant.h" #include "spirv-tools/libspirv.h" -#include "spirv_constant.h" const char* spvTargetEnvDescription(spv_target_env env) { switch (env) { diff --git a/source/spirv_validator_options.cpp b/source/spirv_validator_options.cpp index daa53ebd13..0c06253649 100644 --- a/source/spirv_validator_options.cpp +++ b/source/spirv_validator_options.cpp @@ -15,7 +15,7 @@ #include #include -#include "spirv_validator_options.h" +#include "source/spirv_validator_options.h" bool spvParseUniversalLimitsOptions(const char* s, spv_validator_limit* type) { auto match = [s](const char* b) { diff --git a/source/table.cpp b/source/table.cpp index 9f8be8621e..b10d776da4 100644 --- a/source/table.cpp +++ b/source/table.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "table.h" +#include "source/table.h" #include diff --git a/source/table.h b/source/table.h index 0ad5bb5206..9790136bd5 100644 --- a/source/table.h +++ b/source/table.h @@ -15,10 +15,10 @@ #ifndef SOURCE_TABLE_H_ #define SOURCE_TABLE_H_ -#include "latest_version_spirv_header.h" +#include "source/latest_version_spirv_header.h" -#include "extensions.h" -#include "message.h" +#include "source/extensions.h" +#include "source/message.h" #include "spirv-tools/libspirv.hpp" typedef struct spv_opcode_desc_t { diff --git a/source/text.cpp b/source/text.cpp index d16e2f47a5..ba575f90d9 100644 --- a/source/text.cpp +++ b/source/text.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "text.h" +#include "source/text.h" #include #include @@ -21,26 +21,28 @@ #include #include #include +#include #include #include #include +#include #include -#include "assembly_grammar.h" -#include "binary.h" -#include "diagnostic.h" -#include "ext_inst.h" -#include "instruction.h" -#include "message.h" -#include "opcode.h" -#include "operand.h" +#include "source/assembly_grammar.h" +#include "source/binary.h" +#include "source/diagnostic.h" +#include "source/ext_inst.h" +#include "source/instruction.h" +#include "source/message.h" +#include "source/opcode.h" +#include "source/operand.h" +#include "source/spirv_constant.h" +#include "source/spirv_target_env.h" +#include "source/table.h" +#include "source/text_handler.h" +#include "source/util/bitutils.h" +#include "source/util/parse_number.h" #include "spirv-tools/libspirv.h" -#include "spirv_constant.h" -#include "spirv_target_env.h" -#include "table.h" -#include "text_handler.h" -#include "util/bitutils.h" -#include "util/parse_number.h" bool spvIsValidIDCharacter(const char value) { return value == '_' || 0 != ::isalnum(value); diff --git a/source/text.h b/source/text.h index 727cb2f6d7..fa34ee16be 100644 --- a/source/text.h +++ b/source/text.h @@ -17,9 +17,9 @@ #include -#include "operand.h" +#include "source/operand.h" +#include "source/spirv_constant.h" #include "spirv-tools/libspirv.h" -#include "spirv_constant.h" typedef enum spv_literal_type_t { SPV_LITERAL_TYPE_INT_32, diff --git a/source/text_handler.cpp b/source/text_handler.cpp index 49a1675a97..37b47fc027 100644 --- a/source/text_handler.cpp +++ b/source/text_handler.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "text_handler.h" +#include "source/text_handler.h" #include #include @@ -20,15 +20,15 @@ #include #include -#include "assembly_grammar.h" -#include "binary.h" -#include "ext_inst.h" -#include "instruction.h" -#include "opcode.h" -#include "text.h" -#include "util/bitutils.h" -#include "util/hex_float.h" -#include "util/parse_number.h" +#include "source/assembly_grammar.h" +#include "source/binary.h" +#include "source/ext_inst.h" +#include "source/instruction.h" +#include "source/opcode.h" +#include "source/text.h" +#include "source/util/bitutils.h" +#include "source/util/hex_float.h" +#include "source/util/parse_number.h" namespace spvtools { namespace { diff --git a/source/text_handler.h b/source/text_handler.h index daefdc8beb..6785f25f46 100644 --- a/source/text_handler.h +++ b/source/text_handler.h @@ -16,15 +16,18 @@ #define SOURCE_TEXT_HANDLER_H_ #include +#include #include +#include #include #include +#include -#include "diagnostic.h" -#include "instruction.h" -#include "message.h" +#include "source/diagnostic.h" +#include "source/instruction.h" +#include "source/message.h" +#include "source/text.h" #include "spirv-tools/libspirv.h" -#include "text.h" namespace spvtools { diff --git a/source/util/bit_stream.cpp b/source/util/bit_stream.cpp index e30c626203..a275a63a92 100644 --- a/source/util/bit_stream.cpp +++ b/source/util/bit_stream.cpp @@ -18,7 +18,7 @@ #include #include -#include "util/bit_stream.h" +#include "source/util/bit_stream.h" namespace spvtools { namespace utils { diff --git a/source/util/bit_stream.h b/source/util/bit_stream.h index d4c8121566..581653749e 100644 --- a/source/util/bit_stream.h +++ b/source/util/bit_stream.h @@ -23,6 +23,7 @@ #include #include #include +#include #include namespace spvtools { diff --git a/source/util/bit_vector.cpp b/source/util/bit_vector.cpp index 6151657908..47e275bf46 100644 --- a/source/util/bit_vector.cpp +++ b/source/util/bit_vector.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "bit_vector.h" +#include "source/util/bit_vector.h" #include #include diff --git a/source/util/hex_float.h b/source/util/hex_float.h index 03ce8228cd..b7baf093b4 100644 --- a/source/util/hex_float.h +++ b/source/util/hex_float.h @@ -24,7 +24,7 @@ #include #include -#include "bitutils.h" +#include "source/util/bitutils.h" #ifndef __GNUC__ #define GCC_VERSION 0 diff --git a/source/util/huffman_codec.h b/source/util/huffman_codec.h index ed8d1b9006..705bac1c20 100644 --- a/source/util/huffman_codec.h +++ b/source/util/huffman_codec.h @@ -27,8 +27,10 @@ #include #include #include +#include #include #include +#include #include namespace spvtools { diff --git a/source/util/ilist.h b/source/util/ilist.h index a2905e93df..9837b09b32 100644 --- a/source/util/ilist.h +++ b/source/util/ilist.h @@ -20,7 +20,7 @@ #include #include -#include "ilist_node.h" +#include "source/util/ilist_node.h" namespace spvtools { namespace utils { diff --git a/source/util/move_to_front.h b/source/util/move_to_front.h index 67c6f6eb9b..bf2eba4643 100644 --- a/source/util/move_to_front.h +++ b/source/util/move_to_front.h @@ -26,6 +26,7 @@ #include #include #include +#include #include namespace spvtools { diff --git a/source/util/parse_number.cpp b/source/util/parse_number.cpp index e983072fbf..d0b13c64d0 100644 --- a/source/util/parse_number.cpp +++ b/source/util/parse_number.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "util/parse_number.h" +#include "source/util/parse_number.h" #include #include @@ -21,7 +21,7 @@ #include #include -#include "util/hex_float.h" +#include "source/util/hex_float.h" namespace spvtools { namespace utils { diff --git a/source/util/parse_number.h b/source/util/parse_number.h index ef54a9dc8d..729aac54bf 100644 --- a/source/util/parse_number.h +++ b/source/util/parse_number.h @@ -19,8 +19,8 @@ #include #include +#include "source/util/hex_float.h" #include "spirv-tools/libspirv.h" -#include "util/hex_float.h" namespace spvtools { namespace utils { diff --git a/source/util/small_vector.h b/source/util/small_vector.h index 2d1a52df6a..49a0381105 100644 --- a/source/util/small_vector.h +++ b/source/util/small_vector.h @@ -17,9 +17,11 @@ #include #include +#include +#include #include -#include "opt/make_unique.h" +#include "source/opt/make_unique.h" namespace spvtools { namespace utils { diff --git a/source/util/string_utils.cpp b/source/util/string_utils.cpp index 435bbe178b..29ce2aa4a9 100644 --- a/source/util/string_utils.cpp +++ b/source/util/string_utils.cpp @@ -16,7 +16,7 @@ #include #include -#include "util/string_utils.h" +#include "source/util/string_utils.h" namespace spvtools { namespace utils { diff --git a/source/util/string_utils.h b/source/util/string_utils.h index 7d329dd33d..322c574fb6 100644 --- a/source/util/string_utils.h +++ b/source/util/string_utils.h @@ -18,7 +18,7 @@ #include #include -#include "util/string_utils.h" +#include "source/util/string_utils.h" namespace spvtools { namespace utils { diff --git a/source/util/timer.cpp b/source/util/timer.cpp index a90e41a255..c8b8d5b61f 100644 --- a/source/util/timer.cpp +++ b/source/util/timer.cpp @@ -14,7 +14,7 @@ #if defined(SPIRV_TIMER_ENABLED) -#include "util/timer.h" +#include "source/util/timer.h" #include #include diff --git a/source/val/basic_block.cpp b/source/val/basic_block.cpp index ce1a3b5139..a53103c8a6 100644 --- a/source/val/basic_block.cpp +++ b/source/val/basic_block.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "val/basic_block.h" +#include "source/val/basic_block.h" #include #include diff --git a/source/val/basic_block.h b/source/val/basic_block.h index 7d4ded5d39..efbd243b67 100644 --- a/source/val/basic_block.h +++ b/source/val/basic_block.h @@ -15,15 +15,14 @@ #ifndef SOURCE_VAL_BASIC_BLOCK_H_ #define SOURCE_VAL_BASIC_BLOCK_H_ -#include "latest_version_spirv_header.h" - #include - #include #include #include #include +#include "source/latest_version_spirv_header.h" + namespace spvtools { namespace val { diff --git a/source/val/construct.cpp b/source/val/construct.cpp index 6a70ab258a..c11a065b7f 100644 --- a/source/val/construct.cpp +++ b/source/val/construct.cpp @@ -12,13 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "val/construct.h" -#include "val/function.h" +#include "source/val/construct.h" #include #include #include +#include "source/val/function.h" + namespace spvtools { namespace val { diff --git a/source/val/construct.h b/source/val/construct.h index 6b64ce6b98..c7e7a780d6 100644 --- a/source/val/construct.h +++ b/source/val/construct.h @@ -15,12 +15,12 @@ #ifndef SOURCE_VAL_CONSTRUCT_H_ #define SOURCE_VAL_CONSTRUCT_H_ -#include "val/basic_block.h" - #include #include #include +#include "source/val/basic_block.h" + namespace spvtools { namespace val { diff --git a/source/val/decoration.h b/source/val/decoration.h index 52a9aad7de..ed3320f87a 100644 --- a/source/val/decoration.h +++ b/source/val/decoration.h @@ -19,7 +19,7 @@ #include #include -#include "latest_version_spirv_header.h" +#include "source/latest_version_spirv_header.h" namespace spvtools { namespace val { diff --git a/source/val/function.cpp b/source/val/function.cpp index d1599b716c..f638fb5b4e 100644 --- a/source/val/function.cpp +++ b/source/val/function.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "val/function.h" +#include "source/val/function.h" #include @@ -22,10 +22,10 @@ #include #include -#include "cfa.h" -#include "val/basic_block.h" -#include "val/construct.h" -#include "validate.h" +#include "source/cfa.h" +#include "source/val/basic_block.h" +#include "source/val/construct.h" +#include "source/val/validate.h" namespace spvtools { namespace val { diff --git a/source/val/function.h b/source/val/function.h index 461a8fba2f..a052bbda0b 100644 --- a/source/val/function.h +++ b/source/val/function.h @@ -19,14 +19,16 @@ #include #include #include +#include #include #include +#include #include -#include "latest_version_spirv_header.h" +#include "source/latest_version_spirv_header.h" +#include "source/val/basic_block.h" +#include "source/val/construct.h" #include "spirv-tools/libspirv.h" -#include "val/basic_block.h" -#include "val/construct.h" namespace spvtools { namespace val { diff --git a/source/val/instruction.cpp b/source/val/instruction.cpp index 675d6395ec..b9155898ac 100644 --- a/source/val/instruction.cpp +++ b/source/val/instruction.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "val/instruction.h" +#include "source/val/instruction.h" #include diff --git a/source/val/instruction.h b/source/val/instruction.h index 6c78b83bd9..1fa855fca9 100644 --- a/source/val/instruction.h +++ b/source/val/instruction.h @@ -21,8 +21,8 @@ #include #include +#include "source/table.h" #include "spirv-tools/libspirv.h" -#include "table.h" namespace spvtools { namespace val { diff --git a/source/val/validate.h b/source/val/validate.h index 45709c9c7b..3c64fb6ac0 100644 --- a/source/val/validate.h +++ b/source/val/validate.h @@ -16,6 +16,7 @@ #define SOURCE_VAL_VALIDATE_H_ #include +#include #include #include diff --git a/source/val/validate_arithmetics.cpp b/source/val/validate_arithmetics.cpp index df85276d83..2314e7dfcb 100644 --- a/source/val/validate_arithmetics.cpp +++ b/source/val/validate_arithmetics.cpp @@ -16,6 +16,8 @@ #include "source/val/validate.h" +#include + #include "source/diagnostic.h" #include "source/opcode.h" #include "source/val/instruction.h" diff --git a/source/val/validate_barriers.cpp b/source/val/validate_barriers.cpp index dfeb9937cf..895df363c7 100644 --- a/source/val/validate_barriers.cpp +++ b/source/val/validate_barriers.cpp @@ -16,6 +16,8 @@ #include "source/val/validate.h" +#include + #include "source/diagnostic.h" #include "source/opcode.h" #include "source/spirv_constant.h" diff --git a/source/val/validate_builtins.cpp b/source/val/validate_builtins.cpp index 6c885021b3..c791e428fb 100644 --- a/source/val/validate_builtins.cpp +++ b/source/val/validate_builtins.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/source/val/validate_capability.cpp b/source/val/validate_capability.cpp index bb97ded2cc..4724b9f79d 100644 --- a/source/val/validate_capability.cpp +++ b/source/val/validate_capability.cpp @@ -17,6 +17,7 @@ #include "source/val/validate.h" #include +#include #include #include "source/diagnostic.h" diff --git a/source/val/validate_decorations.cpp b/source/val/validate_decorations.cpp index 2f0d007d9c..bfaa645694 100644 --- a/source/val/validate_decorations.cpp +++ b/source/val/validate_decorations.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include "source/diagnostic.h" #include "source/opcode.h" diff --git a/source/val/validate_derivatives.cpp b/source/val/validate_derivatives.cpp index 398e79ab12..951e2142ee 100644 --- a/source/val/validate_derivatives.cpp +++ b/source/val/validate_derivatives.cpp @@ -16,6 +16,8 @@ #include "source/val/validate.h" +#include + #include "source/diagnostic.h" #include "source/opcode.h" #include "source/val/instruction.h" diff --git a/source/val/validate_ext_inst.cpp b/source/val/validate_ext_inst.cpp index b72c3634c1..245657196b 100644 --- a/source/val/validate_ext_inst.cpp +++ b/source/val/validate_ext_inst.cpp @@ -17,6 +17,8 @@ #include "source/val/validate.h" #include +#include +#include #include "source/diagnostic.h" #include "source/latest_version_glsl_std_450_header.h" diff --git a/source/val/validate_id.cpp b/source/val/validate_id.cpp index af69051810..ee1f0b549b 100644 --- a/source/val/validate_id.cpp +++ b/source/val/validate_id.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/source/val/validate_image.cpp b/source/val/validate_image.cpp index 47c3e43e8c..f2be9dcaea 100644 --- a/source/val/validate_image.cpp +++ b/source/val/validate_image.cpp @@ -16,6 +16,8 @@ #include "source/val/validate.h" +#include + #include "source/diagnostic.h" #include "source/opcode.h" #include "source/spirv_target_env.h" diff --git a/source/val/validate_instruction.cpp b/source/val/validate_instruction.cpp index 33e1bc771f..85995caa3e 100644 --- a/source/val/validate_instruction.cpp +++ b/source/val/validate_instruction.cpp @@ -18,9 +18,9 @@ #include #include - #include #include +#include #include "source/binary.h" #include "source/diagnostic.h" diff --git a/source/val/validate_interfaces.cpp b/source/val/validate_interfaces.cpp index 354e4be487..b5d680e501 100644 --- a/source/val/validate_interfaces.cpp +++ b/source/val/validate_interfaces.cpp @@ -15,6 +15,7 @@ #include "source/val/validate.h" #include +#include #include "source/diagnostic.h" #include "source/val/function.h" diff --git a/source/val/validate_memory.cpp b/source/val/validate_memory.cpp index 7f0f578824..5506092137 100644 --- a/source/val/validate_memory.cpp +++ b/source/val/validate_memory.cpp @@ -15,6 +15,8 @@ #include "source/val/validate.h" #include +#include +#include #include "source/opcode.h" #include "source/val/instruction.h" diff --git a/source/val/validation_state.cpp b/source/val/validation_state.cpp index 27d1fa63c5..e0c9e5ba45 100644 --- a/source/val/validation_state.cpp +++ b/source/val/validation_state.cpp @@ -12,17 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "val/validation_state.h" +#include "source/val/validation_state.h" #include #include +#include -#include "opcode.h" +#include "source/opcode.h" +#include "source/spirv_target_env.h" +#include "source/val/basic_block.h" +#include "source/val/construct.h" +#include "source/val/function.h" #include "spirv-tools/libspirv.h" -#include "spirv_target_env.h" -#include "val/basic_block.h" -#include "val/construct.h" -#include "val/function.h" namespace spvtools { namespace val { diff --git a/source/val/validation_state.h b/source/val/validation_state.h index 3dbc2d7772..d93fe1e967 100644 --- a/source/val/validation_state.h +++ b/source/val/validation_state.h @@ -15,6 +15,7 @@ #ifndef SOURCE_VAL_VALIDATION_STATE_H_ #define SOURCE_VAL_VALIDATION_STATE_H_ +#include #include #include #include @@ -22,17 +23,17 @@ #include #include -#include "assembly_grammar.h" -#include "decoration.h" -#include "diagnostic.h" -#include "disassemble.h" -#include "enum_set.h" -#include "latest_version_spirv_header.h" +#include "source/assembly_grammar.h" +#include "source/diagnostic.h" +#include "source/disassemble.h" +#include "source/enum_set.h" +#include "source/latest_version_spirv_header.h" +#include "source/spirv_definition.h" +#include "source/spirv_validator_options.h" +#include "source/val/decoration.h" +#include "source/val/function.h" +#include "source/val/instruction.h" #include "spirv-tools/libspirv.h" -#include "spirv_definition.h" -#include "spirv_validator_options.h" -#include "val/function.h" -#include "val/instruction.h" namespace spvtools { namespace val { diff --git a/test/assembly_context_test.cpp b/test/assembly_context_test.cpp index 40ba5bd02b..b6d60b95d9 100644 --- a/test/assembly_context_test.cpp +++ b/test/assembly_context_test.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" - -#include +#include #include +#include "gmock/gmock.h" #include "source/instruction.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/assembly_format_test.cpp b/test/assembly_format_test.cpp index d760e66b54..59e500b813 100644 --- a/test/assembly_format_test.cpp +++ b/test/assembly_format_test.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "test_fixture.h" +#include "test/test_fixture.h" namespace svptools { namespace { diff --git a/test/binary_destroy_test.cpp b/test/binary_destroy_test.cpp index 26c559a509..e3870c9f0b 100644 --- a/test/binary_destroy_test.cpp +++ b/test/binary_destroy_test.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include "test/unit_spirv.h" -#include "test_fixture.h" +#include "test/test_fixture.h" namespace spvtools { namespace { diff --git a/test/binary_endianness_test.cpp b/test/binary_endianness_test.cpp index 194d799ad5..3cd405d52d 100644 --- a/test/binary_endianness_test.cpp +++ b/test/binary_endianness_test.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/binary_header_get_test.cpp b/test/binary_header_get_test.cpp index 751433a144..e771f1a39c 100644 --- a/test/binary_header_get_test.cpp +++ b/test/binary_header_get_test.cpp @@ -13,7 +13,7 @@ // limitations under the License. #include "source/spirv_constant.h" -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/binary_parse_test.cpp b/test/binary_parse_test.cpp index fab893773e..9d7fd18cc7 100644 --- a/test/binary_parse_test.cpp +++ b/test/binary_parse_test.cpp @@ -12,16 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include #include #include #include #include "gmock/gmock.h" -#include "latest_version_opencl_std_header.h" +#include "source/latest_version_opencl_std_header.h" #include "source/message.h" #include "source/table.h" -#include "test_fixture.h" -#include "unit_spirv.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" // Returns true if two spv_parsed_operand_t values are equal. // To use this operator, this definition must appear in the same namespace diff --git a/test/binary_strnlen_s_test.cpp b/test/binary_strnlen_s_test.cpp index 0903465b1f..5f43bde678 100644 --- a/test/binary_strnlen_s_test.cpp +++ b/test/binary_strnlen_s_test.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/binary_to_text.literal_test.cpp b/test/binary_to_text.literal_test.cpp index 65b98d2657..bcfb0f016d 100644 --- a/test/binary_to_text.literal_test.cpp +++ b/test/binary_to_text.literal_test.cpp @@ -12,10 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include +#include +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/binary_to_text_test.cpp b/test/binary_to_text_test.cpp index 291b0e1867..016041f492 100644 --- a/test/binary_to_text_test.cpp +++ b/test/binary_to_text_test.cpp @@ -12,14 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" - #include +#include +#include +#include #include "gmock/gmock.h" - #include "source/spirv_constant.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/bit_stream.cpp b/test/bit_stream.cpp index eca5802ea6..16e4f20d2f 100644 --- a/test/bit_stream.cpp +++ b/test/bit_stream.cpp @@ -12,12 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include +#include #include #include "gmock/gmock.h" -#include "util/bit_stream.h" +#include "source/util/bit_stream.h" namespace spvtools { namespace utils { diff --git a/test/c_interface_test.cpp b/test/c_interface_test.cpp index 62dad24e55..6adc160232 100644 --- a/test/c_interface_test.cpp +++ b/test/c_interface_test.cpp @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - -#include "message.h" +#include "gtest/gtest.h" +#include "source/message.h" +#include "source/table.h" #include "spirv-tools/libspirv.h" -#include "table.h" namespace spvtools { namespace { diff --git a/test/comment_test.cpp b/test/comment_test.cpp index e95c48460a..f46b72ac58 100644 --- a/test/comment_test.cpp +++ b/test/comment_test.cpp @@ -12,9 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include "gmock/gmock.h" -#include "test_fixture.h" -#include "unit_spirv.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/comp/markv_codec_test.cpp b/test/comp/markv_codec_test.cpp index 2502e329f2..76918f7479 100644 --- a/test/comp/markv_codec_test.cpp +++ b/test/comp/markv_codec_test.cpp @@ -17,12 +17,13 @@ #include #include #include +#include #include "gmock/gmock.h" #include "source/comp/markv.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" #include "tools/comp/markv_model_factory.h" -#include "unit_spirv.h" namespace spvtools { namespace comp { diff --git a/test/cpp_interface_test.cpp b/test/cpp_interface_test.cpp index b8cbf2d191..bebf327522 100644 --- a/test/cpp_interface_test.cpp +++ b/test/cpp_interface_test.cpp @@ -12,9 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include +#include +#include +#include +#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "spirv-tools/optimizer.hpp" #include "spirv/1.1/spirv.h" diff --git a/test/diagnostic_test.cpp b/test/diagnostic_test.cpp index 60f5cbefe6..f86bae1130 100644 --- a/test/diagnostic_test.cpp +++ b/test/diagnostic_test.cpp @@ -14,9 +14,10 @@ #include #include +#include #include "gmock/gmock.h" -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/enum_set_test.cpp b/test/enum_set_test.cpp index f4b2467e9c..ddacd42147 100644 --- a/test/enum_set_test.cpp +++ b/test/enum_set_test.cpp @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include #include -#include "gmock/gmock.h" -#include "enum_set.h" -#include "unit_spirv.h" +#include "gmock/gmock.h" +#include "source/enum_set.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/enum_string_mapping_test.cpp b/test/enum_string_mapping_test.cpp index 94080bd7d0..b525d6014a 100644 --- a/test/enum_string_mapping_test.cpp +++ b/test/enum_string_mapping_test.cpp @@ -15,10 +15,12 @@ // Tests for OpExtension validator rules. #include +#include +#include -#include "enum_string_mapping.h" -#include "extensions.h" #include "gtest/gtest.h" +#include "source/enum_string_mapping.h" +#include "source/extensions.h" namespace spvtools { namespace { diff --git a/test/ext_inst.debuginfo_test.cpp b/test/ext_inst.debuginfo_test.cpp index 1810590967..15fa8f7656 100644 --- a/test/ext_inst.debuginfo_test.cpp +++ b/test/ext_inst.debuginfo_test.cpp @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include +#include -#include #include "DebugInfo.h" -#include "test_fixture.h" +#include "gmock/gmock.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" // This file tests the correctness of encoding and decoding of instructions // involving the DebugInfo extended instruction set. diff --git a/test/ext_inst.glsl_test.cpp b/test/ext_inst.glsl_test.cpp index e42bc84760..991c487f1a 100644 --- a/test/ext_inst.glsl_test.cpp +++ b/test/ext_inst.glsl_test.cpp @@ -13,10 +13,11 @@ // limitations under the License. #include +#include #include -#include "latest_version_glsl_std_450_header.h" -#include "unit_spirv.h" +#include "source/latest_version_glsl_std_450_header.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/ext_inst.opencl_test.cpp b/test/ext_inst.opencl_test.cpp index a6950bf697..06bc5e848a 100644 --- a/test/ext_inst.opencl_test.cpp +++ b/test/ext_inst.opencl_test.cpp @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include +#include -#include -#include "latest_version_opencl_std_header.h" -#include "test_fixture.h" +#include "gmock/gmock.h" +#include "source/latest_version_opencl_std_header.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/fix_word_test.cpp b/test/fix_word_test.cpp index d7ddffd7da..b8c3a33d53 100644 --- a/test/fix_word_test.cpp +++ b/test/fix_word_test.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/fuzzers/spvtools_opt_legalization_fuzzer.cpp b/test/fuzzers/spvtools_opt_legalization_fuzzer.cpp index f37dcc84ae..b45a98c370 100644 --- a/test/fuzzers/spvtools_opt_legalization_fuzzer.cpp +++ b/test/fuzzers/spvtools_opt_legalization_fuzzer.cpp @@ -13,6 +13,7 @@ // limitations under the License. #include +#include #include "spirv-tools/optimizer.hpp" diff --git a/test/fuzzers/spvtools_opt_performance_fuzzer.cpp b/test/fuzzers/spvtools_opt_performance_fuzzer.cpp index 7f94febcc6..6c3bd6aba8 100644 --- a/test/fuzzers/spvtools_opt_performance_fuzzer.cpp +++ b/test/fuzzers/spvtools_opt_performance_fuzzer.cpp @@ -13,6 +13,7 @@ // limitations under the License. #include +#include #include "spirv-tools/optimizer.hpp" diff --git a/test/fuzzers/spvtools_opt_size_fuzzer.cpp b/test/fuzzers/spvtools_opt_size_fuzzer.cpp index 1f06a71f2c..68c7974774 100644 --- a/test/fuzzers/spvtools_opt_size_fuzzer.cpp +++ b/test/fuzzers/spvtools_opt_size_fuzzer.cpp @@ -13,6 +13,7 @@ // limitations under the License. #include +#include #include "spirv-tools/optimizer.hpp" diff --git a/test/fuzzers/spvtools_val_fuzzer.cpp b/test/fuzzers/spvtools_val_fuzzer.cpp index 9b06a1f65f..5dc4303b45 100644 --- a/test/fuzzers/spvtools_val_fuzzer.cpp +++ b/test/fuzzers/spvtools_val_fuzzer.cpp @@ -13,6 +13,7 @@ // limitations under the License. #include +#include #include "spirv-tools/libspirv.hpp" diff --git a/test/generator_magic_number_test.cpp b/test/generator_magic_number_test.cpp index 9e49dae7b6..bc5fdf57a5 100644 --- a/test/generator_magic_number_test.cpp +++ b/test/generator_magic_number_test.cpp @@ -12,11 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" - -#include +#include +#include +#include +#include +#include "gmock/gmock.h" #include "source/opcode.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/hex_float_test.cpp b/test/hex_float_test.cpp index dc21d16d91..6b805f34ca 100644 --- a/test/hex_float_test.cpp +++ b/test/hex_float_test.cpp @@ -15,14 +15,16 @@ #include #include #include +#include #include #include #include +#include +#include -#include - +#include "gmock/gmock.h" #include "source/util/hex_float.h" -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace utils { diff --git a/test/huffman_codec.cpp b/test/huffman_codec.cpp index defb773368..653caad8db 100644 --- a/test/huffman_codec.cpp +++ b/test/huffman_codec.cpp @@ -14,14 +14,17 @@ // Contains utils for reading, writing and debug printing bit streams. +#include #include #include #include #include +#include +#include #include "gmock/gmock.h" -#include "util/bit_stream.h" -#include "util/huffman_codec.h" +#include "source/util/bit_stream.h" +#include "source/util/huffman_codec.h" namespace spvtools { namespace utils { diff --git a/test/immediate_int_test.cpp b/test/immediate_int_test.cpp index b26a7af76f..393075a4e7 100644 --- a/test/immediate_int_test.cpp +++ b/test/immediate_int_test.cpp @@ -16,10 +16,9 @@ #include #include -#include - +#include "gmock/gmock.h" #include "source/util/bitutils.h" -#include "test_fixture.h" +#include "test/test_fixture.h" namespace spvtools { namespace utils { diff --git a/test/libspirv_macros_test.cpp b/test/libspirv_macros_test.cpp index edb46c3614..bf5add671a 100644 --- a/test/libspirv_macros_test.cpp +++ b/test/libspirv_macros_test.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/link/binary_version_test.cpp b/test/link/binary_version_test.cpp index 89f39476f9..0ceeebae25 100644 --- a/test/link/binary_version_test.cpp +++ b/test/link/binary_version_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include "gmock/gmock.h" -#include "linker_fixture.h" +#include "test/link/linker_fixture.h" namespace spvtools { namespace { diff --git a/test/link/entry_points_test.cpp b/test/link/entry_points_test.cpp index 632cde3eff..bac8e02ef6 100644 --- a/test/link/entry_points_test.cpp +++ b/test/link/entry_points_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include "gmock/gmock.h" -#include "linker_fixture.h" +#include "test/link/linker_fixture.h" namespace spvtools { namespace { diff --git a/test/link/global_values_amount_test.cpp b/test/link/global_values_amount_test.cpp index d0d953d37f..9901d21d57 100644 --- a/test/link/global_values_amount_test.cpp +++ b/test/link/global_values_amount_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include "gmock/gmock.h" -#include "linker_fixture.h" +#include "test/link/linker_fixture.h" namespace spvtools { namespace { diff --git a/test/link/ids_limit_test.cpp b/test/link/ids_limit_test.cpp index a89ffe414b..6d7815a24d 100644 --- a/test/link/ids_limit_test.cpp +++ b/test/link/ids_limit_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include "gmock/gmock.h" -#include "linker_fixture.h" +#include "test/link/linker_fixture.h" namespace spvtools { namespace { diff --git a/test/link/linker_fixture.h b/test/link/linker_fixture.h index 92dcad9818..a943684030 100644 --- a/test/link/linker_fixture.h +++ b/test/link/linker_fixture.h @@ -16,11 +16,12 @@ #define TEST_LINK_LINKER_FIXTURE_H_ #include +#include +#include #include "source/spirv_constant.h" -#include "unit_spirv.h" - #include "spirv-tools/linker.hpp" +#include "test/unit_spirv.h" namespace spvtest { diff --git a/test/link/matching_imports_to_exports_test.cpp b/test/link/matching_imports_to_exports_test.cpp index b1ee7ed451..59e62d51b8 100644 --- a/test/link/matching_imports_to_exports_test.cpp +++ b/test/link/matching_imports_to_exports_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include "gmock/gmock.h" -#include "linker_fixture.h" +#include "test/link/linker_fixture.h" namespace spvtools { namespace { diff --git a/test/link/memory_model_test.cpp b/test/link/memory_model_test.cpp index 4e2cfaf2af..2add5046c7 100644 --- a/test/link/memory_model_test.cpp +++ b/test/link/memory_model_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include "gmock/gmock.h" -#include "linker_fixture.h" +#include "test/link/linker_fixture.h" namespace spvtools { namespace { diff --git a/test/link/partial_linkage_test.cpp b/test/link/partial_linkage_test.cpp index c2cb5fd539..c43b06e55a 100644 --- a/test/link/partial_linkage_test.cpp +++ b/test/link/partial_linkage_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include "gmock/gmock.h" -#include "linker_fixture.h" +#include "test/link/linker_fixture.h" namespace spvtools { namespace { diff --git a/test/link/unique_ids_test.cpp b/test/link/unique_ids_test.cpp index f95f801fad..55c70ea670 100644 --- a/test/link/unique_ids_test.cpp +++ b/test/link/unique_ids_test.cpp @@ -12,8 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include "gmock/gmock.h" -#include "linker_fixture.h" +#include "test/link/linker_fixture.h" namespace spvtools { namespace { diff --git a/test/log_test.cpp b/test/log_test.cpp index eeaf7de0ed..638eea950f 100644 --- a/test/log_test.cpp +++ b/test/log_test.cpp @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include - -#include "message.h" -#include "opt/log.h" +#include "source/opt/log.h" +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "source/message.h" namespace spvtools { namespace { diff --git a/test/move_to_front_test.cpp b/test/move_to_front_test.cpp index dfe9b0e15d..5f41b5afab 100644 --- a/test/move_to_front_test.cpp +++ b/test/move_to_front_test.cpp @@ -15,9 +15,11 @@ #include #include #include +#include +#include #include "gmock/gmock.h" -#include "util/move_to_front.h" +#include "source/util/move_to_front.h" namespace spvtools { namespace utils { diff --git a/test/name_mapper_test.cpp b/test/name_mapper_test.cpp index 41970d5a97..9a9ee8aa01 100644 --- a/test/name_mapper_test.cpp +++ b/test/name_mapper_test.cpp @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "gmock/gmock.h" - -#include "test_fixture.h" -#include "unit_spirv.h" +#include +#include +#include "gmock/gmock.h" #include "source/name_mapper.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/named_id_test.cpp b/test/named_id_test.cpp index f70c98f885..4ba54adc3a 100644 --- a/test/named_id_test.cpp +++ b/test/named_id_test.cpp @@ -12,10 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include -#include "test_fixture.h" -#include "unit_spirv.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/opcode_make_test.cpp b/test/opcode_make_test.cpp index 16eda24d89..6481ef326d 100644 --- a/test/opcode_make_test.cpp +++ b/test/opcode_make_test.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/opcode_require_capabilities_test.cpp b/test/opcode_require_capabilities_test.cpp index 6a537823b0..32bf1dc085 100644 --- a/test/opcode_require_capabilities_test.cpp +++ b/test/opcode_require_capabilities_test.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include "test/unit_spirv.h" -#include "enum_set.h" +#include "source/enum_set.h" namespace spvtools { namespace { diff --git a/test/opcode_split_test.cpp b/test/opcode_split_test.cpp index 1ab98eb809..43fedb3855 100644 --- a/test/opcode_split_test.cpp +++ b/test/opcode_split_test.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/opcode_table_get_test.cpp b/test/opcode_table_get_test.cpp index e63d4011df..6f80ad7d8c 100644 --- a/test/opcode_table_get_test.cpp +++ b/test/opcode_table_get_test.cpp @@ -12,9 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - -#include "unit_spirv.h" +#include "gmock/gmock.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/operand_capabilities_test.cpp b/test/operand_capabilities_test.cpp index baf4f9522e..0aeb505f0c 100644 --- a/test/operand_capabilities_test.cpp +++ b/test/operand_capabilities_test.cpp @@ -15,11 +15,11 @@ // Test capability dependencies for enums. #include +#include #include "gmock/gmock.h" - -#include "enum_set.h" -#include "unit_spirv.h" +#include "source/enum_set.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/operand_pattern_test.cpp b/test/operand_pattern_test.cpp index e3c20e4596..b3e3024908 100644 --- a/test/operand_pattern_test.cpp +++ b/test/operand_pattern_test.cpp @@ -12,10 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include #include "gmock/gmock.h" #include "source/operand.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/operand_test.cpp b/test/operand_test.cpp index be927d6633..08522c323e 100644 --- a/test/operand_test.cpp +++ b/test/operand_test.cpp @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include + +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/opt/aggressive_dead_code_elim_test.cpp b/test/opt/aggressive_dead_code_elim_test.cpp index 3164412b75..873fc34e97 100644 --- a/test/opt/aggressive_dead_code_elim_test.cpp +++ b/test/opt/aggressive_dead_code_elim_test.cpp @@ -13,9 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "assembly_builder.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include +#include + +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/assembly_builder_test.cpp b/test/opt/assembly_builder_test.cpp index 33c3583ec6..55fbbe9046 100644 --- a/test/opt/assembly_builder_test.cpp +++ b/test/opt/assembly_builder_test.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "assembly_builder.h" +#include "test/opt/assembly_builder.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/block_merge_test.cpp b/test/opt/block_merge_test.cpp index 3c180b72ca..aaa70cd4a7 100644 --- a/test/opt/block_merge_test.cpp +++ b/test/opt/block_merge_test.cpp @@ -13,8 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/ccp_test.cpp b/test/opt/ccp_test.cpp index 7987d8c186..5ccea71fba 100644 --- a/test/opt/ccp_test.cpp +++ b/test/opt/ccp_test.cpp @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "pass_fixture.h" -#include "pass_utils.h" - -#include "opt/ccp_pass.h" +#include "source/opt/ccp_pass.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/cfg_cleanup_test.cpp b/test/opt/cfg_cleanup_test.cpp index 67a2797826..369c766706 100644 --- a/test/opt/cfg_cleanup_test.cpp +++ b/test/opt/cfg_cleanup_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/combine_access_chains_test.cpp b/test/opt/combine_access_chains_test.cpp index a9ed91046c..ab9e185b68 100644 --- a/test/opt/combine_access_chains_test.cpp +++ b/test/opt/combine_access_chains_test.cpp @@ -12,10 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "assembly_builder.h" +#include + #include "gmock/gmock.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/common_uniform_elim_test.cpp b/test/opt/common_uniform_elim_test.cpp index dcba88a91d..f5199ed875 100644 --- a/test/opt/common_uniform_elim_test.cpp +++ b/test/opt/common_uniform_elim_test.cpp @@ -13,7 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" +#include + +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/compact_ids_test.cpp b/test/opt/compact_ids_test.cpp index e993711002..feef068b05 100644 --- a/test/opt/compact_ids_test.cpp +++ b/test/opt/compact_ids_test.cpp @@ -12,13 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include +#include +#include +#include "gmock/gmock.h" #include "spirv-tools/libspirv.hpp" #include "spirv-tools/optimizer.hpp" - -#include "pass_fixture.h" -#include "pass_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/constant_manager_test.cpp b/test/opt/constant_manager_test.cpp index 7ca92ad7a0..57dea65120 100644 --- a/test/opt/constant_manager_test.cpp +++ b/test/opt/constant_manager_test.cpp @@ -12,12 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include +#include +#include -#include "opt/build_module.h" -#include "opt/constants.h" -#include "opt/ir_context.h" +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "source/opt/build_module.h" +#include "source/opt/constants.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/test/opt/copy_prop_array_test.cpp b/test/opt/copy_prop_array_test.cpp index bd51c0b482..dcce77d224 100644 --- a/test/opt/copy_prop_array_test.cpp +++ b/test/opt/copy_prop_array_test.cpp @@ -13,11 +13,11 @@ // limitations under the License. #include +#include -#include - -#include "assembly_builder.h" -#include "pass_fixture.h" +#include "gmock/gmock.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/dead_branch_elim_test.cpp b/test/opt/dead_branch_elim_test.cpp index 379f02e318..939b12deb9 100644 --- a/test/opt/dead_branch_elim_test.cpp +++ b/test/opt/dead_branch_elim_test.cpp @@ -13,8 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dead_insert_elim_test.cpp b/test/opt/dead_insert_elim_test.cpp index e4128245e9..8ae6894d8c 100644 --- a/test/opt/dead_insert_elim_test.cpp +++ b/test/opt/dead_insert_elim_test.cpp @@ -13,8 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dead_variable_elim_test.cpp b/test/opt/dead_variable_elim_test.cpp index 672b2055a6..fca13a8e2f 100644 --- a/test/opt/dead_variable_elim_test.cpp +++ b/test/opt/dead_variable_elim_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/decoration_manager_test.cpp b/test/opt/decoration_manager_test.cpp index 85349671dc..ea6aec5247 100644 --- a/test/opt/decoration_manager_test.cpp +++ b/test/opt/decoration_manager_test.cpp @@ -13,14 +13,16 @@ // limitations under the License. #include +#include +#include +#include -#include - +#include "gmock/gmock.h" #include "source/opt/build_module.h" #include "source/opt/decoration_manager.h" #include "source/opt/ir_context.h" #include "source/spirv_constant.h" -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace opt { diff --git a/test/opt/def_use_test.cpp b/test/opt/def_use_test.cpp index 10a6382e24..3b856ce7fb 100644 --- a/test/opt/def_use_test.cpp +++ b/test/opt/def_use_test.cpp @@ -13,18 +13,21 @@ // limitations under the License. #include +#include +#include #include - -#include -#include - -#include "opt/build_module.h" -#include "opt/def_use_manager.h" -#include "opt/ir_context.h" -#include "opt/module.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include +#include + +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "source/opt/build_module.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" #include "spirv-tools/libspirv.hpp" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dominator_tree/common_dominators.cpp b/test/opt/dominator_tree/common_dominators.cpp index 597c393145..dfa03e986a 100644 --- a/test/opt/dominator_tree/common_dominators.cpp +++ b/test/opt/dominator_tree/common_dominators.cpp @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include +#include +#include -#include "opt/build_module.h" -#include "opt/ir_context.h" +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "source/opt/build_module.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/test/opt/dominator_tree/generated.cpp b/test/opt/dominator_tree/generated.cpp index f2340516dc..43b723e93c 100644 --- a/test/opt/dominator_tree/generated.cpp +++ b/test/opt/dominator_tree/generated.cpp @@ -12,21 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include #include #include -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/dominator_analysis.h" -#include "opt/iterator.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/iterator.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dominator_tree/nested_ifs.cpp b/test/opt/dominator_tree/nested_ifs.cpp index 1c51084857..0552b75801 100644 --- a/test/opt/dominator_tree/nested_ifs.cpp +++ b/test/opt/dominator_tree/nested_ifs.cpp @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include #include -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/dominator_analysis.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dominator_tree/nested_ifs_post.cpp b/test/opt/dominator_tree/nested_ifs_post.cpp index c1e4e3db3d..ad759df868 100644 --- a/test/opt/dominator_tree/nested_ifs_post.cpp +++ b/test/opt/dominator_tree/nested_ifs_post.cpp @@ -12,18 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/dominator_analysis.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dominator_tree/nested_loops.cpp b/test/opt/dominator_tree/nested_loops.cpp index fdaacb02ef..7d03937b1a 100644 --- a/test/opt/dominator_tree/nested_loops.cpp +++ b/test/opt/dominator_tree/nested_loops.cpp @@ -12,18 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/dominator_analysis.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dominator_tree/nested_loops_with_unreachables.cpp b/test/opt/dominator_tree/nested_loops_with_unreachables.cpp index de09be0208..e87e8ddab3 100644 --- a/test/opt/dominator_tree/nested_loops_with_unreachables.cpp +++ b/test/opt/dominator_tree/nested_loops_with_unreachables.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/dominator_analysis.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dominator_tree/post.cpp b/test/opt/dominator_tree/post.cpp index 47d1b5b0c4..bb10fdef1d 100644 --- a/test/opt/dominator_tree/post.cpp +++ b/test/opt/dominator_tree/post.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/dominator_analysis.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dominator_tree/simple.cpp b/test/opt/dominator_tree/simple.cpp index 36b2932ff5..d11854d550 100644 --- a/test/opt/dominator_tree/simple.cpp +++ b/test/opt/dominator_tree/simple.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/dominator_analysis.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dominator_tree/switch_case_fallthrough.cpp b/test/opt/dominator_tree/switch_case_fallthrough.cpp index 0ba768a44d..d9dd7d1619 100644 --- a/test/opt/dominator_tree/switch_case_fallthrough.cpp +++ b/test/opt/dominator_tree/switch_case_fallthrough.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/dominator_analysis.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dominator_tree/unreachable_for.cpp b/test/opt/dominator_tree/unreachable_for.cpp index d346d16de1..469e5c142d 100644 --- a/test/opt/dominator_tree/unreachable_for.cpp +++ b/test/opt/dominator_tree/unreachable_for.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/dominator_analysis.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/dominator_tree/unreachable_for_post.cpp b/test/opt/dominator_tree/unreachable_for_post.cpp index ec6ebd246e..8d3e37b4a4 100644 --- a/test/opt/dominator_tree/unreachable_for_post.cpp +++ b/test/opt/dominator_tree/unreachable_for_post.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/dominator_analysis.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/dominator_analysis.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/eliminate_dead_const_test.cpp b/test/opt/eliminate_dead_const_test.cpp index 2d1b3695d1..7fac866cec 100644 --- a/test/opt/eliminate_dead_const_test.cpp +++ b/test/opt/eliminate_dead_const_test.cpp @@ -12,15 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "assembly_builder.h" -#include "pass_fixture.h" -#include "pass_utils.h" - #include #include #include #include +#include #include +#include + +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/eliminate_dead_functions_test.cpp b/test/opt/eliminate_dead_functions_test.cpp index b49b41b08e..0a3d490a8f 100644 --- a/test/opt/eliminate_dead_functions_test.cpp +++ b/test/opt/eliminate_dead_functions_test.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include -#include - -#include "assembly_builder.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include "gmock/gmock.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/feature_manager_test.cpp b/test/opt/feature_manager_test.cpp index 983e2afb22..767376cf5e 100644 --- a/test/opt/feature_manager_test.cpp +++ b/test/opt/feature_manager_test.cpp @@ -12,12 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include #include +#include +#include -#include "opt/build_module.h" -#include "opt/ir_context.h" +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "source/opt/build_module.h" +#include "source/opt/ir_context.h" namespace spvtools { namespace opt { diff --git a/test/opt/flatten_decoration_test.cpp b/test/opt/flatten_decoration_test.cpp index 3f0075b243..483ee6e53c 100644 --- a/test/opt/flatten_decoration_test.cpp +++ b/test/opt/flatten_decoration_test.cpp @@ -13,10 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include +#include -#include "pass_fixture.h" -#include "pass_utils.h" +#include "gmock/gmock.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/fold_spec_const_op_composite_test.cpp b/test/opt/fold_spec_const_op_composite_test.cpp index 15e29be366..8ecfd5c788 100644 --- a/test/opt/fold_spec_const_op_composite_test.cpp +++ b/test/opt/fold_spec_const_op_composite_test.cpp @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "assembly_builder.h" - #include +#include +#include -#include "pass_fixture.h" -#include "pass_utils.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/fold_test.cpp b/test/opt/fold_test.cpp index adbd577ea0..b1e5758866 100644 --- a/test/opt/fold_test.cpp +++ b/test/opt/fold_test.cpp @@ -11,24 +11,26 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include +#include #include +#include -#include -#include -#include +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "source/opt/build_module.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/fold.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "spirv-tools/libspirv.hpp" +#include "test/opt/pass_utils.h" #ifdef SPIRV_EFFCEE #include "effcee/effcee.h" #endif -#include "opt/build_module.h" -#include "opt/def_use_manager.h" -#include "opt/ir_context.h" -#include "opt/module.h" -#include "pass_utils.h" -#include "spirv-tools/libspirv.hpp" - namespace spvtools { namespace opt { namespace { diff --git a/test/opt/freeze_spec_const_test.cpp b/test/opt/freeze_spec_const_test.cpp index 306f8c570f..5cc7843b11 100644 --- a/test/opt/freeze_spec_const_test.cpp +++ b/test/opt/freeze_spec_const_test.cpp @@ -12,13 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" - #include +#include #include +#include #include +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" + namespace spvtools { namespace opt { namespace { diff --git a/test/opt/function_utils.h b/test/opt/function_utils.h index 8a1c85797b..803cacdd53 100644 --- a/test/opt/function_utils.h +++ b/test/opt/function_utils.h @@ -15,8 +15,8 @@ #ifndef TEST_OPT_FUNCTION_UTILS_H_ #define TEST_OPT_FUNCTION_UTILS_H_ -#include "opt/function.h" -#include "opt/module.h" +#include "source/opt/function.h" +#include "source/opt/module.h" namespace spvtest { diff --git a/test/opt/if_conversion_test.cpp b/test/opt/if_conversion_test.cpp index 6ad052fa8e..a62a15e88f 100644 --- a/test/opt/if_conversion_test.cpp +++ b/test/opt/if_conversion_test.cpp @@ -12,10 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "assembly_builder.h" +#include + #include "gmock/gmock.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/inline_opaque_test.cpp b/test/opt/inline_opaque_test.cpp index d756a62ecf..d10913aec0 100644 --- a/test/opt/inline_opaque_test.cpp +++ b/test/opt/inline_opaque_test.cpp @@ -13,8 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/inline_test.cpp b/test/opt/inline_test.cpp index aaba88c0aa..4eab77da4f 100644 --- a/test/opt/inline_test.cpp +++ b/test/opt/inline_test.cpp @@ -13,8 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include +#include +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/insert_extract_elim_test.cpp b/test/opt/insert_extract_elim_test.cpp index 3eae006408..c5169750bd 100644 --- a/test/opt/insert_extract_elim_test.cpp +++ b/test/opt/insert_extract_elim_test.cpp @@ -13,9 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "source/opt/simplification_pass.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/instruction_list_test.cpp b/test/opt/instruction_list_test.cpp index 0f8496f4fc..e745790a3b 100644 --- a/test/opt/instruction_list_test.cpp +++ b/test/opt/instruction_list_test.cpp @@ -14,13 +14,13 @@ #include #include +#include #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include "opt/instruction.h" -#include "opt/instruction_list.h" +#include "source/opt/instruction.h" +#include "source/opt/instruction_list.h" namespace spvtools { namespace opt { diff --git a/test/opt/instruction_test.cpp b/test/opt/instruction_test.cpp index 407b666d37..2ace6b8acb 100644 --- a/test/opt/instruction_test.cpp +++ b/test/opt/instruction_test.cpp @@ -12,15 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/instruction.h" -#include "opt/ir_context.h" +#include +#include +#include #include "gmock/gmock.h" - -#include "pass_fixture.h" -#include "pass_utils.h" +#include "source/opt/instruction.h" +#include "source/opt/ir_context.h" #include "spirv-tools/libspirv.h" -#include "unit_spirv.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" +#include "test/unit_spirv.h" namespace spvtools { namespace opt { diff --git a/test/opt/ir_builder.cpp b/test/opt/ir_builder.cpp index 5484116eb6..7eeb86dd33 100644 --- a/test/opt/ir_builder.cpp +++ b/test/opt/ir_builder.cpp @@ -12,23 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include #include +#include +#include #include +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "source/opt/basic_block.h" +#include "source/opt/build_module.h" +#include "source/opt/instruction.h" +#include "source/opt/ir_builder.h" +#include "source/opt/type_manager.h" +#include "spirv-tools/libspirv.hpp" + #ifdef SPIRV_EFFCEE #include "effcee/effcee.h" #endif -#include "opt/basic_block.h" -#include "opt/ir_builder.h" - -#include "opt/build_module.h" -#include "opt/instruction.h" -#include "opt/type_manager.h" -#include "spirv-tools/libspirv.hpp" - namespace spvtools { namespace opt { namespace { diff --git a/test/opt/ir_context_test.cpp b/test/opt/ir_context_test.cpp index 5fe68c8009..c64e5b04ff 100644 --- a/test/opt/ir_context_test.cpp +++ b/test/opt/ir_context_test.cpp @@ -12,14 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include #include - -#include "opt/ir_context.h" -#include "opt/pass.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include +#include +#include + +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "source/opt/ir_context.h" +#include "source/opt/pass.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/ir_loader_test.cpp b/test/opt/ir_loader_test.cpp index 8e8dd2e830..cb1ddb3c32 100644 --- a/test/opt/ir_loader_test.cpp +++ b/test/opt/ir_loader_test.cpp @@ -12,13 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include +#include +#include #include +#include +#include -#include "message.h" -#include "opt/build_module.h" -#include "opt/ir_context.h" +#include "gtest/gtest.h" +#include "source/message.h" +#include "source/opt/build_module.h" +#include "source/opt/ir_context.h" #include "spirv-tools/libspirv.hpp" namespace spvtools { diff --git a/test/opt/iterator_test.cpp b/test/opt/iterator_test.cpp index 81e8d23788..cb262e40ba 100644 --- a/test/opt/iterator_test.cpp +++ b/test/opt/iterator_test.cpp @@ -17,8 +17,8 @@ #include "gmock/gmock.h" -#include "opt/iterator.h" -#include "opt/make_unique.h" +#include "source/opt/iterator.h" +#include "source/opt/make_unique.h" namespace spvtools { namespace opt { diff --git a/test/opt/line_debug_info_test.cpp b/test/opt/line_debug_info_test.cpp index 729b144363..6a20a0136d 100644 --- a/test/opt/line_debug_info_test.cpp +++ b/test/opt/line_debug_info_test.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/local_access_chain_convert_test.cpp b/test/opt/local_access_chain_convert_test.cpp index b535717af9..94456da852 100644 --- a/test/opt/local_access_chain_convert_test.cpp +++ b/test/opt/local_access_chain_convert_test.cpp @@ -13,8 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/local_redundancy_elimination_test.cpp b/test/opt/local_redundancy_elimination_test.cpp index 3d26b7e235..bdaafb85f0 100644 --- a/test/opt/local_redundancy_elimination_test.cpp +++ b/test/opt/local_redundancy_elimination_test.cpp @@ -12,13 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/value_number_table.h" +#include -#include "assembly_builder.h" #include "gmock/gmock.h" -#include "opt/build_module.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include "source/opt/build_module.h" +#include "source/opt/value_number_table.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/local_single_block_elim.cpp b/test/opt/local_single_block_elim.cpp index 21e2d29f04..29d978a21b 100644 --- a/test/opt/local_single_block_elim.cpp +++ b/test/opt/local_single_block_elim.cpp @@ -13,8 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/local_single_store_elim_test.cpp b/test/opt/local_single_store_elim_test.cpp index e42c6fafae..51bd5d29fd 100644 --- a/test/opt/local_single_store_elim_test.cpp +++ b/test/opt/local_single_store_elim_test.cpp @@ -13,8 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/local_ssa_elim_test.cpp b/test/opt/local_ssa_elim_test.cpp index 2f5d7b52d0..01a354adb7 100644 --- a/test/opt/local_ssa_elim_test.cpp +++ b/test/opt/local_ssa_elim_test.cpp @@ -13,8 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/dependence_analysis.cpp b/test/opt/loop_optimizations/dependence_analysis.cpp index 7c9e88d2ac..8aeb20afc8 100644 --- a/test/opt/loop_optimizations/dependence_analysis.cpp +++ b/test/opt/loop_optimizations/dependence_analysis.cpp @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include @@ -21,16 +19,16 @@ #include #include -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" - -#include "opt/iterator.h" -#include "opt/loop_dependence.h" -#include "opt/loop_descriptor.h" -#include "opt/pass.h" -#include "opt/tree_iterator.h" +#include "gmock/gmock.h" +#include "source/opt/iterator.h" +#include "source/opt/loop_dependence.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/pass.h" +#include "source/opt/tree_iterator.h" +#include "test/opt//assembly_builder.h" +#include "test/opt//function_utils.h" +#include "test/opt//pass_fixture.h" +#include "test/opt//pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/dependence_analysis_helpers.cpp b/test/opt/loop_optimizations/dependence_analysis_helpers.cpp index 10a41320c4..715cf541dd 100644 --- a/test/opt/loop_optimizations/dependence_analysis_helpers.cpp +++ b/test/opt/loop_optimizations/dependence_analysis_helpers.cpp @@ -12,24 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include #include -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" - -#include "opt/iterator.h" -#include "opt/loop_dependence.h" -#include "opt/loop_descriptor.h" -#include "opt/pass.h" -#include "opt/scalar_analysis.h" -#include "opt/tree_iterator.h" +#include "gmock/gmock.h" +#include "source/opt/iterator.h" +#include "source/opt/loop_dependence.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/pass.h" +#include "source/opt/scalar_analysis.h" +#include "source/opt/tree_iterator.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/fusion_compatibility.cpp b/test/opt/loop_optimizations/fusion_compatibility.cpp index eb284dba93..cda8576c5d 100644 --- a/test/opt/loop_optimizations/fusion_compatibility.cpp +++ b/test/opt/loop_optimizations/fusion_compatibility.cpp @@ -12,17 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include #include #include -#include "../pass_fixture.h" -#include "opt/loop_descriptor.h" -#include "opt/loop_fusion.h" +#include "gmock/gmock.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/loop_fusion.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/fusion_illegal.cpp b/test/opt/loop_optimizations/fusion_illegal.cpp index 79121a6bd3..26d54457d2 100644 --- a/test/opt/loop_optimizations/fusion_illegal.cpp +++ b/test/opt/loop_optimizations/fusion_illegal.cpp @@ -12,17 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include #include #include -#include "../pass_fixture.h" -#include "opt/loop_descriptor.h" -#include "opt/loop_fusion.h" +#include "gmock/gmock.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/loop_fusion.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/fusion_legal.cpp b/test/opt/loop_optimizations/fusion_legal.cpp index 9cc651d9b4..509516f80d 100644 --- a/test/opt/loop_optimizations/fusion_legal.cpp +++ b/test/opt/loop_optimizations/fusion_legal.cpp @@ -12,22 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include #include #include +#include "gmock/gmock.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/loop_fusion.h" +#include "test/opt/pass_fixture.h" + #ifdef SPIRV_EFFCEE #include "effcee/effcee.h" #endif -#include "../pass_fixture.h" -#include "opt/loop_descriptor.h" -#include "opt/loop_fusion.h" - namespace spvtools { namespace opt { namespace { diff --git a/test/opt/loop_optimizations/fusion_pass.cpp b/test/opt/loop_optimizations/fusion_pass.cpp index 0cd719023e..857ada9393 100644 --- a/test/opt/loop_optimizations/fusion_pass.cpp +++ b/test/opt/loop_optimizations/fusion_pass.cpp @@ -12,14 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include + +#include "gmock/gmock.h" +#include "test/opt/pass_fixture.h" #ifdef SPIRV_EFFCEE #include "effcee/effcee.h" #endif -#include "../pass_fixture.h" - namespace spvtools { namespace opt { namespace { diff --git a/test/opt/loop_optimizations/hoist_all_loop_types.cpp b/test/opt/loop_optimizations/hoist_all_loop_types.cpp index 1bf7c5cb76..27e0a0d917 100644 --- a/test/opt/loop_optimizations/hoist_all_loop_types.cpp +++ b/test/opt/loop_optimizations/hoist_all_loop_types.cpp @@ -14,10 +14,9 @@ #include -#include - -#include "../pass_fixture.h" -#include "opt/licm_pass.h" +#include "gmock/gmock.h" +#include "source/opt/licm_pass.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/hoist_double_nested_loops.cpp b/test/opt/loop_optimizations/hoist_double_nested_loops.cpp index c65a216d6f..ea1949658d 100644 --- a/test/opt/loop_optimizations/hoist_double_nested_loops.cpp +++ b/test/opt/loop_optimizations/hoist_double_nested_loops.cpp @@ -14,10 +14,9 @@ #include -#include - -#include "../pass_fixture.h" -#include "opt/licm_pass.h" +#include "gmock/gmock.h" +#include "source/opt/licm_pass.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/hoist_from_independent_loops.cpp b/test/opt/loop_optimizations/hoist_from_independent_loops.cpp index 8e7a80b329..abc79e37c5 100644 --- a/test/opt/loop_optimizations/hoist_from_independent_loops.cpp +++ b/test/opt/loop_optimizations/hoist_from_independent_loops.cpp @@ -14,10 +14,9 @@ #include -#include - -#include "../pass_fixture.h" -#include "opt/licm_pass.h" +#include "gmock/gmock.h" +#include "source/opt/licm_pass.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/hoist_simple_case.cpp b/test/opt/loop_optimizations/hoist_simple_case.cpp index db9813237f..e973d9d298 100644 --- a/test/opt/loop_optimizations/hoist_simple_case.cpp +++ b/test/opt/loop_optimizations/hoist_simple_case.cpp @@ -14,10 +14,9 @@ #include -#include - -#include "../pass_fixture.h" -#include "opt/licm_pass.h" +#include "gmock/gmock.h" +#include "source/opt/licm_pass.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/hoist_single_nested_loops.cpp b/test/opt/loop_optimizations/hoist_single_nested_loops.cpp index 07baab2621..7fa1fb0a0d 100644 --- a/test/opt/loop_optimizations/hoist_single_nested_loops.cpp +++ b/test/opt/loop_optimizations/hoist_single_nested_loops.cpp @@ -14,10 +14,9 @@ #include -#include - -#include "../pass_fixture.h" -#include "opt/licm_pass.h" +#include "gmock/gmock.h" +#include "source/opt/licm_pass.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/hoist_without_preheader.cpp b/test/opt/loop_optimizations/hoist_without_preheader.cpp index e69afd2c22..9e8d02fac5 100644 --- a/test/opt/loop_optimizations/hoist_without_preheader.cpp +++ b/test/opt/loop_optimizations/hoist_without_preheader.cpp @@ -14,10 +14,9 @@ #include -#include - -#include "../pass_fixture.h" -#include "opt/licm_pass.h" +#include "gmock/gmock.h" +#include "source/opt/licm_pass.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/lcssa.cpp b/test/opt/loop_optimizations/lcssa.cpp index 0f0bd0bbb5..220772652b 100644 --- a/test/opt/loop_optimizations/lcssa.cpp +++ b/test/opt/loop_optimizations/lcssa.cpp @@ -12,24 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include +#include "gmock/gmock.h" +#include "source/opt/build_module.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/loop_utils.h" +#include "source/opt/pass.h" +#include "test/opt//assembly_builder.h" +#include "test/opt/function_utils.h" + #ifdef SPIRV_EFFCEE #include "effcee/effcee.h" #endif -#include "../assembly_builder.h" -#include "../function_utils.h" - -#include "opt/build_module.h" -#include "opt/loop_descriptor.h" -#include "opt/loop_utils.h" -#include "opt/pass.h" - namespace spvtools { namespace opt { namespace { diff --git a/test/opt/loop_optimizations/loop_descriptions.cpp b/test/opt/loop_optimizations/loop_descriptions.cpp index c55f12638c..91dbdc6b54 100644 --- a/test/opt/loop_optimizations/loop_descriptions.cpp +++ b/test/opt/loop_optimizations/loop_descriptions.cpp @@ -12,18 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/loop_descriptor.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/loop_fission.cpp b/test/opt/loop_optimizations/loop_fission.cpp index 6fc95a5679..e513f4253a 100644 --- a/test/opt/loop_optimizations/loop_fission.cpp +++ b/test/opt/loop_optimizations/loop_fission.cpp @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/loop_fission.h" -#include "opt/loop_unroller.h" -#include "opt/loop_utils.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/loop_fission.h" +#include "source/opt/loop_unroller.h" +#include "source/opt/loop_utils.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/nested_loops.cpp b/test/opt/loop_optimizations/nested_loops.cpp index 062044af32..651cdef44b 100644 --- a/test/opt/loop_optimizations/nested_loops.cpp +++ b/test/opt/loop_optimizations/nested_loops.cpp @@ -12,22 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include #include -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" - -#include "opt/iterator.h" -#include "opt/loop_descriptor.h" -#include "opt/pass.h" -#include "opt/tree_iterator.h" +#include "gmock/gmock.h" +#include "source/opt/iterator.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/pass.h" +#include "source/opt/tree_iterator.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/peeling.cpp b/test/opt/loop_optimizations/peeling.cpp index cd1e49ce41..e5db20b408 100644 --- a/test/opt/loop_optimizations/peeling.cpp +++ b/test/opt/loop_optimizations/peeling.cpp @@ -12,17 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include +#include +#include + +#include "gmock/gmock.h" +#include "source/opt/ir_builder.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/loop_peeling.h" +#include "test/opt/pass_fixture.h" #ifdef SPIRV_EFFCEE #include "effcee/effcee.h" #endif -#include "../pass_fixture.h" -#include "opt/ir_builder.h" -#include "opt/loop_descriptor.h" -#include "opt/loop_peeling.h" - namespace spvtools { namespace opt { namespace { diff --git a/test/opt/loop_optimizations/peeling_pass.cpp b/test/opt/loop_optimizations/peeling_pass.cpp index 47e7914cef..284ad838d4 100644 --- a/test/opt/loop_optimizations/peeling_pass.cpp +++ b/test/opt/loop_optimizations/peeling_pass.cpp @@ -12,12 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - -#include "../pass_fixture.h" -#include "opt/ir_builder.h" -#include "opt/loop_descriptor.h" -#include "opt/loop_peeling.h" +#include +#include +#include + +#include "gmock/gmock.h" +#include "source/opt/ir_builder.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/loop_peeling.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/unroll_assumptions.cpp b/test/opt/loop_optimizations/unroll_assumptions.cpp index be55c773f6..62f77d7822 100644 --- a/test/opt/loop_optimizations/unroll_assumptions.cpp +++ b/test/opt/loop_optimizations/unroll_assumptions.cpp @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/loop_unroller.h" -#include "opt/loop_utils.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/loop_unroller.h" +#include "source/opt/loop_utils.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/unroll_simple.cpp b/test/opt/loop_optimizations/unroll_simple.cpp index 26cb07ff3f..3b01fdc317 100644 --- a/test/opt/loop_optimizations/unroll_simple.cpp +++ b/test/opt/loop_optimizations/unroll_simple.cpp @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - -#include "../assembly_builder.h" -#include "../function_utils.h" -#include "../pass_fixture.h" -#include "../pass_utils.h" -#include "opt/loop_unroller.h" -#include "opt/loop_utils.h" -#include "opt/pass.h" +#include "gmock/gmock.h" +#include "source/opt/loop_unroller.h" +#include "source/opt/loop_utils.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/loop_optimizations/unswitch.cpp b/test/opt/loop_optimizations/unswitch.cpp index 5082d23461..96a7fc010b 100644 --- a/test/opt/loop_optimizations/unswitch.cpp +++ b/test/opt/loop_optimizations/unswitch.cpp @@ -12,14 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include + +#include "gmock/gmock.h" +#include "test/opt/pass_fixture.h" #ifdef SPIRV_EFFCEE #include "effcee/effcee.h" #endif -#include "../pass_fixture.h" - namespace spvtools { namespace opt { namespace { diff --git a/test/opt/module_test.cpp b/test/opt/module_test.cpp index 3270e40bc0..cc795850d6 100644 --- a/test/opt/module_test.cpp +++ b/test/opt/module_test.cpp @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include +#include #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include "message.h" -#include "opt/build_module.h" -#include "opt/module.h" +#include "source/message.h" +#include "source/opt/build_module.h" +#include "source/opt/module.h" #include "spirv-tools/libspirv.hpp" - -#include "module_utils.h" +#include "test/opt/module_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/module_utils.h b/test/opt/module_utils.h index 80c2ecf91b..007f132c25 100644 --- a/test/opt/module_utils.h +++ b/test/opt/module_utils.h @@ -16,7 +16,7 @@ #define TEST_OPT_MODULE_UTILS_H_ #include -#include "opt/module.h" +#include "source/opt/module.h" namespace spvtest { diff --git a/test/opt/optimizer_test.cpp b/test/opt/optimizer_test.cpp index 0c2a374159..4b948afd1e 100644 --- a/test/opt/optimizer_test.cpp +++ b/test/opt/optimizer_test.cpp @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include +#include +#include "gmock/gmock.h" #include "spirv-tools/libspirv.hpp" #include "spirv-tools/optimizer.hpp" - -#include "pass_fixture.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/pass_fixture.h b/test/opt/pass_fixture.h index 4877121ac6..50de7b82ff 100644 --- a/test/opt/pass_fixture.h +++ b/test/opt/pass_fixture.h @@ -16,22 +16,23 @@ #define TEST_OPT_PASS_FIXTURE_H_ #include +#include #include #include +#include #include -#include +#include "gtest/gtest.h" +#include "source/opt/build_module.h" +#include "source/opt/make_unique.h" +#include "source/opt/pass_manager.h" +#include "source/opt/passes.h" +#include "spirv-tools/libspirv.hpp" #ifdef SPIRV_EFFCEE #include "effcee/effcee.h" #endif -#include "opt/build_module.h" -#include "opt/make_unique.h" -#include "opt/pass_manager.h" -#include "opt/passes.h" -#include "spirv-tools/libspirv.hpp" - namespace spvtools { namespace opt { diff --git a/test/opt/pass_manager_test.cpp b/test/opt/pass_manager_test.cpp index 3bb24b8c57..8330a13e89 100644 --- a/test/opt/pass_manager_test.cpp +++ b/test/opt/pass_manager_test.cpp @@ -12,13 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "gmock/gmock.h" - #include +#include +#include +#include +#include -#include "module_utils.h" -#include "opt/make_unique.h" -#include "pass_fixture.h" +#include "gmock/gmock.h" +#include "source/opt/make_unique.h" +#include "test/opt/module_utils.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/pass_merge_return_test.cpp b/test/opt/pass_merge_return_test.cpp index 52411eb277..5b2f6c6514 100644 --- a/test/opt/pass_merge_return_test.cpp +++ b/test/opt/pass_merge_return_test.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include +#include "gmock/gmock.h" #include "spirv-tools/libspirv.hpp" #include "spirv-tools/optimizer.hpp" - -#include "pass_fixture.h" -#include "pass_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/pass_remove_duplicates_test.cpp b/test/opt/pass_remove_duplicates_test.cpp index 53e5f5e5d0..16fcd4b858 100644 --- a/test/opt/pass_remove_duplicates_test.cpp +++ b/test/opt/pass_remove_duplicates_test.cpp @@ -13,15 +13,17 @@ // limitations under the License. #include +#include +#include +#include -#include - +#include "gmock/gmock.h" #include "source/opt/build_module.h" #include "source/opt/ir_context.h" #include "source/opt/pass_manager.h" #include "source/opt/remove_duplicates_pass.h" #include "source/spirv_constant.h" -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace opt { diff --git a/test/opt/pass_test.cpp b/test/opt/pass_test.cpp index bfbe00eaa7..bce05b6790 100644 --- a/test/opt/pass_test.cpp +++ b/test/opt/pass_test.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - -#include "assembly_builder.h" -#include "opt/pass.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include "gmock/gmock.h" +#include "source/opt/pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/pass_utils.cpp b/test/opt/pass_utils.cpp index 2f9ce1d396..ceb9996102 100644 --- a/test/opt/pass_utils.cpp +++ b/test/opt/pass_utils.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_utils.h" +#include "test/opt/pass_utils.h" #include #include diff --git a/test/opt/pass_utils.h b/test/opt/pass_utils.h index c95b86fc12..37406842a9 100644 --- a/test/opt/pass_utils.h +++ b/test/opt/pass_utils.h @@ -15,6 +15,7 @@ #ifndef TEST_OPT_PASS_UTILS_H_ #define TEST_OPT_PASS_UTILS_H_ +#include #include #include #include diff --git a/test/opt/private_to_local_test.cpp b/test/opt/private_to_local_test.cpp index b0f73d84e7..d7eb37e511 100644 --- a/test/opt/private_to_local_test.cpp +++ b/test/opt/private_to_local_test.cpp @@ -12,13 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/value_number_table.h" +#include -#include "assembly_builder.h" #include "gmock/gmock.h" -#include "opt/build_module.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include "source/opt/build_module.h" +#include "source/opt/value_number_table.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/propagator_test.cpp b/test/opt/propagator_test.cpp index d90b970fe2..fb8e487cc7 100644 --- a/test/opt/propagator_test.cpp +++ b/test/opt/propagator_test.cpp @@ -12,14 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include - -#include "opt/build_module.h" -#include "opt/cfg.h" -#include "opt/ir_context.h" -#include "opt/pass.h" -#include "opt/propagator.h" +#include +#include +#include +#include + +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "source/opt/build_module.h" +#include "source/opt/cfg.h" +#include "source/opt/ir_context.h" +#include "source/opt/pass.h" +#include "source/opt/propagator.h" namespace spvtools { namespace opt { diff --git a/test/opt/reduce_load_size_test.cpp b/test/opt/reduce_load_size_test.cpp index d694ff909c..1d367e101b 100644 --- a/test/opt/reduce_load_size_test.cpp +++ b/test/opt/reduce_load_size_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/redundancy_elimination_test.cpp b/test/opt/redundancy_elimination_test.cpp index 39c6f56884..a6e8c4f28a 100644 --- a/test/opt/redundancy_elimination_test.cpp +++ b/test/opt/redundancy_elimination_test.cpp @@ -12,13 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/value_number_table.h" +#include -#include "assembly_builder.h" #include "gmock/gmock.h" -#include "opt/build_module.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include "source/opt/build_module.h" +#include "source/opt/value_number_table.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/register_liveness.cpp b/test/opt/register_liveness.cpp index ec0a8ee9e9..cb973d2e6b 100644 --- a/test/opt/register_liveness.cpp +++ b/test/opt/register_liveness.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include +#include #include -#include "assembly_builder.h" -#include "function_utils.h" -#include "opt/register_pressure.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include "gmock/gmock.h" +#include "source/opt/register_pressure.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/replace_invalid_opc_test.cpp b/test/opt/replace_invalid_opc_test.cpp index 8da830c051..adfe2ee1e9 100644 --- a/test/opt/replace_invalid_opc_test.cpp +++ b/test/opt/replace_invalid_opc_test.cpp @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "assembly_builder.h" -#include "gmock/gmock.h" -#include "pass_fixture.h" - #include +#include +#include + +#include "gmock/gmock.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/scalar_analysis.cpp b/test/opt/scalar_analysis.cpp index 0d76b3da4e..598d8c7b73 100644 --- a/test/opt/scalar_analysis.cpp +++ b/test/opt/scalar_analysis.cpp @@ -12,23 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include #include -#include "assembly_builder.h" -#include "function_utils.h" -#include "pass_fixture.h" -#include "pass_utils.h" - -#include "opt/iterator.h" -#include "opt/loop_descriptor.h" -#include "opt/pass.h" -#include "opt/scalar_analysis.h" -#include "opt/tree_iterator.h" +#include "gmock/gmock.h" +#include "source/opt/iterator.h" +#include "source/opt/loop_descriptor.h" +#include "source/opt/pass.h" +#include "source/opt/scalar_analysis.h" +#include "source/opt/tree_iterator.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/function_utils.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/scalar_replacement_test.cpp b/test/opt/scalar_replacement_test.cpp index bd3ce60947..652978bb06 100644 --- a/test/opt/scalar_replacement_test.cpp +++ b/test/opt/scalar_replacement_test.cpp @@ -12,10 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "assembly_builder.h" +#include + #include "gmock/gmock.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/set_spec_const_default_value_test.cpp b/test/opt/set_spec_const_default_value_test.cpp index b415a6542c..161674fe02 100644 --- a/test/opt/set_spec_const_default_value_test.cpp +++ b/test/opt/set_spec_const_default_value_test.cpp @@ -12,9 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" +#include -#include +#include "gmock/gmock.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/simplification_test.cpp b/test/opt/simplification_test.cpp index 40248ea06c..b5ad26790a 100644 --- a/test/opt/simplification_test.cpp +++ b/test/opt/simplification_test.cpp @@ -12,11 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/simplification_pass.h" +#include -#include "assembly_builder.h" #include "gmock/gmock.h" -#include "pass_fixture.h" +#include "source/opt/simplification_pass.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/strength_reduction_test.cpp b/test/opt/strength_reduction_test.cpp index 69313aa634..654c90df95 100644 --- a/test/opt/strength_reduction_test.cpp +++ b/test/opt/strength_reduction_test.cpp @@ -12,16 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "assembly_builder.h" -#include "gmock/gmock.h" -#include "pass_fixture.h" -#include "pass_utils.h" - #include #include #include #include +#include #include +#include + +#include "gmock/gmock.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/strip_debug_info_test.cpp b/test/opt/strip_debug_info_test.cpp index ff1d41676c..f40ed382a6 100644 --- a/test/opt/strip_debug_info_test.cpp +++ b/test/opt/strip_debug_info_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/strip_reflect_info_test.cpp b/test/opt/strip_reflect_info_test.cpp index 08c6668a62..088cac7aa5 100644 --- a/test/opt/strip_reflect_info_test.cpp +++ b/test/opt/strip_reflect_info_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/type_manager_test.cpp b/test/opt/type_manager_test.cpp index f77536cb0e..cf1fcb583e 100644 --- a/test/opt/type_manager_test.cpp +++ b/test/opt/type_manager_test.cpp @@ -12,18 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include +#include +#include +#include +#include + +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "source/opt/build_module.h" +#include "source/opt/instruction.h" +#include "source/opt/type_manager.h" +#include "spirv-tools/libspirv.hpp" #ifdef SPIRV_EFFCEE #include "effcee/effcee.h" #endif -#include "opt/build_module.h" -#include "opt/instruction.h" -#include "opt/type_manager.h" -#include "spirv-tools/libspirv.hpp" - namespace spvtools { namespace opt { namespace analysis { diff --git a/test/opt/types_test.cpp b/test/opt/types_test.cpp index 192cb16475..69a1d96b9c 100644 --- a/test/opt/types_test.cpp +++ b/test/opt/types_test.cpp @@ -13,12 +13,12 @@ // limitations under the License. #include +#include #include -#include - -#include "opt/make_unique.h" -#include "opt/types.h" +#include "gtest/gtest.h" +#include "source/opt/make_unique.h" +#include "source/opt/types.h" namespace spvtools { namespace opt { diff --git a/test/opt/unify_const_test.cpp b/test/opt/unify_const_test.cpp index d277ce4ea7..37728cc232 100644 --- a/test/opt/unify_const_test.cpp +++ b/test/opt/unify_const_test.cpp @@ -12,11 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include #include +#include +#include -#include "assembly_builder.h" -#include "pass_fixture.h" -#include "pass_utils.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/utils_test.cpp b/test/opt/utils_test.cpp index 893deb8823..9bb82a367d 100644 --- a/test/opt/utils_test.cpp +++ b/test/opt/utils_test.cpp @@ -12,9 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include +#include -#include "pass_utils.h" +#include "gtest/gtest.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/value_table_test.cpp b/test/opt/value_table_test.cpp index 6ea8e14b1f..ef338ae7ec 100644 --- a/test/opt/value_table_test.cpp +++ b/test/opt/value_table_test.cpp @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "opt/value_number_table.h" +#include -#include "assembly_builder.h" #include "gmock/gmock.h" -#include "opt/build_module.h" -#include "pass_fixture.h" +#include "source/opt/build_module.h" +#include "source/opt/value_number_table.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" namespace spvtools { namespace opt { diff --git a/test/opt/vector_dce_test.cpp b/test/opt/vector_dce_test.cpp index a69bfd1d70..d1af0de19c 100644 --- a/test/opt/vector_dce_test.cpp +++ b/test/opt/vector_dce_test.cpp @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pass_fixture.h" -#include "pass_utils.h" +#include + +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" namespace spvtools { namespace opt { diff --git a/test/opt/workaround1209_test.cpp b/test/opt/workaround1209_test.cpp index 23a8b2ea72..853a01cb22 100644 --- a/test/opt/workaround1209_test.cpp +++ b/test/opt/workaround1209_test.cpp @@ -12,17 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "assembly_builder.h" -#include "gmock/gmock.h" -#include "pass_fixture.h" -#include "pass_utils.h" - #include #include #include #include +#include #include +#include "gmock/gmock.h" +#include "test/opt/assembly_builder.h" +#include "test/opt/pass_fixture.h" +#include "test/opt/pass_utils.h" + namespace spvtools { namespace opt { namespace { diff --git a/test/parse_number_test.cpp b/test/parse_number_test.cpp index 284002da4c..c99205cf57 100644 --- a/test/parse_number_test.cpp +++ b/test/parse_number_test.cpp @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include diff --git a/test/preserve_numeric_ids_test.cpp b/test/preserve_numeric_ids_test.cpp index aa7387253a..1c3354d55e 100644 --- a/test/preserve_numeric_ids_test.cpp +++ b/test/preserve_numeric_ids_test.cpp @@ -18,7 +18,7 @@ #include "source/text.h" #include "source/text_handler.h" -#include "test_fixture.h" +#include "test/test_fixture.h" namespace spvtools { namespace { diff --git a/test/software_version_test.cpp b/test/software_version_test.cpp index 634c254a5e..80b944a300 100644 --- a/test/software_version_test.cpp +++ b/test/software_version_test.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" - #include +#include #include "gmock/gmock.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/stats/stats_aggregate_test.cpp b/test/stats/stats_aggregate_test.cpp index 7071f5a395..c94de28091 100644 --- a/test/stats/stats_aggregate_test.cpp +++ b/test/stats/stats_aggregate_test.cpp @@ -15,10 +15,11 @@ // Tests for unique type declaration rules validator. #include +#include #include "source/spirv_stats.h" -#include "test_fixture.h" -#include "unit_spirv.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/stats/stats_analyzer_test.cpp b/test/stats/stats_analyzer_test.cpp index 7d5f2f9ca6..53a414c526 100644 --- a/test/stats/stats_analyzer_test.cpp +++ b/test/stats/stats_analyzer_test.cpp @@ -17,8 +17,8 @@ #include #include -#include "latest_version_spirv_header.h" -#include "test_fixture.h" +#include "source/latest_version_spirv_header.h" +#include "test/test_fixture.h" #include "tools/stats/stats_analyzer.h" namespace spvtools { diff --git a/test/target_env_test.cpp b/test/target_env_test.cpp index 4740a2d792..f9624646dc 100644 --- a/test/target_env_test.cpp +++ b/test/target_env_test.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - -#include "unit_spirv.h" +#include +#include "gmock/gmock.h" #include "source/spirv_target_env.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/test_fixture.h b/test/test_fixture.h index 56659d9e91..e85015c947 100644 --- a/test/test_fixture.h +++ b/test/test_fixture.h @@ -15,7 +15,10 @@ #ifndef TEST_TEST_FIXTURE_H_ #define TEST_TEST_FIXTURE_H_ -#include "unit_spirv.h" +#include +#include + +#include "test/unit_spirv.h" namespace spvtest { diff --git a/test/text_advance_test.cpp b/test/text_advance_test.cpp index ebbe215785..9de77a8362 100644 --- a/test/text_advance_test.cpp +++ b/test/text_advance_test.cpp @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include + +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_destroy_test.cpp b/test/text_destroy_test.cpp index 1c5b739767..4c2837ba6c 100644 --- a/test/text_destroy_test.cpp +++ b/test/text_destroy_test.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_literal_test.cpp b/test/text_literal_test.cpp index 74f4373548..fe4199130d 100644 --- a/test/text_literal_test.cpp +++ b/test/text_literal_test.cpp @@ -12,13 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include +#include +#include #include "gmock/gmock.h" -#include "message.h" -#include "test_fixture.h" - -#include +#include "source/message.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_start_new_inst_test.cpp b/test/text_start_new_inst_test.cpp index 756156779c..ff35ac84c7 100644 --- a/test/text_start_new_inst_test.cpp +++ b/test/text_start_new_inst_test.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" - #include +#include "test/unit_spirv.h" + namespace spvtools { namespace { diff --git a/test/text_to_binary.annotation_test.cpp b/test/text_to_binary.annotation_test.cpp index 27df121f58..7aec905555 100644 --- a/test/text_to_binary.annotation_test.cpp +++ b/test/text_to_binary.annotation_test.cpp @@ -15,13 +15,14 @@ // Assembler tests for instructions in the "Annotation" section of the // SPIR-V spec. -#include "unit_spirv.h" - #include +#include #include +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.barrier_test.cpp b/test/text_to_binary.barrier_test.cpp index f3723aa809..545d26ff29 100644 --- a/test/text_to_binary.barrier_test.cpp +++ b/test/text_to_binary.barrier_test.cpp @@ -15,10 +15,11 @@ // Assembler tests for instructions in the "Barrier Instructions" section // of the SPIR-V spec. -#include "unit_spirv.h" +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.constant_test.cpp b/test/text_to_binary.constant_test.cpp index d110e79f39..1a24b528f2 100644 --- a/test/text_to_binary.constant_test.cpp +++ b/test/text_to_binary.constant_test.cpp @@ -15,13 +15,14 @@ // Assembler tests for instructions in the "Group Instrucions" section of the // SPIR-V spec. -#include "unit_spirv.h" - #include #include +#include +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.control_flow_test.cpp b/test/text_to_binary.control_flow_test.cpp index df83867509..07f1108840 100644 --- a/test/text_to_binary.control_flow_test.cpp +++ b/test/text_to_binary.control_flow_test.cpp @@ -16,13 +16,13 @@ // SPIR-V spec. #include +#include #include #include -#include "unit_spirv.h" - #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.debug_test.cpp b/test/text_to_binary.debug_test.cpp index 9f5f0682c3..b85650e5ec 100644 --- a/test/text_to_binary.debug_test.cpp +++ b/test/text_to_binary.debug_test.cpp @@ -15,12 +15,12 @@ // Assembler tests for instructions in the "Debug" section of the // SPIR-V spec. -#include "unit_spirv.h" - #include +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.device_side_enqueue_test.cpp b/test/text_to_binary.device_side_enqueue_test.cpp index 06f5aafb7d..25c100b8ef 100644 --- a/test/text_to_binary.device_side_enqueue_test.cpp +++ b/test/text_to_binary.device_side_enqueue_test.cpp @@ -15,10 +15,12 @@ // Assembler tests for instructions in the "Device-Side Enqueue Instructions" // section of the SPIR-V spec. -#include "unit_spirv.h" +#include +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.extension_test.cpp b/test/text_to_binary.extension_test.cpp index cb595cb5cc..0d8d324b89 100644 --- a/test/text_to_binary.extension_test.cpp +++ b/test/text_to_binary.extension_test.cpp @@ -15,12 +15,15 @@ // Assembler tests for instructions in the "Extension Instruction" section // of the SPIR-V spec. -#include "unit_spirv.h" +#include +#include +#include #include "gmock/gmock.h" -#include "latest_version_glsl_std_450_header.h" -#include "latest_version_opencl_std_header.h" -#include "test_fixture.h" +#include "source/latest_version_glsl_std_450_header.h" +#include "source/latest_version_opencl_std_header.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.function_test.cpp b/test/text_to_binary.function_test.cpp index ddd5461c8b..748461fb19 100644 --- a/test/text_to_binary.function_test.cpp +++ b/test/text_to_binary.function_test.cpp @@ -15,10 +15,12 @@ // Assembler tests for instructions in the "Function" section of the // SPIR-V spec. -#include "unit_spirv.h" +#include +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.group_test.cpp b/test/text_to_binary.group_test.cpp index 07887621ac..2f4b76d2f2 100644 --- a/test/text_to_binary.group_test.cpp +++ b/test/text_to_binary.group_test.cpp @@ -15,10 +15,12 @@ // Assembler tests for instructions in the "Group Instrucions" section of the // SPIR-V spec. -#include "unit_spirv.h" +#include +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.image_test.cpp b/test/text_to_binary.image_test.cpp index 3463e4bcaf..c1adedf448 100644 --- a/test/text_to_binary.image_test.cpp +++ b/test/text_to_binary.image_test.cpp @@ -15,10 +15,12 @@ // Assembler tests for instructions in the "Image Instructions" section of // the SPIR-V spec. -#include "unit_spirv.h" +#include +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.literal_test.cpp b/test/text_to_binary.literal_test.cpp index ce1f4ee00e..bcbb63e0db 100644 --- a/test/text_to_binary.literal_test.cpp +++ b/test/text_to_binary.literal_test.cpp @@ -14,7 +14,9 @@ // Assembler tests for literal numbers and literal strings. -#include "test_fixture.h" +#include + +#include "test/test_fixture.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.memory_test.cpp b/test/text_to_binary.memory_test.cpp index 38da78c8e7..ead08e6fda 100644 --- a/test/text_to_binary.memory_test.cpp +++ b/test/text_to_binary.memory_test.cpp @@ -15,12 +15,13 @@ // Assembler tests for instructions in the "Memory Instructions" section of // the SPIR-V spec. -#include "unit_spirv.h" - #include +#include +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.misc_test.cpp b/test/text_to_binary.misc_test.cpp index bf524571c8..03b1e0914d 100644 --- a/test/text_to_binary.misc_test.cpp +++ b/test/text_to_binary.misc_test.cpp @@ -15,10 +15,10 @@ // Assembler tests for instructions in the "Miscellaneous" section of the // SPIR-V spec. -#include "unit_spirv.h" +#include "test/unit_spirv.h" #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.mode_setting_test.cpp b/test/text_to_binary.mode_setting_test.cpp index ad4629b99c..ed4fa2fb41 100644 --- a/test/text_to_binary.mode_setting_test.cpp +++ b/test/text_to_binary.mode_setting_test.cpp @@ -15,10 +15,13 @@ // Assembler tests for instructions in the "Mode-Setting" section of the // SPIR-V spec. -#include "unit_spirv.h" +#include +#include +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.pipe_storage_test.cpp b/test/text_to_binary.pipe_storage_test.cpp index ca3daf7fdb..f74dbcfdfe 100644 --- a/test/text_to_binary.pipe_storage_test.cpp +++ b/test/text_to_binary.pipe_storage_test.cpp @@ -13,7 +13,7 @@ // limitations under the License. #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.reserved_sampling_test.cpp b/test/text_to_binary.reserved_sampling_test.cpp index 54baf246ea..42e4e2aeb1 100644 --- a/test/text_to_binary.reserved_sampling_test.cpp +++ b/test/text_to_binary.reserved_sampling_test.cpp @@ -14,10 +14,11 @@ // Validation tests for illegal instructions -#include "unit_spirv.h" +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.subgroup_dispatch_test.cpp b/test/text_to_binary.subgroup_dispatch_test.cpp index 10aa77cf95..967e3c38b1 100644 --- a/test/text_to_binary.subgroup_dispatch_test.cpp +++ b/test/text_to_binary.subgroup_dispatch_test.cpp @@ -15,10 +15,10 @@ // Assembler tests for instructions in the "Barrier Instructions" section // of the SPIR-V spec. -#include "unit_spirv.h" +#include "test/unit_spirv.h" #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" namespace spvtools { namespace { diff --git a/test/text_to_binary.type_declaration_test.cpp b/test/text_to_binary.type_declaration_test.cpp index c4e7f7e0b3..c6f158f299 100644 --- a/test/text_to_binary.type_declaration_test.cpp +++ b/test/text_to_binary.type_declaration_test.cpp @@ -15,10 +15,12 @@ // Assembler tests for instructions in the "Type-Declaration" section of the // SPIR-V spec. -#include "unit_spirv.h" +#include +#include #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_to_binary_test.cpp b/test/text_to_binary_test.cpp index 4c2ad586aa..4ba37ad4de 100644 --- a/test/text_to_binary_test.cpp +++ b/test/text_to_binary_test.cpp @@ -14,16 +14,16 @@ #include #include +#include #include #include #include "gmock/gmock.h" - #include "source/spirv_constant.h" #include "source/util/bitutils.h" #include "source/util/hex_float.h" -#include "test_fixture.h" -#include "unit_spirv.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/text_word_get_test.cpp b/test/text_word_get_test.cpp index 54e8493216..b74a680fa7 100644 --- a/test/text_word_get_test.cpp +++ b/test/text_word_get_test.cpp @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include + +#include "test/unit_spirv.h" namespace spvtools { namespace { diff --git a/test/unit_spirv.cpp b/test/unit_spirv.cpp index 807f89c7df..84ed87a510 100644 --- a/test/unit_spirv.cpp +++ b/test/unit_spirv.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "unit_spirv.h" +#include "test/unit_spirv.h" #include "gmock/gmock.h" -#include "test_fixture.h" +#include "test/test_fixture.h" namespace spvtools { namespace { diff --git a/test/unit_spirv.h b/test/unit_spirv.h index fdcfacf951..2244288844 100644 --- a/test/unit_spirv.h +++ b/test/unit_spirv.h @@ -18,8 +18,10 @@ #include #include +#include #include +#include "gtest/gtest.h" #include "source/assembly_grammar.h" #include "source/binary.h" #include "source/diagnostic.h" @@ -31,8 +33,6 @@ #include "source/val/validate.h" #include "spirv-tools/libspirv.h" -#include - #ifdef __ANDROID__ #include namespace std { diff --git a/test/util/bit_vector_test.cpp b/test/util/bit_vector_test.cpp index 76ec560d80..8d967f8f93 100644 --- a/test/util/bit_vector_test.cpp +++ b/test/util/bit_vector_test.cpp @@ -16,7 +16,7 @@ #include "gmock/gmock.h" -#include "util/bit_vector.h" +#include "source/util/bit_vector.h" namespace spvtools { namespace utils { diff --git a/test/util/ilist_test.cpp b/test/util/ilist_test.cpp index 987d74662c..4a546f993c 100644 --- a/test/util/ilist_test.cpp +++ b/test/util/ilist_test.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include "gmock/gmock.h" - -#include "util/ilist.h" +#include "source/util/ilist.h" namespace spvtools { namespace utils { diff --git a/test/util/small_vector_test.cpp b/test/util/small_vector_test.cpp index 3460fdcc89..01d7df1857 100644 --- a/test/util/small_vector_test.cpp +++ b/test/util/small_vector_test.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include "gmock/gmock.h" - -#include "util/small_vector.h" +#include "source/util/small_vector.h" namespace spvtools { namespace utils { diff --git a/test/val/val_adjacency_test.cpp b/test/val/val_adjacency_test.cpp index 431f9b7d78..d62830514a 100644 --- a/test/val/val_adjacency_test.cpp +++ b/test/val/val_adjacency_test.cpp @@ -16,8 +16,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_arithmetics_test.cpp b/test/val/val_arithmetics_test.cpp index 73174e29d9..1c8d88be5a 100644 --- a/test/val/val_arithmetics_test.cpp +++ b/test/val/val_arithmetics_test.cpp @@ -17,8 +17,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_atomics_test.cpp b/test/val/val_atomics_test.cpp index a2b4236183..9aece39aa1 100644 --- a/test/val/val_atomics_test.cpp +++ b/test/val/val_atomics_test.cpp @@ -16,8 +16,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_barriers_test.cpp b/test/val/val_barriers_test.cpp index cf88ac2244..710504eca4 100644 --- a/test/val/val_barriers_test.cpp +++ b/test/val/val_barriers_test.cpp @@ -16,8 +16,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_bitwise_test.cpp b/test/val/val_bitwise_test.cpp index e14ebfa01b..18ccd4f8e1 100644 --- a/test/val/val_bitwise_test.cpp +++ b/test/val/val_bitwise_test.cpp @@ -17,8 +17,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_builtins_test.cpp b/test/val/val_builtins_test.cpp index acfcdcd824..0c8909cec1 100644 --- a/test/val/val_builtins_test.cpp +++ b/test/val/val_builtins_test.cpp @@ -20,10 +20,12 @@ #include #include #include +#include +#include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_capability_test.cpp b/test/val/val_capability_test.cpp index b1d6dc3124..2ee7133cd6 100644 --- a/test/val/val_capability_test.cpp +++ b/test/val/val_capability_test.cpp @@ -18,14 +18,14 @@ #include #include #include +#include -#include - +#include "gmock/gmock.h" #include "source/assembly_grammar.h" -#include "spirv_target_env.h" -#include "test_fixture.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "source/spirv_target_env.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_cfg_test.cpp b/test/val/val_cfg_test.cpp index 9f48a0c1bc..14d098dd20 100644 --- a/test/val/val_cfg_test.cpp +++ b/test/val/val_cfg_test.cpp @@ -26,9 +26,9 @@ #include "source/diagnostic.h" #include "source/val/validate.h" -#include "test_fixture.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_composites_test.cpp b/test/val/val_composites_test.cpp index 4b21db5393..429007b00b 100644 --- a/test/val/val_composites_test.cpp +++ b/test/val/val_composites_test.cpp @@ -16,8 +16,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_conversion_test.cpp b/test/val/val_conversion_test.cpp index 3fb6d29451..e0b8a00180 100644 --- a/test/val/val_conversion_test.cpp +++ b/test/val/val_conversion_test.cpp @@ -17,8 +17,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_data_test.cpp b/test/val/val_data_test.cpp index 916f98276f..ecb31746d7 100644 --- a/test/val/val_data_test.cpp +++ b/test/val/val_data_test.cpp @@ -19,8 +19,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_decoration_test.cpp b/test/val/val_decoration_test.cpp index d2905ae977..5591aa4458 100644 --- a/test/val/val_decoration_test.cpp +++ b/test/val/val_decoration_test.cpp @@ -14,10 +14,13 @@ // Validation tests for decorations +#include +#include + #include "gmock/gmock.h" #include "source/val/decoration.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_derivatives_test.cpp b/test/val/val_derivatives_test.cpp index 1d8519f65c..93a70e87cf 100644 --- a/test/val/val_derivatives_test.cpp +++ b/test/val/val_derivatives_test.cpp @@ -16,8 +16,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_explicit_reserved_test.cpp b/test/val/val_explicit_reserved_test.cpp index 67356c93b4..f01e933fae 100644 --- a/test/val/val_explicit_reserved_test.cpp +++ b/test/val/val_explicit_reserved_test.cpp @@ -14,10 +14,11 @@ // Validation tests for illegal instructions -#include "unit_spirv.h" +#include #include "gmock/gmock.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_ext_inst_test.cpp b/test/val/val_ext_inst_test.cpp index e3c3311cfd..40126fd9d6 100644 --- a/test/val/val_ext_inst_test.cpp +++ b/test/val/val_ext_inst_test.cpp @@ -18,10 +18,11 @@ #include #include +#include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_extensions_test.cpp b/test/val/val_extensions_test.cpp index 328e22ac46..b185c3ca7e 100644 --- a/test/val/val_extensions_test.cpp +++ b/test/val/val_extensions_test.cpp @@ -15,14 +15,15 @@ // Tests for OpExtension validator rules. #include +#include -#include "enum_string_mapping.h" -#include "extensions.h" #include "gmock/gmock.h" -#include "spirv_target_env.h" -#include "test_fixture.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "source/enum_string_mapping.h" +#include "source/extensions.h" +#include "source/spirv_target_env.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_fixtures.h b/test/val/val_fixtures.h index 0c19fba0e9..73a0cc6246 100644 --- a/test/val/val_fixtures.h +++ b/test/val/val_fixtures.h @@ -17,9 +17,12 @@ #ifndef TEST_VAL_VAL_FIXTURES_H_ #define TEST_VAL_VAL_FIXTURES_H_ +#include +#include + #include "source/val/validation_state.h" -#include "test_fixture.h" -#include "unit_spirv.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" namespace spvtest { diff --git a/test/val/val_id_test.cpp b/test/val/val_id_test.cpp index 09f1239e40..6bdba1d4f0 100644 --- a/test/val/val_id_test.cpp +++ b/test/val/val_id_test.cpp @@ -14,11 +14,12 @@ #include #include +#include #include "gmock/gmock.h" -#include "test_fixture.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/test_fixture.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" // NOTE: The tests in this file are ONLY testing ID usage, there for the input // SPIR-V does not follow the logical layout rules from the spec in all cases in diff --git a/test/val/val_image_test.cpp b/test/val/val_image_test.cpp index 522d4c9070..d281327e4c 100644 --- a/test/val/val_image_test.cpp +++ b/test/val/val_image_test.cpp @@ -18,8 +18,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_interfaces_test.cpp b/test/val/val_interfaces_test.cpp index 220a6c5db0..b673a040f4 100644 --- a/test/val/val_interfaces_test.cpp +++ b/test/val/val_interfaces_test.cpp @@ -12,9 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_layout_test.cpp b/test/val/val_layout_test.cpp index 353337eb84..145c5439b3 100644 --- a/test/val/val_layout_test.cpp +++ b/test/val/val_layout_test.cpp @@ -14,15 +14,18 @@ // Validation tests for Logical Layout +#include #include #include #include +#include #include +#include #include "gmock/gmock.h" #include "source/diagnostic.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_limits_test.cpp b/test/val/val_limits_test.cpp index 40fb1dcea6..55bf1e5f16 100644 --- a/test/val/val_limits_test.cpp +++ b/test/val/val_limits_test.cpp @@ -19,8 +19,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_literals_test.cpp b/test/val/val_literals_test.cpp index 39a082bcc3..cbdbdd10e7 100644 --- a/test/val/val_literals_test.cpp +++ b/test/val/val_literals_test.cpp @@ -18,7 +18,7 @@ #include #include "gmock/gmock.h" -#include "val_fixtures.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_logicals_test.cpp b/test/val/val_logicals_test.cpp index 4c41558084..449cdd54fc 100644 --- a/test/val/val_logicals_test.cpp +++ b/test/val/val_logicals_test.cpp @@ -17,8 +17,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_non_uniform_test.cpp b/test/val/val_non_uniform_test.cpp index 47e20bda61..6ff5c127b3 100644 --- a/test/val/val_non_uniform_test.cpp +++ b/test/val/val_non_uniform_test.cpp @@ -14,10 +14,11 @@ #include #include +#include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_primitives_test.cpp b/test/val/val_primitives_test.cpp index 993846bddf..f02ba80570 100644 --- a/test/val/val_primitives_test.cpp +++ b/test/val/val_primitives_test.cpp @@ -16,8 +16,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_ssa_test.cpp b/test/val/val_ssa_test.cpp index b82bd22089..25944f5189 100644 --- a/test/val/val_ssa_test.cpp +++ b/test/val/val_ssa_test.cpp @@ -19,8 +19,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_state_test.cpp b/test/val/val_state_test.cpp index a344f4daa6..699b224ad0 100644 --- a/test/val/val_state_test.cpp +++ b/test/val/val_state_test.cpp @@ -18,15 +18,15 @@ #include #include "gtest/gtest.h" -#include "latest_version_spirv_header.h" - -#include "enum_set.h" -#include "extensions.h" -#include "spirv_validator_options.h" -#include "val/construct.h" -#include "val/function.h" -#include "val/validation_state.h" -#include "val/validate.h" +#include "source/latest_version_spirv_header.h" + +#include "source/enum_set.h" +#include "source/extensions.h" +#include "source/spirv_validator_options.h" +#include "source/val/construct.h" +#include "source/val/function.h" +#include "source/val/validate.h" +#include "source/val/validation_state.h" namespace spvtools { namespace val { diff --git a/test/val/val_storage_test.cpp b/test/val/val_storage_test.cpp index 0f05dccc8c..46b3ddcbb5 100644 --- a/test/val/val_storage_test.cpp +++ b/test/val/val_storage_test.cpp @@ -19,7 +19,7 @@ #include #include "gmock/gmock.h" -#include "val_fixtures.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_type_unique_test.cpp b/test/val/val_type_unique_test.cpp index 7215c1d6bd..67ceaddb86 100644 --- a/test/val/val_type_unique_test.cpp +++ b/test/val/val_type_unique_test.cpp @@ -17,8 +17,8 @@ #include #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_validation_state_test.cpp b/test/val/val_validation_state_test.cpp index 79cc06e172..68504c5288 100644 --- a/test/val/val_validation_state_test.cpp +++ b/test/val/val_validation_state_test.cpp @@ -17,9 +17,9 @@ #include #include "gmock/gmock.h" -#include "spirv_validator_options.h" -#include "unit_spirv.h" -#include "val_fixtures.h" +#include "source/spirv_validator_options.h" +#include "test/unit_spirv.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_version_test.cpp b/test/val/val_version_test.cpp index 58f47897ed..fa252ac869 100644 --- a/test/val/val_version_test.cpp +++ b/test/val/val_version_test.cpp @@ -12,8 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include "gmock/gmock.h" -#include "val_fixtures.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/test/val/val_webgpu_test.cpp b/test/val/val_webgpu_test.cpp index a45c940154..b65d08fe69 100644 --- a/test/val/val_webgpu_test.cpp +++ b/test/val/val_webgpu_test.cpp @@ -14,9 +14,10 @@ // Validation tests for WebGPU env specific checks -#include +#include -#include "val_fixtures.h" +#include "gmock/gmock.h" +#include "test/val/val_fixtures.h" namespace spvtools { namespace val { diff --git a/tools/cfg/bin_to_dot.cpp b/tools/cfg/bin_to_dot.cpp index 05facb9dd4..2561eea401 100644 --- a/tools/cfg/bin_to_dot.cpp +++ b/tools/cfg/bin_to_dot.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "bin_to_dot.h" +#include "tools/cfg/bin_to_dot.h" #include #include #include #include -#include "assembly_grammar.h" -#include "name_mapper.h" +#include "source/assembly_grammar.h" +#include "source/name_mapper.h" namespace { diff --git a/tools/cfg/bin_to_dot.h b/tools/cfg/bin_to_dot.h index 1007ea7164..4de2e07faf 100644 --- a/tools/cfg/bin_to_dot.h +++ b/tools/cfg/bin_to_dot.h @@ -16,6 +16,7 @@ #define TOOLS_CFG_BIN_TO_DOT_H_ #include + #include "spirv-tools/libspirv.h" // Dumps the control flow graph for the given module to the output stream. diff --git a/tools/cfg/cfg.cpp b/tools/cfg/cfg.cpp index 2d0bcfae39..9e2c448ba2 100644 --- a/tools/cfg/cfg.cpp +++ b/tools/cfg/cfg.cpp @@ -19,10 +19,9 @@ #include #include "spirv-tools/libspirv.h" +#include "tools/cfg/bin_to_dot.h" #include "tools/io.h" -#include "bin_to_dot.h" - // Prints a program usage message to stdout. static void print_usage(const char* argv0) { printf( diff --git a/tools/comp/markv.cpp b/tools/comp/markv.cpp index 960e9638de..9a0a51808d 100644 --- a/tools/comp/markv.cpp +++ b/tools/comp/markv.cpp @@ -19,13 +19,15 @@ #include #include #include +#include +#include #include -#include "markv_model_factory.h" #include "source/comp/markv.h" #include "source/spirv_target_env.h" #include "source/table.h" #include "spirv-tools/optimizer.hpp" +#include "tools/comp/markv_model_factory.h" #include "tools/io.h" namespace { diff --git a/tools/comp/markv_model_factory.cpp b/tools/comp/markv_model_factory.cpp index 35b7ba9934..dac9bd54af 100644 --- a/tools/comp/markv_model_factory.cpp +++ b/tools/comp/markv_model_factory.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "markv_model_factory.h" +#include "tools/comp/markv_model_factory.h" -#include "markv_model_shader.h" +#include "tools/comp/markv_model_shader.h" namespace spvtools { namespace comp { diff --git a/tools/comp/markv_model_shader.cpp b/tools/comp/markv_model_shader.cpp index 366275221e..6f64ec0f05 100644 --- a/tools/comp/markv_model_shader.cpp +++ b/tools/comp/markv_model_shader.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "markv_model_shader.h" +#include "tools/comp/markv_model_shader.h" #include #include @@ -53,7 +53,7 @@ inline uint32_t CombineOpcodeAndNumOperands(uint32_t opcode, // --codegen_literal_string_huffman_codecs --codegen_non_id_word_huffman_codecs // --codegen_id_descriptor_huffman_codecs -o // ~/SPIRV-Tools/source/comp/markv_autogen.inc -#include "markv_model_shader_default_autogen.inc" +#include "tools/comp/markv_model_shader_default_autogen.inc" } // namespace diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 5f68bd0bcc..97ecbb3813 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include #include @@ -20,14 +19,15 @@ #include #include #include +#include #include -#include "opt/log.h" -#include "opt/loop_peeling.h" -#include "opt/set_spec_constant_default_value_pass.h" +#include "source/message.h" +#include "source/opt/log.h" +#include "source/opt/loop_peeling.h" +#include "source/opt/set_spec_constant_default_value_pass.h" +#include "source/spirv_validator_options.h" #include "spirv-tools/optimizer.hpp" - -#include "message.h" #include "tools/io.h" namespace { diff --git a/tools/stats/stats.cpp b/tools/stats/stats.cpp index 2b8624371f..0c7399d35e 100644 --- a/tools/stats/stats.cpp +++ b/tools/stats/stats.cpp @@ -17,12 +17,13 @@ #include #include #include +#include #include "source/spirv_stats.h" #include "source/table.h" #include "spirv-tools/libspirv.h" -#include "stats_analyzer.h" #include "tools/io.h" +#include "tools/stats/stats_analyzer.h" using spvtools::SpirvStats; diff --git a/tools/stats/stats_analyzer.cpp b/tools/stats/stats_analyzer.cpp index 613b97d409..20eaf24ccb 100644 --- a/tools/stats/stats_analyzer.cpp +++ b/tools/stats/stats_analyzer.cpp @@ -12,20 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "stats_analyzer.h" +#include "tools/stats/stats_analyzer.h" #include #include #include #include +#include #include +#include #include #include +#include #include -#include "latest_version_spirv_header.h" #include "source/comp/markv_model.h" #include "source/enum_string_mapping.h" +#include "source/latest_version_spirv_header.h" #include "source/opcode.h" #include "source/operand.h" #include "source/spirv_constant.h" diff --git a/tools/stats/stats_analyzer.h b/tools/stats/stats_analyzer.h index 2b246b50fa..c7889f370b 100644 --- a/tools/stats/stats_analyzer.h +++ b/tools/stats/stats_analyzer.h @@ -15,6 +15,7 @@ #ifndef TOOLS_STATS_STATS_ANALYZER_H_ #define TOOLS_STATS_STATS_ANALYZER_H_ +#include #include #include "source/spirv_stats.h"