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.
This commit is contained in:
dan sinclair 2018-08-03 15:06:09 -04:00 committed by GitHub
parent 2d9a325264
commit eda2cfbe12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
481 changed files with 2056 additions and 1602 deletions

View File

@ -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 := \

View File

@ -262,7 +262,6 @@ config("spvtools_config") {
include_dirs = [
".",
"include",
"source",
"$target_gen_dir",
"${spirv_headers}/include",
]

View File

@ -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)

View File

@ -19,9 +19,6 @@ for more details about the presubmit API built into depot_tools.
"""
LINT_FILTERS = [
"-build/include",
"-build/include_order",
"-build/include_what_you_use",
"-build/storage_class",
"-readability/braces",
"-readability/casting",

View File

@ -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 <algorithm>
#include <cassert>
#include <cstring>
#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 {

View File

@ -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 {

View File

@ -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 <algorithm>
#include <cassert>
#include <cstring>
#include <iterator>
#include <limits>
#include <string>
#include <unordered_map>
#include <vector>
#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,

View File

@ -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

View File

@ -24,7 +24,7 @@
#include <string>
#include <vector>
#include "comp/markv_model.h"
#include "source/comp/markv_model.h"
#include "spirv-tools/libspirv.hpp"
namespace spvtools {

View File

@ -26,39 +26,41 @@
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#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 {

View File

@ -16,12 +16,15 @@
#define SOURCE_COMP_MARKV_MODEL_H_
#include <map>
#include <memory>
#include <string>
#include <unordered_set>
#include <utility>
#include <vector>
#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 {

View File

@ -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 <cassert>
#include <cstring>
#include <iostream>
#include <sstream>
#include <utility>
#include "table.h"
#include "source/table.h"
// Diagnostic API

View File

@ -21,20 +21,21 @@
#include <iomanip>
#include <memory>
#include <unordered_map>
#include <utility>
#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 "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 {

View File

@ -21,7 +21,7 @@
#include <set>
#include <utility>
#include "latest_version_spirv_header.h"
#include "source/latest_version_spirv_header.h"
namespace spvtools {

View File

@ -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 <algorithm>
#include <cassert>
@ -20,7 +20,7 @@
#include <string>
#include <unordered_map>
#include "extensions.h"
#include "source/extensions.h"
namespace spvtools {

View File

@ -17,8 +17,8 @@
#include <string>
#include "extensions.h"
#include "latest_version_spirv_header.h"
#include "source/extensions.h"
#include "source/latest_version_spirv_header.h"
namespace spvtools {

View File

@ -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 <cassert>
#include <cstring>
@ -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"

View File

@ -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);

View File

@ -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 <cassert>
#include <sstream>
#include <string>
#include "enum_string_mapping.h"
#include "source/enum_string_mapping.h"
namespace spvtools {

View File

@ -17,7 +17,7 @@
#include <string>
#include "enum_set.h"
#include "source/enum_set.h"
#include "spirv-tools/libspirv.h"
namespace spvtools {

View File

@ -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 <cassert>
#include <iostream>
#include "opcode.h"
#include "operand.h"
#include "source/opcode.h"
#include "source/operand.h"
namespace spvtools {
namespace {

View File

@ -18,7 +18,7 @@
#include <cstdint>
#include <vector>
#include "latest_version_spirv_header.h"
#include "source/latest_version_spirv_header.h"
#include "spirv-tools/libspirv.h"
// Describes an instruction.

View File

@ -14,7 +14,11 @@
#include "spirv-tools/libspirv.hpp"
#include "table.h"
#include <string>
#include <utility>
#include <vector>
#include "source/table.h"
namespace spvtools {

View File

@ -14,26 +14,28 @@
#include "spirv-tools/linker.hpp"
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <memory>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#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 {

View File

@ -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 <sstream>

View File

@ -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 <algorithm>
#include <cassert>
@ -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 {

View File

@ -20,7 +20,7 @@
#include <unordered_map>
#include <unordered_set>
#include "assembly_grammar.h"
#include "source/assembly_grammar.h"
#include "spirv-tools/libspirv.h"
namespace spvtools {

View File

@ -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 <assert.h>
#include <string.h>
@ -20,12 +20,12 @@
#include <algorithm>
#include <cstdlib>
#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};

View File

@ -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".

View File

@ -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 <assert.h>
#include <string.h>
#include <algorithm>
#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.

View File

@ -16,9 +16,10 @@
#define SOURCE_OPERAND_H_
#include <functional>
#include <vector>
#include "source/table.h"
#include "spirv-tools/libspirv.h"
#include "table.h"
// A sequence of operand types.
//

View File

@ -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 <memory>
#include <stack>
#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 {

View File

@ -17,18 +17,21 @@
#ifndef SOURCE_OPT_AGGRESSIVE_DEAD_CODE_ELIM_PASS_H_
#define SOURCE_OPT_AGGRESSIVE_DEAD_CODE_ELIM_PASS_H_
#include <util/bit_vector.h>
#include <algorithm>
#include <list>
#include <map>
#include <queue>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#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 {

View File

@ -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 <ostream>
#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 {

View File

@ -22,12 +22,13 @@
#include <iterator>
#include <memory>
#include <ostream>
#include <string>
#include <utility>
#include <vector>
#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 {

View File

@ -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 <vector>
#include "source/opt/ir_context.h"
#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {

View File

@ -24,11 +24,11 @@
#include <unordered_set>
#include <utility>
#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 {

View File

@ -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 <utility>
#include <vector>
#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 {

View File

@ -18,8 +18,8 @@
#include <memory>
#include <string>
#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 {

View File

@ -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 <algorithm>
#include <limits>
#include "source/opt/fold.h"
#include "source/opt/function.h"
#include "source/opt/module.h"
#include "source/opt/propagator.h"
namespace spvtools {
namespace opt {

View File

@ -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 <memory>
#include <unordered_map>
#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 {

View File

@ -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 <memory>
#include <utility>
#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 {

View File

@ -15,12 +15,13 @@
#ifndef SOURCE_OPT_CFG_H_
#define SOURCE_OPT_CFG_H_
#include "basic_block.h"
#include <algorithm>
#include <list>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "source/opt/basic_block.h"
namespace spvtools {
namespace opt {

View File

@ -19,10 +19,10 @@
#include <queue>
#include <unordered_set>
#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 {

View File

@ -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 {

View File

@ -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 <utility>
#include "source/opt/constants.h"
#include "source/opt/ir_builder.h"
#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {

View File

@ -15,7 +15,9 @@
#ifndef SOURCE_OPT_COMBINE_ACCESS_CHAINS_H_
#define SOURCE_OPT_COMBINE_ACCESS_CHAINS_H_
#include "pass.h"
#include <vector>
#include "source/opt/pass.h"
namespace spvtools {
namespace opt {

View File

@ -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 {

View File

@ -18,18 +18,22 @@
#define SOURCE_OPT_COMMON_UNIFORM_ELIM_PASS_H_
#include <algorithm>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include "basic_block.h"
#include "decoration_manager.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/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 {

View File

@ -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 <cassert>
#include <unordered_map>
#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {

View File

@ -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 {

View File

@ -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 <vector>
#include "source/opt/ir_context.h"
#include "source/opt/iterator.h"
#include "spirv/1.2/GLSL.std.450.h"
namespace spvtools {
namespace opt {

View File

@ -22,11 +22,12 @@
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#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 {

View File

@ -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 {

View File

@ -15,9 +15,10 @@
#ifndef SOURCE_OPT_CONST_FOLDING_RULES_H_
#define SOURCE_OPT_CONST_FOLDING_RULES_H_
#include <unordered_map>
#include <vector>
#include "constants.h"
#include "source/opt/constants.h"
namespace spvtools {
namespace opt {

View File

@ -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 <unordered_map>
#include <vector>
#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
namespace analysis {

View File

@ -16,17 +16,18 @@
#define SOURCE_OPT_CONSTANTS_H_
#include <cinttypes>
#include <map>
#include <memory>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#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 {

View File

@ -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 <utility>
#include "source/opt/ir_builder.h"
namespace spvtools {
namespace opt {

View File

@ -15,7 +15,10 @@
#ifndef SOURCE_OPT_COPY_PROP_ARRAYS_H_
#define SOURCE_OPT_COPY_PROP_ARRAYS_H_
#include "mem_pass.h"
#include <memory>
#include <vector>
#include "source/opt/mem_pass.h"
namespace spvtools {
namespace opt {

View File

@ -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 <list>
#include <memory>
#include <vector>
#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 {

View File

@ -23,11 +23,12 @@
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#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 {

View File

@ -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 <vector>
namespace spvtools {
namespace opt {

View File

@ -22,12 +22,13 @@
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#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 {

View File

@ -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 <vector>
#include "source/opt/ir_context.h"
#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {

View File

@ -18,8 +18,8 @@
#include <climits>
#include <unordered_map>
#include "decoration_manager.h"
#include "mem_pass.h"
#include "source/opt/decoration_manager.h"
#include "source/opt/mem_pass.h"
namespace spvtools {
namespace opt {

View File

@ -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 <algorithm>
#include <memory>
#include <set>
#include <stack>
#include <utility>
#include "ir_context.h"
#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {

View File

@ -20,8 +20,8 @@
#include <unordered_set>
#include <vector>
#include "instruction.h"
#include "module.h"
#include "source/opt/instruction.h"
#include "source/opt/module.h"
namespace spvtools {
namespace opt {

View File

@ -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 <iostream>
#include "log.h"
#include "reflect.h"
#include "source/opt/log.h"
#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {

View File

@ -18,10 +18,11 @@
#include <list>
#include <set>
#include <unordered_map>
#include <utility>
#include <vector>
#include "instruction.h"
#include "module.h"
#include "source/opt/instruction.h"
#include "source/opt/module.h"
#include "spirv-tools/libspirv.hpp"
namespace spvtools {

View File

@ -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 <unordered_set>
#include "ir_context.h"
#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {

View File

@ -18,7 +18,7 @@
#include <cstdint>
#include <map>
#include "dominator_tree.h"
#include "source/opt/dominator_tree.h"
namespace spvtools {
namespace opt {

View File

@ -16,9 +16,9 @@
#include <memory>
#include <set>
#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

View File

@ -21,8 +21,8 @@
#include <utility>
#include <vector>
#include "cfg.h"
#include "tree_iterator.h"
#include "source/opt/cfg.h"
#include "source/opt/tree_iterator.h"
namespace spvtools {
namespace opt {

View File

@ -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 <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#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 {

View File

@ -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 {

View File

@ -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 <unordered_set>
#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {

View File

@ -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 {

View File

@ -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 <queue>
#include <stack>
#include <string>
#include "enum_string_mapping.h"
#include "source/enum_string_mapping.h"
namespace spvtools {
namespace opt {

View File

@ -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 {

View File

@ -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 <cassert>
#include <memory>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {

View File

@ -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 {

View File

@ -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 <cassert>
#include <cstdint>
#include <vector>
#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 {

View File

@ -18,10 +18,10 @@
#include <cstdint>
#include <vector>
#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 {

View File

@ -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 <algorithm>
#include <initializer_list>
#include <tuple>
#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 {

View File

@ -19,12 +19,12 @@
#include <unordered_map>
#include <vector>
#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 {

View File

@ -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 <limits>
#include <memory>
#include <utility>
#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 {

View File

@ -16,9 +16,10 @@
#define SOURCE_OPT_FOLDING_RULES_H_
#include <cstdint>
#include <unordered_map>
#include <vector>
#include "constants.h"
#include "source/opt/constants.h"
namespace spvtools {
namespace opt {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 <ostream>
#include <sstream>

View File

@ -18,12 +18,13 @@
#include <algorithm>
#include <functional>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#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 {

View File

@ -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 <memory>
#include <vector>
#include "source/opt/value_number_table.h"
namespace spvtools {
namespace opt {

View File

@ -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 {

View File

@ -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 <utility>
namespace spvtools {
namespace opt {

View File

@ -23,9 +23,9 @@
#include <unordered_map>
#include <vector>
#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 {

View File

@ -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 <utility>
namespace spvtools {
namespace opt {
namespace {
const uint32_t kTypePointerTypeIdInIdx = 1;

View File

@ -23,9 +23,9 @@
#include <unordered_map>
#include <vector>
#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 {

View File

@ -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 <unordered_set>
#include <utility>
#include "source/cfa.h"
// Indices of operands in SPIR-V instructions

View File

@ -20,12 +20,13 @@
#include <algorithm>
#include <list>
#include <memory>
#include <set>
#include <unordered_map>
#include <vector>
#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 {

View File

@ -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 <initializer_list>
#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 {

Some files were not shown because too many files have changed in this diff Show More