chromium/third_party/spirv-tools/src/source/opt/scalar_replacement_pass.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/scalar_replacement_pass.h"

#include <algorithm>
#include <queue>
#include <tuple>
#include <utility>

#include "source/extensions.h"
#include "source/opt/reflect.h"
#include "source/opt/types.h"
#include "source/util/make_unique.h"

namespace spvtools {
namespace opt {
namespace {
constexpr uint32_t kDebugValueOperandValueIndex =;
constexpr uint32_t kDebugValueOperandExpressionIndex =;
constexpr uint32_t kDebugDeclareOperandVariableIndex =;
}  // namespace

Pass::Status ScalarReplacementPass::Process() {}

Pass::Status ScalarReplacementPass::ProcessFunction(Function* function) {}

Pass::Status ScalarReplacementPass::ReplaceVariable(
    Instruction* inst, std::queue<Instruction*>* worklist) {}

bool ScalarReplacementPass::ReplaceWholeDebugDeclare(
    Instruction* dbg_decl, const std::vector<Instruction*>& replacements) {}

bool ScalarReplacementPass::ReplaceWholeDebugValue(
    Instruction* dbg_value, const std::vector<Instruction*>& replacements) {}

bool ScalarReplacementPass::ReplaceWholeLoad(
    Instruction* load, const std::vector<Instruction*>& replacements) {}

bool ScalarReplacementPass::ReplaceWholeStore(
    Instruction* store, const std::vector<Instruction*>& replacements) {}

bool ScalarReplacementPass::ReplaceAccessChain(
    Instruction* chain, const std::vector<Instruction*>& replacements) {}

bool ScalarReplacementPass::CreateReplacementVariables(
    Instruction* inst, std::vector<Instruction*>* replacements) {}

Instruction* ScalarReplacementPass::GetUndef(uint32_t type_id) {}

void ScalarReplacementPass::TransferAnnotations(
    const Instruction* source, std::vector<Instruction*>* replacements) {}

void ScalarReplacementPass::CreateVariable(
    uint32_t type_id, Instruction* var_inst, uint32_t index,
    std::vector<Instruction*>* replacements) {}

uint32_t ScalarReplacementPass::GetOrCreatePointerType(uint32_t id) {}

void ScalarReplacementPass::GetOrCreateInitialValue(Instruction* source,
                                                    uint32_t index,
                                                    Instruction* newVar) {}

uint64_t ScalarReplacementPass::GetArrayLength(
    const Instruction* arrayType) const {}

uint64_t ScalarReplacementPass::GetNumElements(const Instruction* type) const {}

bool ScalarReplacementPass::IsSpecConstant(uint32_t id) const {}

Instruction* ScalarReplacementPass::GetStorageType(
    const Instruction* inst) const {}

bool ScalarReplacementPass::CanReplaceVariable(
    const Instruction* varInst) const {}

bool ScalarReplacementPass::CheckType(const Instruction* typeInst) const {}

bool ScalarReplacementPass::CheckTypeAnnotations(
    const Instruction* typeInst) const {}

bool ScalarReplacementPass::CheckAnnotations(const Instruction* varInst) const {}

bool ScalarReplacementPass::CheckUses(const Instruction* inst) const {}

bool ScalarReplacementPass::CheckUses(const Instruction* inst,
                                      VariableStats* stats) const {}

bool ScalarReplacementPass::CheckUsesRelaxed(const Instruction* inst) const {}

bool ScalarReplacementPass::CheckImageTexelPointer(uint32_t index) const {}

bool ScalarReplacementPass::CheckLoad(const Instruction* inst,
                                      uint32_t index) const {}

bool ScalarReplacementPass::CheckStore(const Instruction* inst,
                                       uint32_t index) const {}

bool ScalarReplacementPass::CheckDebugDeclare(uint32_t index) const {}

bool ScalarReplacementPass::IsLargerThanSizeLimit(uint64_t length) const {}

std::unique_ptr<std::unordered_set<int64_t>>
ScalarReplacementPass::GetUsedComponents(Instruction* inst) {}

uint64_t ScalarReplacementPass::GetMaxLegalIndex(
    const Instruction* var_inst) const {}

void ScalarReplacementPass::CopyDecorationsToVariable(Instruction* from,
                                                      Instruction* to,
                                                      uint32_t member_index) {}

void ScalarReplacementPass::CopyPointerDecorationsToVariable(Instruction* from,
                                                             Instruction* to) {}

void ScalarReplacementPass::CopyNecessaryMemberDecorationsToVariable(
    Instruction* from, Instruction* to, uint32_t member_index) {}

}  // namespace opt
}  // namespace spvtools