chromium/third_party/spirv-tools/src/source/val/function.cpp

// Copyright (c) 2015-2016 The Khronos Group 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/val/function.h"

#include <algorithm>
#include <cassert>
#include <sstream>
#include <unordered_map>
#include <utility>

#include "source/cfa.h"
#include "source/val/basic_block.h"
#include "source/val/construct.h"
#include "source/val/validate.h"

namespace spvtools {
namespace val {

// Universal Limit of ResultID + 1
static const uint32_t kInvalidId =;

Function::Function(uint32_t function_id, uint32_t result_type_id,
                   spv::FunctionControlMask function_control,
                   uint32_t function_type_id)
    :{}

bool Function::IsFirstBlock(uint32_t block_id) const {}

spv_result_t Function::RegisterFunctionParameter(uint32_t parameter_id,
                                                 uint32_t type_id) {}

spv_result_t Function::RegisterLoopMerge(uint32_t merge_id,
                                         uint32_t continue_id) {}

spv_result_t Function::RegisterSelectionMerge(uint32_t merge_id) {}

spv_result_t Function::RegisterSetFunctionDeclType(FunctionDecl type) {}

spv_result_t Function::RegisterBlock(uint32_t block_id, bool is_definition) {}

void Function::RegisterBlockEnd(std::vector<uint32_t> next_list) {}

void Function::RegisterFunctionEnd() {}

size_t Function::block_count() const {}

size_t Function::undefined_block_count() const {}

const std::vector<BasicBlock*>& Function::ordered_blocks() const {}
std::vector<BasicBlock*>& Function::ordered_blocks() {}

const BasicBlock* Function::current_block() const {}
BasicBlock* Function::current_block() {}

const std::list<Construct>& Function::constructs() const {}
std::list<Construct>& Function::constructs() {}

const BasicBlock* Function::first_block() const {}
BasicBlock* Function::first_block() {}

bool Function::IsBlockType(uint32_t merge_block_id, BlockType type) const {}

std::pair<const BasicBlock*, bool> Function::GetBlock(uint32_t block_id) const {}

std::pair<BasicBlock*, bool> Function::GetBlock(uint32_t block_id) {}

Function::GetBlocksFunction Function::AugmentedCFGSuccessorsFunction() const {}

Function::GetBlocksFunction Function::AugmentedCFGPredecessorsFunction() const {}

Function::GetBlocksFunction Function::AugmentedStructuralCFGSuccessorsFunction()
    const {}

Function::GetBlocksFunction
Function::AugmentedStructuralCFGPredecessorsFunction() const {}

void Function::ComputeAugmentedCFG() {}

Construct& Function::AddConstruct(const Construct& new_construct) {}

Construct& Function::FindConstructForEntryBlock(const BasicBlock* entry_block,
                                                ConstructType type) {}

int Function::GetBlockDepth(BasicBlock* bb) {}

void Function::RegisterExecutionModelLimitation(spv::ExecutionModel model,
                                                const std::string& message) {}

bool Function::IsCompatibleWithExecutionModel(spv::ExecutionModel model,
                                              std::string* reason) const {}

bool Function::CheckLimitations(const ValidationState_t& _,
                                const Function* entry_point,
                                std::string* reason) const {}

}  // namespace val
}  // namespace spvtools