#include "source/opt/liveness.h"
#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
namespace analysis {
namespace {
constexpr uint32_t kDecorationLocationInIdx = …;
constexpr uint32_t kOpDecorateMemberMemberInIdx = …;
constexpr uint32_t kOpDecorateMemberLocationInIdx = …;
constexpr uint32_t kOpDecorateBuiltInLiteralInIdx = …;
constexpr uint32_t kOpDecorateMemberBuiltInLiteralInIdx = …;
}
LivenessManager::LivenessManager(IRContext* ctx) : … { … }
void LivenessManager::InitializeAnalysis() { … }
bool LivenessManager::IsAnalyzedBuiltin(uint32_t bi) { … }
bool LivenessManager::AnalyzeBuiltIn(uint32_t id) { … }
void LivenessManager::MarkLocsLive(uint32_t start, uint32_t count) { … }
uint32_t LivenessManager::GetLocSize(const analysis::Type* type) const { … }
uint32_t LivenessManager::GetComponentType(uint32_t index,
uint32_t agg_type_id) const { … }
uint32_t LivenessManager::GetLocOffset(uint32_t index,
uint32_t agg_type_id) const { … }
uint32_t LivenessManager::AnalyzeAccessChainLoc(const Instruction* ac,
uint32_t curr_type_id,
uint32_t* offset, bool* no_loc,
bool is_patch, bool input) { … }
void LivenessManager::MarkRefLive(const Instruction* ref, Instruction* var) { … }
void LivenessManager::ComputeLiveness() { … }
void LivenessManager::GetLiveness(std::unordered_set<uint32_t>* live_locs,
std::unordered_set<uint32_t>* live_builtins) { … }
}
}
}