#include "source/opt/decoration_manager.h"
#include <algorithm>
#include <memory>
#include <set>
#include <stack>
#include <utility>
#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
namespace analysis {
namespace {
InstructionVector;
DecorationSet;
bool IsSubset(const DecorationSet& a, const DecorationSet& b) { … }
}
bool DecorationManager::RemoveDecorationsFrom(
uint32_t id, std::function<bool(const Instruction&)> pred) { … }
std::vector<Instruction*> DecorationManager::GetDecorationsFor(
uint32_t id, bool include_linkage) { … }
std::vector<const Instruction*> DecorationManager::GetDecorationsFor(
uint32_t id, bool include_linkage) const { … }
bool DecorationManager::HaveTheSameDecorations(uint32_t id1,
uint32_t id2) const { … }
bool DecorationManager::HaveSubsetOfDecorations(uint32_t id1,
uint32_t id2) const { … }
bool DecorationManager::AreDecorationsTheSame(const Instruction* inst1,
const Instruction* inst2,
bool ignore_target) const { … }
void DecorationManager::AnalyzeDecorations() { … }
void DecorationManager::AddDecoration(Instruction* inst) { … }
void DecorationManager::AddDecoration(spv::Op opcode,
std::vector<Operand> opnds) { … }
void DecorationManager::AddDecoration(uint32_t inst_id, uint32_t decoration) { … }
void DecorationManager::AddDecorationVal(uint32_t inst_id, uint32_t decoration,
uint32_t decoration_value) { … }
void DecorationManager::AddMemberDecoration(uint32_t inst_id, uint32_t member,
uint32_t decoration,
uint32_t decoration_value) { … }
template <typename T>
std::vector<T> DecorationManager::InternalGetDecorationsFor(
uint32_t id, bool include_linkage) { … }
bool DecorationManager::WhileEachDecoration(
uint32_t id, uint32_t decoration,
std::function<bool(const Instruction&)> f) const { … }
void DecorationManager::ForEachDecoration(
uint32_t id, uint32_t decoration,
std::function<void(const Instruction&)> f) const { … }
bool DecorationManager::HasDecoration(uint32_t id,
spv::Decoration decoration) const { … }
bool DecorationManager::HasDecoration(uint32_t id, uint32_t decoration) const { … }
bool DecorationManager::FindDecoration(
uint32_t id, uint32_t decoration,
std::function<bool(const Instruction&)> f) { … }
void DecorationManager::CloneDecorations(uint32_t from, uint32_t to) { … }
void DecorationManager::CloneDecorations(
uint32_t from, uint32_t to,
const std::vector<spv::Decoration>& decorations_to_copy) { … }
void DecorationManager::RemoveDecoration(Instruction* inst) { … }
bool operator==(const DecorationManager& lhs, const DecorationManager& rhs) { … }
}
}
}