#include "source/opt/ir_context.h"
#include <cstring>
#include "OpenCLDebugInfo100.h"
#include "source/latest_version_glsl_std_450_header.h"
#include "source/opt/log.h"
#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {
namespace {
constexpr int kSpvDecorateTargetIdInIdx = …;
constexpr int kSpvDecorateDecorationInIdx = …;
constexpr int kSpvDecorateBuiltinInIdx = …;
constexpr int kEntryPointInterfaceInIdx = …;
constexpr int kEntryPointFunctionIdInIdx = …;
constexpr int kEntryPointExecutionModelInIdx = …;
constexpr uint32_t kDebugFunctionOperandFunctionIndex = …;
constexpr uint32_t kDebugGlobalVariableOperandVariableIndex = …;
}
void IRContext::BuildInvalidAnalyses(IRContext::Analysis set) { … }
void IRContext::InvalidateAnalysesExceptFor(
IRContext::Analysis preserved_analyses) { … }
void IRContext::InvalidateAnalyses(IRContext::Analysis analyses_to_invalidate) { … }
Instruction* IRContext::KillInst(Instruction* inst) { … }
bool IRContext::KillInstructionIf(Module::inst_iterator begin,
Module::inst_iterator end,
std::function<bool(Instruction*)> condition) { … }
void IRContext::CollectNonSemanticTree(
Instruction* inst, std::unordered_set<Instruction*>* to_kill) { … }
bool IRContext::KillDef(uint32_t id) { … }
bool IRContext::RemoveCapability(spv::Capability capability) { … }
bool IRContext::RemoveExtension(Extension extension) { … }
bool IRContext::ReplaceAllUsesWith(uint32_t before, uint32_t after) { … }
bool IRContext::ReplaceAllUsesWithPredicate(
uint32_t before, uint32_t after,
const std::function<bool(Instruction*)>& predicate) { … }
bool IRContext::IsConsistent() { … }
void IRContext::ForgetUses(Instruction* inst) { … }
void IRContext::AnalyzeUses(Instruction* inst) { … }
void IRContext::KillNamesAndDecorates(uint32_t id) { … }
void IRContext::KillNamesAndDecorates(Instruction* inst) { … }
void IRContext::KillOperandFromDebugInstructions(Instruction* inst) { … }
void IRContext::AddCombinatorsForCapability(uint32_t capability) { … }
void IRContext::AddCombinatorsForExtension(Instruction* extension) { … }
void IRContext::InitializeCombinators() { … }
void IRContext::RemoveFromIdToName(const Instruction* inst) { … }
LoopDescriptor* IRContext::GetLoopDescriptor(const Function* f) { … }
uint32_t IRContext::FindBuiltinInputVar(uint32_t builtin) { … }
void IRContext::AddVarToEntryPoints(uint32_t var_id) { … }
uint32_t IRContext::GetBuiltinInputVarId(uint32_t builtin) { … }
void IRContext::AddCalls(const Function* func, std::queue<uint32_t>* todo) { … }
bool IRContext::ProcessEntryPointCallTree(ProcessFunction& pfn) { … }
bool IRContext::ProcessReachableCallTree(ProcessFunction& pfn) { … }
bool IRContext::ProcessCallTreeFromRoots(ProcessFunction& pfn,
std::queue<uint32_t>* roots) { … }
void IRContext::CollectCallTreeFromRoots(unsigned entryId,
std::unordered_set<uint32_t>* funcs) { … }
void IRContext::EmitErrorMessage(std::string message, Instruction* inst) { … }
DominatorAnalysis* IRContext::GetDominatorAnalysis(const Function* f) { … }
PostDominatorAnalysis* IRContext::GetPostDominatorAnalysis(const Function* f) { … }
bool IRContext::CheckCFG() { … }
bool IRContext::IsReachable(const opt::BasicBlock& bb) { … }
spv::ExecutionModel IRContext::GetStage() { … }
}
}