#include "source/opt/vector_dce.h"
#include <utility>
namespace spvtools {
namespace opt {
namespace {
constexpr uint32_t kExtractCompositeIdInIdx = …;
constexpr uint32_t kInsertObjectIdInIdx = …;
constexpr uint32_t kInsertCompositeIdInIdx = …;
}
Pass::Status VectorDCE::Process() { … }
bool VectorDCE::VectorDCEFunction(Function* function) { … }
void VectorDCE::FindLiveComponents(Function* function,
LiveComponentMap* live_components) { … }
void VectorDCE::MarkExtractUseAsLive(const Instruction* current_inst,
const utils::BitVector& live_elements,
LiveComponentMap* live_components,
std::vector<WorkListItem>* work_list) { … }
void VectorDCE::MarkInsertUsesAsLive(
const VectorDCE::WorkListItem& current_item,
LiveComponentMap* live_components,
std::vector<VectorDCE::WorkListItem>* work_list) { … }
void VectorDCE::MarkVectorShuffleUsesAsLive(
const WorkListItem& current_item,
VectorDCE::LiveComponentMap* live_components,
std::vector<WorkListItem>* work_list) { … }
void VectorDCE::MarkCompositeContructUsesAsLive(
VectorDCE::WorkListItem work_item,
VectorDCE::LiveComponentMap* live_components,
std::vector<VectorDCE::WorkListItem>* work_list) { … }
void VectorDCE::MarkUsesAsLive(
Instruction* current_inst, const utils::BitVector& live_elements,
LiveComponentMap* live_components,
std::vector<VectorDCE::WorkListItem>* work_list) { … }
bool VectorDCE::HasVectorOrScalarResult(const Instruction* inst) const { … }
bool VectorDCE::HasVectorResult(const Instruction* inst) const { … }
bool VectorDCE::HasScalarResult(const Instruction* inst) const { … }
uint32_t VectorDCE::GetVectorComponentCount(uint32_t type_id) { … }
bool VectorDCE::RewriteInstructions(
Function* function, const VectorDCE::LiveComponentMap& live_components) { … }
bool VectorDCE::RewriteInsertInstruction(
Instruction* current_inst, const utils::BitVector& live_components,
std::vector<Instruction*>* dead_dbg_value) { … }
void VectorDCE::MarkDebugValueUsesAsDead(
Instruction* composite, std::vector<Instruction*>* dead_dbg_value) { … }
void VectorDCE::AddItemToWorkListIfNeeded(
WorkListItem work_item, VectorDCE::LiveComponentMap* live_components,
std::vector<WorkListItem>* work_list) { … }
}
}