#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 {
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 { … }
}
}