chromium/third_party/spirv-tools/src/source/opt/ir_context.h

// Copyright (c) 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef SOURCE_OPT_IR_CONTEXT_H_
#define SOURCE_OPT_IR_CONTEXT_H_

#include <algorithm>
#include <iostream>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#include "source/assembly_grammar.h"
#include "source/enum_string_mapping.h"
#include "source/opt/cfg.h"
#include "source/opt/constants.h"
#include "source/opt/debug_info_manager.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/liveness.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/struct_cfg_analysis.h"
#include "source/opt/type_manager.h"
#include "source/opt/value_number_table.h"
#include "source/util/make_unique.h"
#include "source/util/string_utils.h"

namespace spvtools {
namespace opt {

class IRContext {};

inline IRContext::Analysis operator|(IRContext::Analysis lhs,
                                     IRContext::Analysis rhs) {}

inline IRContext::Analysis& operator|=(IRContext::Analysis& lhs,
                                       IRContext::Analysis rhs) {}

inline IRContext::Analysis operator<<(IRContext::Analysis a, int shift) {}

inline IRContext::Analysis& operator<<=(IRContext::Analysis& a, int shift) {}

std::vector<Instruction*> IRContext::GetConstants() {}

std::vector<const Instruction*> IRContext::GetConstants() const {}

Module::inst_iterator IRContext::annotation_begin() {}

Module::inst_iterator IRContext::annotation_end() {}

IteratorRange<Module::inst_iterator> IRContext::annotations() {}

IteratorRange<Module::const_inst_iterator> IRContext::annotations() const {}

Module::inst_iterator IRContext::capability_begin() {}

Module::inst_iterator IRContext::capability_end() {}

IteratorRange<Module::inst_iterator> IRContext::capabilities() {}

IteratorRange<Module::const_inst_iterator> IRContext::capabilities() const {}

Module::inst_iterator IRContext::extension_begin() {}

Module::inst_iterator IRContext::extension_end() {}

IteratorRange<Module::inst_iterator> IRContext::extensions() {}

IteratorRange<Module::const_inst_iterator> IRContext::extensions() const {}

Module::inst_iterator IRContext::types_values_begin() {}

Module::inst_iterator IRContext::types_values_end() {}

IteratorRange<Module::inst_iterator> IRContext::types_values() {}

IteratorRange<Module::const_inst_iterator> IRContext::types_values() const {}

Module::inst_iterator IRContext::ext_inst_import_begin() {}

Module::inst_iterator IRContext::ext_inst_import_end() {}

IteratorRange<Module::inst_iterator> IRContext::ext_inst_imports() {}

IteratorRange<Module::const_inst_iterator> IRContext::ext_inst_imports() const {}

Module::inst_iterator IRContext::debug1_begin() {}

Module::inst_iterator IRContext::debug1_end() {}

IteratorRange<Module::inst_iterator> IRContext::debugs1() {}

IteratorRange<Module::const_inst_iterator> IRContext::debugs1() const {}

Module::inst_iterator IRContext::debug2_begin() {}
Module::inst_iterator IRContext::debug2_end() {}

IteratorRange<Module::inst_iterator> IRContext::debugs2() {}

IteratorRange<Module::const_inst_iterator> IRContext::debugs2() const {}

Module::inst_iterator IRContext::debug3_begin() {}

Module::inst_iterator IRContext::debug3_end() {}

IteratorRange<Module::inst_iterator> IRContext::debugs3() {}

IteratorRange<Module::const_inst_iterator> IRContext::debugs3() const {}

Module::inst_iterator IRContext::ext_inst_debuginfo_begin() {}

Module::inst_iterator IRContext::ext_inst_debuginfo_end() {}

IteratorRange<Module::inst_iterator> IRContext::ext_inst_debuginfo() {}

IteratorRange<Module::const_inst_iterator> IRContext::ext_inst_debuginfo()
    const {}

void IRContext::AddCapability(spv::Capability capability) {}

void IRContext::AddCapability(std::unique_ptr<Instruction>&& c) {}

void IRContext::AddExtension(const std::string& ext_name) {}

void IRContext::AddExtension(std::unique_ptr<Instruction>&& e) {}

void IRContext::AddExtInstImport(const std::string& name) {}

void IRContext::AddExtInstImport(std::unique_ptr<Instruction>&& e) {}

void IRContext::SetMemoryModel(std::unique_ptr<Instruction>&& m) {}

const Instruction* IRContext::GetMemoryModel() const {}

void IRContext::AddEntryPoint(std::unique_ptr<Instruction>&& e) {}

void IRContext::AddExecutionMode(std::unique_ptr<Instruction>&& e) {}

void IRContext::AddDebug1Inst(std::unique_ptr<Instruction>&& d) {}

void IRContext::AddDebug2Inst(std::unique_ptr<Instruction>&& d) {}

void IRContext::AddDebug3Inst(std::unique_ptr<Instruction>&& d) {}

void IRContext::AddExtInstDebugInfo(std::unique_ptr<Instruction>&& d) {}

void IRContext::AddAnnotationInst(std::unique_ptr<Instruction>&& a) {}

void IRContext::AddType(std::unique_ptr<Instruction>&& t) {}

void IRContext::AddGlobalValue(std::unique_ptr<Instruction>&& v) {}

void IRContext::AddFunctionDeclaration(std::unique_ptr<Function>&& f) {}

void IRContext::AddFunction(std::unique_ptr<Function>&& f) {}

void IRContext::AnalyzeDefUse(Instruction* inst) {}

void IRContext::UpdateDefUse(Instruction* inst) {}

void IRContext::BuildIdToNameMap() {}

IteratorRange<std::multimap<uint32_t, Instruction*>::iterator>
IRContext::GetNames(uint32_t id) {}

Instruction* IRContext::GetMemberName(uint32_t struct_type_id, uint32_t index) {}

void IRContext::CloneNames(const uint32_t old_id, const uint32_t new_id,
                           const uint32_t max_member_index) {}

}  // namespace opt
}  // namespace spvtools

#endif  // SOURCE_OPT_IR_CONTEXT_H_