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

#include <vector>

#include "source/opt/ir_context.h"

namespace spvtools {
namespace opt {
namespace analysis {

float Constant::GetFloat() const {}

double Constant::GetDouble() const {}

double Constant::GetValueAsDouble() const {}

uint32_t Constant::GetU32() const {}

uint64_t Constant::GetU64() const {}

int32_t Constant::GetS32() const {}

int64_t Constant::GetS64() const {}

uint64_t Constant::GetZeroExtendedValue() const {}

int64_t Constant::GetSignExtendedValue() const {}

ConstantManager::ConstantManager(IRContext* ctx) :{}

Type* ConstantManager::GetType(const Instruction* inst) const {}

std::vector<const Constant*> ConstantManager::GetOperandConstants(
    const Instruction* inst) const {}

uint32_t ConstantManager::FindDeclaredConstant(const Constant* c,
                                               uint32_t type_id) const {}

std::vector<const Constant*> ConstantManager::GetConstantsFromIds(
    const std::vector<uint32_t>& ids) const {}

Instruction* ConstantManager::BuildInstructionAndAddToModule(
    const Constant* new_const, Module::inst_iterator* pos, uint32_t type_id) {}

Instruction* ConstantManager::GetDefiningInstruction(
    const Constant* c, uint32_t type_id, Module::inst_iterator* pos) {}

std::unique_ptr<Constant> ConstantManager::CreateConstant(
    const Type* type, const std::vector<uint32_t>& literal_words_or_ids) const {}

const Constant* ConstantManager::GetConstantFromInst(const Instruction* inst) {}

std::unique_ptr<Instruction> ConstantManager::CreateInstruction(
    uint32_t id, const Constant* c, uint32_t type_id) const {}

std::unique_ptr<Instruction> ConstantManager::CreateCompositeInstruction(
    uint32_t result_id, const CompositeConstant* cc, uint32_t type_id) const {}

const Constant* ConstantManager::GetConstant(
    const Type* type, const std::vector<uint32_t>& literal_words_or_ids) {}

const Constant* ConstantManager::GetNullCompositeConstant(const Type* type) {}

const Constant* ConstantManager::GetNumericVectorConstantWithWords(
    const Vector* type, const std::vector<uint32_t>& literal_words) {}

uint32_t ConstantManager::GetFloatConstId(float val) {}

const Constant* ConstantManager::GetFloatConst(float val) {}

uint32_t ConstantManager::GetDoubleConstId(double val) {}

const Constant* ConstantManager::GetDoubleConst(double val) {}

uint32_t ConstantManager::GetSIntConstId(int32_t val) {}

const Constant* ConstantManager::GetIntConst(uint64_t val, int32_t bitWidth,
                                             bool isSigned) {}

uint32_t ConstantManager::GetUIntConstId(uint32_t val) {}

uint32_t ConstantManager::GetNullConstId(const Type* type) {}

const Constant* ConstantManager::GenerateIntegerConstant(
    const analysis::Integer* integer_type, uint64_t result) {}

std::vector<const analysis::Constant*> Constant::GetVectorComponents(
    analysis::ConstantManager* const_mgr) const {}

}  // namespace analysis
}  // namespace opt
}  // namespace spvtools