#include "source/opt/eliminate_dead_members_pass.h"
#include "ir_builder.h"
#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
namespace {
constexpr uint32_t kRemovedMember = …;
constexpr uint32_t kSpecConstOpOpcodeIdx = …;
constexpr uint32_t kArrayElementTypeIdx = …;
}
Pass::Status EliminateDeadMembersPass::Process() { … }
void EliminateDeadMembersPass::FindLiveMembers() { … }
void EliminateDeadMembersPass::FindLiveMembers(const Function& function) { … }
void EliminateDeadMembersPass::FindLiveMembers(const Instruction* inst) { … }
void EliminateDeadMembersPass::MarkMembersAsLiveForStore(
const Instruction* inst) { … }
void EliminateDeadMembersPass::MarkTypeAsFullyUsed(uint32_t type_id) { … }
void EliminateDeadMembersPass::MarkPointeeTypeAsFullUsed(uint32_t ptr_type_id) { … }
void EliminateDeadMembersPass::MarkMembersAsLiveForCopyMemory(
const Instruction* inst) { … }
void EliminateDeadMembersPass::MarkMembersAsLiveForExtract(
const Instruction* inst) { … }
void EliminateDeadMembersPass::MarkMembersAsLiveForAccessChain(
const Instruction* inst) { … }
void EliminateDeadMembersPass::MarkOperandTypeAsFullyUsed(
const Instruction* inst, uint32_t in_idx) { … }
void EliminateDeadMembersPass::MarkMembersAsLiveForArrayLength(
const Instruction* inst) { … }
bool EliminateDeadMembersPass::RemoveDeadMembers() { … }
bool EliminateDeadMembersPass::UpdateOpTypeStruct(Instruction* inst) { … }
bool EliminateDeadMembersPass::UpdateOpMemberNameOrDecorate(Instruction* inst) { … }
bool EliminateDeadMembersPass::UpdateOpGroupMemberDecorate(Instruction* inst) { … }
bool EliminateDeadMembersPass::UpdateConstantComposite(Instruction* inst) { … }
bool EliminateDeadMembersPass::UpdateAccessChain(Instruction* inst) { … }
uint32_t EliminateDeadMembersPass::GetNewMemberIndex(uint32_t type_id,
uint32_t member_idx) { … }
bool EliminateDeadMembersPass::UpdateCompsiteExtract(Instruction* inst) { … }
bool EliminateDeadMembersPass::UpdateCompositeInsert(Instruction* inst) { … }
bool EliminateDeadMembersPass::UpdateOpArrayLength(Instruction* inst) { … }
void EliminateDeadMembersPass::MarkStructOperandsAsFullyUsed(
const Instruction* inst) { … }
}
}