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

// 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.

#include "source/opt/ir_context.h"

#include <cstring>

#include "OpenCLDebugInfo100.h"
#include "source/latest_version_glsl_std_450_header.h"
#include "source/opt/log.h"
#include "source/opt/reflect.h"

namespace spvtools {
namespace opt {
namespace {
constexpr int kSpvDecorateTargetIdInIdx =;
constexpr int kSpvDecorateDecorationInIdx =;
constexpr int kSpvDecorateBuiltinInIdx =;
constexpr int kEntryPointInterfaceInIdx =;
constexpr int kEntryPointFunctionIdInIdx =;
constexpr int kEntryPointExecutionModelInIdx =;

// Constants for OpenCL.DebugInfo.100 / NonSemantic.Shader.DebugInfo.100
// extension instructions.
constexpr uint32_t kDebugFunctionOperandFunctionIndex =;
constexpr uint32_t kDebugGlobalVariableOperandVariableIndex =;
}  // namespace

void IRContext::BuildInvalidAnalyses(IRContext::Analysis set) {}

void IRContext::InvalidateAnalysesExceptFor(
    IRContext::Analysis preserved_analyses) {}

void IRContext::InvalidateAnalyses(IRContext::Analysis analyses_to_invalidate) {}

Instruction* IRContext::KillInst(Instruction* inst) {}

bool IRContext::KillInstructionIf(Module::inst_iterator begin,
                                  Module::inst_iterator end,
                                  std::function<bool(Instruction*)> condition) {}

void IRContext::CollectNonSemanticTree(
    Instruction* inst, std::unordered_set<Instruction*>* to_kill) {}

bool IRContext::KillDef(uint32_t id) {}

bool IRContext::RemoveCapability(spv::Capability capability) {}

bool IRContext::RemoveExtension(Extension extension) {}

bool IRContext::ReplaceAllUsesWith(uint32_t before, uint32_t after) {}

bool IRContext::ReplaceAllUsesWithPredicate(
    uint32_t before, uint32_t after,
    const std::function<bool(Instruction*)>& predicate) {}

bool IRContext::IsConsistent() {}

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

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

void IRContext::KillNamesAndDecorates(uint32_t id) {}

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

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

void IRContext::AddCombinatorsForCapability(uint32_t capability) {}

void IRContext::AddCombinatorsForExtension(Instruction* extension) {}

void IRContext::InitializeCombinators() {}

void IRContext::RemoveFromIdToName(const Instruction* inst) {}

LoopDescriptor* IRContext::GetLoopDescriptor(const Function* f) {}

uint32_t IRContext::FindBuiltinInputVar(uint32_t builtin) {}

void IRContext::AddVarToEntryPoints(uint32_t var_id) {}

uint32_t IRContext::GetBuiltinInputVarId(uint32_t builtin) {}

void IRContext::AddCalls(const Function* func, std::queue<uint32_t>* todo) {}

bool IRContext::ProcessEntryPointCallTree(ProcessFunction& pfn) {}

bool IRContext::ProcessReachableCallTree(ProcessFunction& pfn) {}

bool IRContext::ProcessCallTreeFromRoots(ProcessFunction& pfn,
                                         std::queue<uint32_t>* roots) {}

void IRContext::CollectCallTreeFromRoots(unsigned entryId,
                                         std::unordered_set<uint32_t>* funcs) {}

void IRContext::EmitErrorMessage(std::string message, Instruction* inst) {}

// Gets the dominator analysis for function |f|.
DominatorAnalysis* IRContext::GetDominatorAnalysis(const Function* f) {}

// Gets the postdominator analysis for function |f|.
PostDominatorAnalysis* IRContext::GetPostDominatorAnalysis(const Function* f) {}

bool IRContext::CheckCFG() {}

bool IRContext::IsReachable(const opt::BasicBlock& bb) {}

spv::ExecutionModel IRContext::GetStage() {}

}  // namespace opt
}  // namespace spvtools